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
F132477382: D31734.id94395.diff
Fri, Oct 17, 6:22 AM
Unknown Object (File)
Sep 3 2025, 6:40 AM
Unknown Object (File)
Sep 3 2025, 3:32 AM
Unknown Object (File)
Sep 2 2025, 12:37 AM
Unknown Object (File)
Aug 14 2025, 11:48 PM
Unknown Object (File)
Aug 14 2025, 4:04 AM
Unknown Object (File)
Jul 28 2025, 4:36 PM
Unknown Object (File)
Jul 28 2025, 6:02 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