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
F107013877: D31973.id95226.diff
Wed, Jan 8, 11:41 PM
Unknown Object (File)
Fri, Jan 3, 7:01 PM
Unknown Object (File)
Tue, Dec 31, 8:42 PM
Unknown Object (File)
Dec 5 2024, 8:56 AM
Unknown Object (File)
Dec 1 2024, 6:39 AM
Unknown Object (File)
Nov 25 2024, 1:53 PM
Unknown Object (File)
Nov 3 2024, 8:20 PM
Unknown Object (File)
Oct 14 2024, 5:56 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