HomeFreeBSD

tcp: Disallow connecting a disconnected socket

Description

tcp: Disallow connecting a disconnected socket

Currently nothing prevents tcp_usr_connect() from attempting to connect
when the socket has been disconnected. At the moment, doing so triggers
an assertion in in_pcbconnect() because inp_faddr is not unspecified. I
believe this may have been caught in the past by TIMEWAIT checks, but
those are now removed.

Check for additional socket states in tcp_connect().

Reported by: syzbot+f0f7871ec5397602b446@syzkaller.appspotmail.com
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D40579

Details

Provenance
markjAuthored on Jun 23 2023, 1:59 PM
Differential Revision
D40579: tcp: Disallow connecting a disconnected socket
Parents
rG6775ef4188b4: netinet6: Implement in6_cksum_partial() using m_apply()
Branches
Unknown
Tags
Unknown