Linux: Use After Free
CVE-2024-58240 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 f32ab6cb544d01cdc150de5df389ac685aa507b0, 5f7761c94b1db7570cab328c9f940a33284509b7, 48905146d11dbf1ddbb2967319016a83976953f5 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.34% 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 f32ab6cb544d01cdc150de5df389ac685aa507b0 or 5f7761c94b1db7570cab328c9f940a33284509b7 or 48905146d11dbf1ddbb2967319016a83976953f5 or dec5b6e7b211e405d3bcb504562ab21aa7e5a64d, whichever matches your release line, or a later version.
- Update SIMATIC CN 4100 to V5.0 or a later version.
- Update Linux Kernel to 6.1.149 or 6.6.21 or 6.7.9, whichever matches your release line, or a later version.
Affected products and versions
| Vendor | Product | Affected versions | Fixed in |
|---|---|---|---|
| Linux | Linux | 3c4d7559159bfe1e3b94df3a657b2cda3a34e218 up to, but not including, f32ab6cb544d01cdc150de5df389ac685aa507b0; 3c4d7559159bfe1e3b94df3a657b2cda3a34e218 up to, but not including, 5f7761c94b1db7570cab328c9f940a33284509b7; 3c4d7559159bfe1e3b94df3a657b2cda3a34e218 up to, but not including, 48905146d11dbf1ddbb2967319016a83976953f5; 3c4d7559159bfe1e3b94df3a657b2cda3a34e218 up to, but not including, dec5b6e7b211e405d3bcb504562ab21aa7e5a64d; 3c4d7559159bfe1e3b94df3a657b2cda3a34e218 up to, but not including, 999115298017a675d8ddf61414fc7a85c89f1186; 3c4d7559159bfe1e3b94df3a657b2cda3a34e218 up to, but not including, 41532b785e9d79636b3815a64ddf6a096647d011; 4.13 | f32ab6cb544d01cdc150de5df389ac685aa507b0, 5f7761c94b1db7570cab328c9f940a33284509b7, 48905146d11dbf1ddbb2967319016a83976953f5, dec5b6e7b211e405d3bcb504562ab21aa7e5a64d, 999115298017a675d8ddf61414fc7a85c89f1186, 41532b785e9d79636b3815a64ddf6a096647d011 |
| Siemens | SIMATIC CN 4100 | before V5.0 | V5.0 |
| Linux | Linux Kernel | 4.13 up to, but not including, 6.1.149; 6.2 up to, but not including, 6.6.21; 6.7 up to, but not including, 6.7.9; 6.8 | 6.1.149, 6.6.21, 6.7.9 |
| 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 | 9.8 | Critical | CNA |
| CVSS 3.1 | 7.8 | High | NVD |
Official description
In the Linux kernel, the following vulnerability has been resolved: tls: separate no-async decryption request handling from async If we're not doing async, the handling is much simpler. There's no reference counting, we just need to wait for the completion to wake us up and return its result. We should preferably also use a separate crypto_wait. I'm not seeing a UAF as I did in the past, I think aec7961916f3 ("tls: fix race between async notify and socket close") took care of it. This will make the next fix easier.
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: yes, technical impact: total).
- Record last changed materially (score, affected products, status or references).
References
Patches and release notes
Third-party and government advisories
- lists.debian.org/debian-lts-announce/2025/10/msg00008.htmlThird Party Advisory
Other references
Recent Use After Free vulnerabilities
- 8.8 High severity
- 8.8 High severity
- 8.4 High severity
- 8.4 High severity
- 9.8 Critical severity
- 8.4 High severity
Spotted an error? Tell us.