Page MenuHomeFreeBSD

sctp: Release the socket reference when detaching an association
ClosedPublic

Authored by markj on Aug 31 2021, 4:18 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Apr 16, 12:09 AM
Unknown Object (File)
Sun, Apr 14, 2:41 PM
Unknown Object (File)
Thu, Apr 11, 10:46 AM
Unknown Object (File)
Mar 10 2024, 11:42 PM
Unknown Object (File)
Mar 10 2024, 11:42 PM
Unknown Object (File)
Mar 10 2024, 11:38 PM
Unknown Object (File)
Mar 10 2024, 11:23 PM
Unknown Object (File)
Mar 2 2024, 7:44 AM
Subscribers

Details

Summary

Later in sctp_free_assoc(), when we clean up chunk lists,
sctp_free_spbufspace() is used to reset the byte count in the socket
send buffer. However, if the PCB is going away, the socket may already
have been detached from the PCB, in which case this becomes a use-after
free. Clear the socket reference from the association before detaching
it from the PCB, if the PCB has already lost its socket reference.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable