In the Linux kernel, the following vulnerability has been resolved: sctp: hold shkey across socket migration sctp_sock_migrate() transfers queued DATA skbs from the old socket to the new one. skb_orphan() invokes sctp_wfree() during that transfer and drops the skb-owned shared-key reference. If userspace has removed that key from the association, this can be the final reference. The following sctp_set_owner_w() then dereferences the freed chunk->shkey while trying to take the new owner reference. Take a temporary shared-key reference before orphaning the skb and release it after the new owner has taken its reference. This preserves the selected authentication key throughout the ownership transfer. Bug found and triaged by OpenAI Security Research and validated by Trail of Bits.
https://git.kernel.org/stable/c/bea7f19a12e68a670c7173aac1c52de12fd615e9
https://git.kernel.org/stable/c/ad1320865b1826ffa2e81e37c49535751e81335c
https://git.kernel.org/stable/c/9875dda4a2dbbbe259cd5f88f19d87b8721a98d0
https://git.kernel.org/stable/c/79e6577cada6a2d956042e3342ac2b2122ead6b0