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)
Sun, Nov 3, 8:20 PM
Unknown Object (File)
Mon, Oct 14, 5:56 PM
Unknown Object (File)
Oct 4 2024, 3:06 PM
Unknown Object (File)
Oct 4 2024, 8:20 AM
Unknown Object (File)
Oct 2 2024, 12:44 PM
Unknown Object (File)
Oct 2 2024, 12:22 AM
Unknown Object (File)
Sep 30 2024, 6:11 AM
Unknown Object (File)
Sep 27 2024, 9:25 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
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable