Page MenuHomeFreeBSD

socket: Fix a use-after-free in soclose()
ClosedPublic

Authored by markj on Sep 15 2021, 7:58 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Nov 4, 11:20 PM
Unknown Object (File)
Wed, Oct 29, 5:00 PM
Unknown Object (File)
Wed, Oct 29, 4:59 PM
Unknown Object (File)
Wed, Oct 29, 4:59 PM
Unknown Object (File)
Wed, Oct 29, 4:59 PM
Unknown Object (File)
Mon, Oct 27, 12:13 AM
Unknown Object (File)
Oct 12 2025, 11:13 AM
Unknown Object (File)
Oct 12 2025, 11:13 AM
Subscribers

Details

Summary

After releasing a reference to a socket "so", we should avoid testing
SOLISTENING(so) since the socket may have been freed. Instead, directly
test whether the list of unaccepted sockets is empty.

Fixes: f4bb1869ddd2 ("Consistently use the SOLISTENING() macro")
Pointy hat: markj
MFC after: 3 days

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 41533
Build 38422: arc lint + arc unit