linux/net/tls
Ilya Lesokhin d91c3e17f7 net/tls: Only attach to sockets in ESTABLISHED state
Calling accept on a TCP socket with a TLS ulp attached results
in two sockets that share the same ulp context.
The ulp context is freed while a socket is destroyed, so
after one of the sockets is released, the second second will
trigger a use after free when it tries to access the ulp context
attached to it.
We restrict the TLS ulp to sockets in ESTABLISHED state
to prevent the scenario above.

Fixes: 3c4d755915 ("tls: kernel TLS support")
Reported-by: syzbot+904e7cd6c5c741609228@syzkaller.appspotmail.com
Signed-off-by: Ilya Lesokhin <ilyal@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-01-17 16:05:28 -05:00
..
Kconfig tls: update Kconfig 2017-06-17 22:56:46 -04:00
Makefile
tls_main.c net/tls: Only attach to sockets in ESTABLISHED state 2018-01-17 16:05:28 -05:00
tls_sw.c net/tls: Fix inverted error codes to avoid endless loop 2018-01-15 14:21:57 -05:00