Page MenuHomeFreeBSD

sctp: Fix racy UNBOUND flag check in sctp_inpcb_bind()
ClosedPublic

Authored by markj on Aug 30 2021, 9:27 PM.
Tags
None
Referenced Files
Unknown Object (File)
Apr 1 2024, 7:31 AM
Unknown Object (File)
Jan 16 2024, 11:10 AM
Unknown Object (File)
Dec 15 2023, 11:02 PM
Unknown Object (File)
Dec 12 2023, 3:06 PM
Unknown Object (File)
Sep 17 2023, 10:13 PM
Unknown Object (File)
Sep 12 2023, 9:52 PM
Unknown Object (File)
Sep 5 2023, 1:22 AM
Unknown Object (File)
Aug 2 2023, 3:10 AM
Subscribers

Details

Summary

SCTP needs to avoid binding a given socket twice. The check used to
avoid this is racy since neither the inpcb lock nor the global info lock
is held. Fix it by synchronizing using the global info lock. In
particular, sctp_inpcb_bind() may drop the inpcb lock in some cases, but
the info lock is sufficient.

Reported by: syzbot+548a8560d959669d0e12@syzkaller.appspotmail.com

Diff Detail

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