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)
Thu, Dec 5, 8:56 AM
Unknown Object (File)
Sun, Dec 1, 6:39 AM
Unknown Object (File)
Mon, Nov 25, 1:53 PM
Unknown Object (File)
Nov 3 2024, 8:20 PM
Unknown Object (File)
Oct 14 2024, 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
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