Linux: Use After Free
CVE-2025-23142 is a high-severity use after free vulnerability in Linux, with a CVSS 3.1 base score of 7.8 out of 10. It can be exploited with local access to the system by an attacker with a low-privileged account, without any action from a user. The record lists versions 547762250220325d350d0917a7231480e0f4142b, 3257386be6a7eb8a8bfc9cbfb746df4eb4fc70e8, 0f7df4899299ce4662e5f95badb9dbc57cc37fa5 as the first without the flaw, so updating Linux to one of those releases or later removes the exposure. There is no confirmed exploitation so far. EPSS estimates a 0.23% chance of exploitation within 30 days, which is low compared with other CVEs.
High severity with no evidence of exploitation so far.
What to do
- Update Linux to 547762250220325d350d0917a7231480e0f4142b or 3257386be6a7eb8a8bfc9cbfb746df4eb4fc70e8 or 0f7df4899299ce4662e5f95badb9dbc57cc37fa5 or 7a63f4fb0efb4e69efd990cbb740a848679ec4b0, whichever matches your release line, or a later version.
- Update Linux Kernel to 3.19 or 4.5 or 4.10 or 4.15, whichever matches your release line, or a later version.
Affected products and versions
| Vendor | Product | Affected versions | Fixed in |
|---|---|---|---|
| Linux | Linux | df132eff463873e14e019a07f387b4d577d6d1f9 up to, but not including, 547762250220325d350d0917a7231480e0f4142b; df132eff463873e14e019a07f387b4d577d6d1f9 up to, but not including, 3257386be6a7eb8a8bfc9cbfb746df4eb4fc70e8; df132eff463873e14e019a07f387b4d577d6d1f9 up to, but not including, 0f7df4899299ce4662e5f95badb9dbc57cc37fa5; df132eff463873e14e019a07f387b4d577d6d1f9 up to, but not including, 7a63f4fb0efb4e69efd990cbb740a848679ec4b0; df132eff463873e14e019a07f387b4d577d6d1f9 up to, but not including, c6fefcb71d246baaf3bacdad1af7ff50ebcfe652; df132eff463873e14e019a07f387b4d577d6d1f9 up to, but not including, 9e7c37fadb3be1fc33073fcf10aa96d166caa697; df132eff463873e14e019a07f387b4d577d6d1f9 up to, but not including, 5bc83bdf5f5b8010d1ca5a4555537e62413ab4e2; df132eff463873e14e019a07f387b4d577d6d1f9 up to, but not including, 2e5068b7e0ae0a54f6cfd03a2f80977da657f1ee; and 12 more ranges | 547762250220325d350d0917a7231480e0f4142b, 3257386be6a7eb8a8bfc9cbfb746df4eb4fc70e8, 0f7df4899299ce4662e5f95badb9dbc57cc37fa5, 7a63f4fb0efb4e69efd990cbb740a848679ec4b0, c6fefcb71d246baaf3bacdad1af7ff50ebcfe652, 9e7c37fadb3be1fc33073fcf10aa96d166caa697 |
| Linux | Linux Kernel | 3.18.128 up to, but not including, 3.19; 4.4.166 up to, but not including, 4.5; 4.9.142 up to, but not including, 4.10; 4.14.85 up to, but not including, 4.15; 4.19.6 up to, but not including, 5.4.293; 5.5 up to, but not including, 5.10.237; 5.11 up to, but not including, 5.15.181; 5.16 up to, but not including, 6.1.135; and 5 more ranges | 3.19, 4.5, 4.10, 4.15, 5.4.293, 5.10.237 |
| Debian | Debian Linux | 11.0 | Not stated |
Version data comes from the organisation that assigned the CVE. Confirm against the vendor advisory before deciding you are unaffected.
How the severity score breaks down
- Attack vector
- LocalThe attacker needs local access or must trick a user into running something.
- Attack complexity
- LowNo special conditions are needed; the attack works reliably.
- Privileges required
- LowA basic user account is enough.
- User interaction
- NoneNo action by a victim is required.
- Scope
- UnchangedImpact stays within the vulnerable component.
- Confidentiality
- HighAll data handled by the component can be read.
- Integrity
- HighData or code can be modified at will.
- Availability
- HighThe component can be taken down completely.
Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H. Scored by NVD.
| Scoring system | Score | Severity | Scored by |
|---|---|---|---|
| CVSS 3.1 | 7.8 | High | CNA |
| CVSS 3.1 | 7.8 | High | NVD |
Official 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]).
Source: the CVE record as published by its numbering authority, via NVD and CVE.org.
The underlying weakness: Use After Free
The product reuses or references memory after it has been freed. At some point afterward, the memory may be allocated again and saved in another pointer, while the original pointer references a location somewhere within the new allocation. Any operations using the original pointer are no longer valid because the memory belongs to the code that operates on the new pointer.
How developers prevent this class of flaw
- Choose a language that provides automatic memory management.
- When freeing pointers, be sure to set them to NULL once they are freed. However, the utilization of multiple or complex data structures may lower the usefulness of this strategy.
Timeline
- CVE record published.
- CISA published its SSVC assessment (exploitation: none, automatable: no, technical impact: total).
- Record last changed materially (score, affected products, status or references).
References
Patches and release notes
- git.kernel.org/stable/c/0f7df4899299ce4662e5f95badb9dbc57cc37fa5
- git.kernel.org/stable/c/2e5068b7e0ae0a54f6cfd03a2f80977da657f1ee
- git.kernel.org/stable/c/3257386be6a7eb8a8bfc9cbfb746df4eb4fc70e8
- git.kernel.org/stable/c/547762250220325d350d0917a7231480e0f4142b
- git.kernel.org/stable/c/5bc83bdf5f5b8010d1ca5a4555537e62413ab4e2
- git.kernel.org/stable/c/7a63f4fb0efb4e69efd990cbb740a848679ec4b0
- git.kernel.org/stable/c/9e7c37fadb3be1fc33073fcf10aa96d166caa697
- git.kernel.org/stable/c/c6fefcb71d246baaf3bacdad1af7ff50ebcfe652
- git.kernel.org/stable/c/f1a69a940de58b16e8249dff26f74c8cc59b32be
Third-party and government advisories
- lists.debian.org/debian-lts-announce/2025/05/msg00030.htmlMailing List, Third Party Advisory
- lists.debian.org/debian-lts-announce/2025/05/msg00045.htmlMailing List, Third Party Advisory
Recent Use After Free vulnerabilities
- 7.8 High severity
- 7.8 High severity
- 7.8 High severity
- 7.8 High severity
- 7.8 High severity
- 7.8 High severity
Spotted an error? Tell us.