HomeFreeBSD

sctp: Hold association locks across socket wakeups when freeing

Description

sctp: Hold association locks across socket wakeups when freeing

At this point we do not hold the inpcb lock, so the only thing holding
the socket reference live is the TCB lock, which needs to be acquired by
sctp_inpcb_free() in order to destroy associations. Defer the unlock to
until after we dereference the socket reference.

Reported by: syzbot+1d0f2c4675de76a4cf1e@syzkaller.appspotmail.com
Reported by: syzbot+fabee77954fe69d3a5ad@syzkaller.appspotmail.com
Reviewed by: tuexen
Sponsored by: The FreeBSD Foundation

(cherry picked from commit d35be50f57797a400ff68a37777405029bf9730a)

Details

Provenance
markjAuthored on Sep 1 2021, 2:27 PM
Parents
rG2d0d1d6e07bc: sctp: Add macros to assert on inp info lock state
Branches
Unknown
Tags
Unknown