CVE-2026-72242: selinux: avoid sk_socket dereference in selinux_sctp_bind_connect()
In the Linux kernel, the following vulnerability has been resolved:
selinux: avoid sksocket dereference in selinuxsctpbindconnect()
selinuxsctpbindconnect() dereferences sk->sksocket to pass a struct socket to selinuxsocketbind() and selinuxsocketconnecthelper(). However, when the hook is invoked from the ASCONF softirq path (sctpprocessasconf), there is no file reference guaranteeing that sk->sksocket is non-NULL. The setsockopt callers (bindx, connectx, setprimary, sendmsg connect) hold a file reference and are not affected.
Both selinuxsocketbind() and selinuxsocketconnecthelper() immediately resolve sock->sk, never using the struct socket for anything else. Refactor the inner logic into helpers that take a struct sock directly so that selinuxsctpbindconnect() never needs to touch sk->sksocket at all.