sctp: check RCV_SHUTDOWN after the sendmsg connect wait
- Published
- Last modified
- Where the record stands: published, rejected by its publisher, or superseded by another id.What do these mean? →
- published
- Whether CISA lists it in its Known Exploited Vulnerabilities catalog: proof that attackers are using it.What do these mean? →
- Not listed in CISA KEV
- Fix
- Fixed in 6.6.160, 6.12.113, 6.18.56, 7.2.10
- Whether working attack code is public (Exploit-DB, Metasploit, Nuclei or GitHub). Public code makes attacks easier.What do these mean? →
- None on Exploit-DB, Metasploit or GitHub
Summary
In the Linux kernel, the following vulnerability has been resolved: sctp: check RCV_SHUTDOWN after the sendmsg connect wait sctp_wait_for_connect() drops the socket lock while it sleeps. An out-of-the-blue ABORT can then be processed from the socket backlog and unlink the association. If a concurrent shutdown(fd, SHUT_RD) sets RCV_SHUTDOWN, the waiter breaks with err == 0 before checking asoc->base.dead. Its final sctp_association_put() can then free the association, leaving sctp_sendmsg_to_asoc() to continue with a dangling pointer. Check RCV_SHUTDOWN along with the wait error in sctp_sendmsg_to_asoc() before using the association again. The check only accesses the socket, so it needs no additional association reference. Return the existing -ESRCH so that sctp_sendmsg() skips freeing a new association that may already have been destroyed. Keep sctp_wait_for_connect() unchanged to preserve its behavior for the connect() caller.
Timeline
- CVE published
- Record last updated
Affected versions
- Linux Linux
Version range not reported
- Linux Linux
4.16
- KernelLinux
From 4.16.0 · fixed in 6.6.160; From 6.7.0 · fixed in 6.12.113; From 6.13.0 · fixed in 6.18.56; From 6.19.0 · fixed in 7.2.10
References 8
git.kernel.org
- stable/c/7f798168c54455559da0f7a377a23ab7019fec35
- stable/c/fe5a23c76fc48b711eb7d6f3462c994e34da36f9
- stable/c/1e7cd89975fa3b11ebd7e1bbb4648a71c0e0e2d4
- stable/c/1bef1944ef15a40797305bf916827b04df6307ca
- stable/c/e8f972b1759d26bbefe4c524caae1ed7c8a593bd
- stable/c/e701345d886e831fb593a0870d69c8c5de6fc938
- stable/c/222c41e0f50f1d5028be9baf0e1dcfc0bfa7f669
- stable/c/4f1da630d13de0370e2f6361f961f1c8b384af1c