CyberSecBulletin
CVE-2024-40909NVD status: Modified

Linux: Use After Free

CVE-2024-40909 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 e8ccda39b395169622855607085cdeef4d376e0f, 91cff53136daeff50816b0baeafd38a6976f6209, fa97b8fed9896f1e89cb657513e483a152d4c382 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.28% 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 e8ccda39b395169622855607085cdeef4d376e0f or 91cff53136daeff50816b0baeafd38a6976f6209 or fa97b8fed9896f1e89cb657513e483a152d4c382 or 2884dc7d08d98a89d8d65121524bb7533183a63a, whichever matches your release line, or a later version.
  2. Update Linux Kernel to 6.6.35 or 6.9.6, whichever matches your release line, or a later version.

Affected products and versions

VendorProductAffected versionsFixed in
LinuxLinuxac48dc6ac9240f73bf08d29edf65c2deca93ee5d up to, but not including, e8ccda39b395169622855607085cdeef4d376e0f; 876941f533e7b47fc69977fc4551c02f2d18af97 up to, but not including, 91cff53136daeff50816b0baeafd38a6976f6209; 1a80dbcb2dbaf6e4c216e62e30fa7d3daa8001ce up to, but not including, fa97b8fed9896f1e89cb657513e483a152d4c382; 1a80dbcb2dbaf6e4c216e62e30fa7d3daa8001ce up to, but not including, 2884dc7d08d98a89d8d65121524bb7533183a63a; 5d8d447777564b35f67000e7838e7ccb64d525c8; 6.6.26 up to, but not including, 6.6.35; 6.8.5 up to, but not including, 6.9; 6.9e8ccda39b395169622855607085cdeef4d376e0f, 91cff53136daeff50816b0baeafd38a6976f6209, fa97b8fed9896f1e89cb657513e483a152d4c382, 2884dc7d08d98a89d8d65121524bb7533183a63a, 6.6.35, 6.9
LinuxLinux Kernel6.6.26 up to, but not including, 6.6.35; 6.9 up to, but not including, 6.9.6; 6.106.6.35, 6.9.6

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.17.8HighCNA
CVSS 3.17.8HighNVD

Official description

In the Linux kernel, the following vulnerability has been resolved: bpf: Fix a potential use-after-free in bpf_link_free() After commit 1a80dbcb2dba, bpf_link can be freed by link->ops->dealloc_deferred, but the code still tests and uses link->ops->dealloc afterward, which leads to a use-after-free as reported by syzbot. Actually, one of them should be sufficient, so just call one of them instead of both. Also add a WARN_ON() in case of any problematic implementation.

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. CISA published its SSVC assessment (exploitation: none, automatable: no, technical impact: partial).
  3. Record last changed materially (score, affected products, status or references).

References

Recent Use After Free vulnerabilities

Spotted an error? Tell us.