CyberSecBulletin
CVE-2025-38708NVD status: Modified

Linux: Use After Free

CVE-2025-38708 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 0336bfe9c237476bd7c45605a36ca79c2bca62e5, 810cd546a29bfac90ed1328ea01d693d4bd11cb1, 84ef8dd3238330d1795745ece83b19f0295751bf 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.4% chance of exploitation within 30 days, which is low compared with other CVEs.

Next patch cycle

High severity with no evidence of exploitation so far.

What to do

  1. Update Linux to 0336bfe9c237476bd7c45605a36ca79c2bca62e5 or 810cd546a29bfac90ed1328ea01d693d4bd11cb1 or 84ef8dd3238330d1795745ece83b19f0295751bf or 57418de35420cedab035aa1da8a26c0499b7f575, whichever matches your release line, or a later version.
  2. Update SIMATIC CN 4100 to V5.0 or a later version.
  3. Update Linux Kernel to 5.4.297 or 5.10.241 or 5.15.190 or 6.1.149, whichever matches your release line, or a later version.

Affected products and versions

VendorProductAffected versionsFixed in
LinuxLinux668700b40a7c8727bbd2b3fd4fd22e0ce3f1aeb6 up to, but not including, 0336bfe9c237476bd7c45605a36ca79c2bca62e5; 668700b40a7c8727bbd2b3fd4fd22e0ce3f1aeb6 up to, but not including, 810cd546a29bfac90ed1328ea01d693d4bd11cb1; 668700b40a7c8727bbd2b3fd4fd22e0ce3f1aeb6 up to, but not including, 84ef8dd3238330d1795745ece83b19f0295751bf; 668700b40a7c8727bbd2b3fd4fd22e0ce3f1aeb6 up to, but not including, 57418de35420cedab035aa1da8a26c0499b7f575; 668700b40a7c8727bbd2b3fd4fd22e0ce3f1aeb6 up to, but not including, 9f53b2433ad248cd3342cc345f56f5c7904bd8c4; 668700b40a7c8727bbd2b3fd4fd22e0ce3f1aeb6 up to, but not including, 7d483ad300fc0a06f69b019dda8f74970714baf8; 668700b40a7c8727bbd2b3fd4fd22e0ce3f1aeb6 up to, but not including, 46e3763dcae0ffcf8fcfaff4fc10a90a92ffdd89; 668700b40a7c8727bbd2b3fd4fd22e0ce3f1aeb6 up to, but not including, 3a896498f6f577e57bf26aaa93b48c22b6d20c20; and 2 more ranges0336bfe9c237476bd7c45605a36ca79c2bca62e5, 810cd546a29bfac90ed1328ea01d693d4bd11cb1, 84ef8dd3238330d1795745ece83b19f0295751bf, 57418de35420cedab035aa1da8a26c0499b7f575, 9f53b2433ad248cd3342cc345f56f5c7904bd8c4, 7d483ad300fc0a06f69b019dda8f74970714baf8
SiemensSIMATIC CN 4100before V5.0V5.0
SiemensSIMATIC S7-1500 CPU 1518-4 PN/DP MFPV3.1.5 and laterNot stated
SiemensSIMATIC S7-1500 CPU 1518F-4 PN/DP MFPV3.1.5 and laterNot stated
SiemensSIPLUS S7-1500 CPU 1518-4 PN/DP MFPV3.1.5 and laterNot stated
LinuxLinux Kernel4.5 up to, but not including, 5.4.297; 5.5 up to, but not including, 5.10.241; 5.11 up to, but not including, 5.15.190; 5.16 up to, but not including, 6.1.149; 6.2 up to, but not including, 6.6.103; 6.7 up to, but not including, 6.12.43; 6.13 up to, but not including, 6.15.11; 6.16 up to, but not including, 6.16.25.4.297, 5.10.241, 5.15.190, 6.1.149, 6.6.103, 6.12.43
DebianDebian Linux11.0Not 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 systemScoreSeverityScored by
CVSS 3.19.8CriticalCNA
CVSS 3.17.8HighNVD

Official description

In the Linux kernel, the following vulnerability has been resolved: drbd: add missing kref_get in handle_write_conflicts With `two-primaries` enabled, DRBD tries to detect "concurrent" writes and handle write conflicts, so that even if you write to the same sector simultaneously on both nodes, they end up with the identical data once the writes are completed. In handling "superseeded" writes, we forgot a kref_get, resulting in a premature drbd_destroy_device and use after free, and further to kernel crashes with symptoms. Relevance: No one should use DRBD as a random data generator, and apparently all users of "two-primaries" handle concurrent writes correctly on layer up. That is cluster file systems use some distributed lock manager, and live migration in virtualization environments stops writes on one node before starting writes on the other node. Which means that other than for "test cases", this code path is never taken in real life. FYI, in DRBD 9, things are handled differently nowadays. We still detect "write conflicts", but no longer try to be smart about them. We decided to disconnect hard instead: upper layers must not submit concurrent writes. If they do, that's their fault.

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.

More Use After Free vulnerabilities (CWE-416)

Timeline

  1. CVE record published.
  2. Record last changed materially (score, affected products, status or references).

References

Third-party and government advisories

Recent Use After Free vulnerabilities

Spotted an error? Tell us.