CVE-2025-23142
Published: May 1, 2025
Modified: May 23, 2026
Description
In the Linux kernel, the following vulnerability has been resolved: sctp: detect and prevent references to a freed transport in sendmsg sctp_sendmsg() re-uses associations and transports when possible by doing a lookup based on the socket endpoint and the message destination address, and then sctp_sendmsg_to_asoc() sets the selected transport in all the message chunks to be sent. There's a possible race condition if another thread triggers the removal of that selected transport, for instance, by explicitly unbinding an address with setsockopt(SCTP_SOCKOPT_BINDX_REM), after the chunks have been set up and before the message is sent. This can happen if the send buffer is full, during the period when the sender thread temporarily releases the socket lock in sctp_wait_for_sndbuf(). This causes the access to the transport data in sctp_outq_select_transport(), when the association outqueue is flushed, to result in a use-after-free read. This change avoids this scenario by having sctp_transport_free() signal the freeing of the transport, tagging it as "dead". In order to do this, the patch restores the "dead" bit in struct sctp_transport, which was removed in commit 47faa1e4c50e ("sctp: remove the dead field of sctp_transport"). Then, in the scenario where the sender thread has released the socket lock in sctp_wait_for_sndbuf(), the bit is checked again after re-acquiring the socket lock to detect the deletion. This is done while holding a reference to the transport to prevent it from being freed in the process. If the transport was deleted while the socket lock was relinquished, sctp_sendmsg_to_asoc() will return -EAGAIN to let userspace retry the send. The bug was found by a private syzbot instance (see the error report [1] and the C reproducer that triggers it [2]).
| Vendor | Product | Versions |
|---|---|---|
Linux | Linux | affected df132eff463873e14e019a07f387b4d577d6d1f9 - < 547762250220325d350d0917a7231480e0f4142baffected df132eff463873e14e019a07f387b4d577d6d1f9 - < 3257386be6a7eb8a8bfc9cbfb746df4eb4fc70e8affected df132eff463873e14e019a07f387b4d577d6d1f9 - < 0f7df4899299ce4662e5f95badb9dbc57cc37fa5affected df132eff463873e14e019a07f387b4d577d6d1f9 - < 7a63f4fb0efb4e69efd990cbb740a848679ec4b0affected df132eff463873e14e019a07f387b4d577d6d1f9 - < c6fefcb71d246baaf3bacdad1af7ff50ebcfe652+14 more versions |
Linux | Linux | affected 4.20unaffected 0 - < 4.20unaffected 5.4.293 - <= 5.4.*unaffected 5.10.237 - <= 5.10.*unaffected 5.15.181 - <= 5.15.*+6 more versions |
References
Security Training
Train your team to recognize and prevent security threats with our comprehensive security awareness program.
Start TrainingVulnerability Scanning
Discover vulnerabilities in your applications and infrastructure before attackers do.
Scan Now