HomeFreeBSD

sctp: Clear assoc socket references when freeing a PCB

Description

sctp: Clear assoc socket references when freeing a PCB

This restores behaviour present in the first import of SCTP. Commit
ceaad40ae729dea2c5d8ffcfdd45bb96fb8969d2 commented this out and commit
62fb761ff28bb184a2543e539dd689fefd5d3246 removed it. However, once
sctp_inpcb_free() returns, the socket reference is gone no matter what,
so we need to clear it.

Reported by: syzbot+30dd69297fcbc5f0e10a@syzkaller.appspotmail.com
Reported by: syzbot+7b2f9d4bcac1c9569291@syzkaller.appspotmail.com
Reported by: syzbot+ed3e651f7d040af480a6@syzkaller.appspotmail.com
Reviewed by: tuexen
Sponsored by: The FreeBSD Foundation

(cherry picked from commit 4250aa1188b5622a6cef871003abd4a50067bdae)

Details

Provenance
markjAuthored on Sep 9 2021, 12:33 PM
Parents
rG1cce9f8fecf2: osd: Fix racy assertions
Branches
Unknown
Tags
Unknown