In the Linux kernel, the following vulnerability has been resolved:
net: tls: explicitly disallow disconnect
syzbot discovered that it can disconnect a TLS socket and then
run into all sort of unexpected corner cases. I have a vague
recollection of Eric pointing this out to us a long time ago.
Supporting disconnect is really hard, for one thing if offload
is enabled we'd need to wait for all packets to be _acked_.
Disconnect is not commonly used, disallow it.
The immediate problem syzbot run into is the warning in the strp,
but that's just the easiest bug to trigger:
WARNING: CPU: 0 PID: 5834 at net/tls/tls_strp.c:486tls_strp_msg_load+0x72e/0xa80net/tls/tls_strp.c:486RIP: 0010:tls_strp_msg_load+0x72e/0xa80net/tls/tls_strp.c:486Call Trace:<TASK>tls_rx_rec_wait+0x280/0xa60net/tls/tls_sw.c:1363tls_sw_recvmsg+0x85c/0x1c30net/tls/tls_sw.c:2043inet6_recvmsg+0x2c9/0x730net/ipv6/af_inet6.c:678sock_recvmsg_nosecnet/socket.c:1023[inline]sock_recvmsg+0x109/0x280net/socket.c:1045__sys_recvfrom+0x202/0x380net/socket.c:2237