CyberSecBulletin
CVE-2024-35887NVD status: Modified

Linux: Use After Free

CVE-2024-35887 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 28f2d36ac52225a13e020c2589833f1816a0cfc6, 8a912ef5b7c5d14fb41b9a7935d1df5bb87058bf, 74204bf9050f7627aead9875fe4e07ba125cb19b 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.

Next patch cycle

High severity with no evidence of exploitation so far.

What to do

  1. Update Linux to 28f2d36ac52225a13e020c2589833f1816a0cfc6 or 8a912ef5b7c5d14fb41b9a7935d1df5bb87058bf or 74204bf9050f7627aead9875fe4e07ba125cb19b or c6a368f9c7af4c14b14d390c2543af8001c9bdb9, whichever matches your release line, or a later version.
  2. Update Linux Kernel to 6.6.26 or 6.8.5, whichever matches your release line, or a later version.

Affected products and versions

VendorProductAffected versionsFixed in
LinuxLinux1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 up to, but not including, 28f2d36ac52225a13e020c2589833f1816a0cfc6; 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 up to, but not including, 8a912ef5b7c5d14fb41b9a7935d1df5bb87058bf; 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 up to, but not including, 74204bf9050f7627aead9875fe4e07ba125cb19b; 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 up to, but not including, c6a368f9c7af4c14b14d390c2543af8001c9bdb9; 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 up to, but not including, fd819ad3ecf6f3c232a06b27423ce9ed8c20da89; 2.6.1228f2d36ac52225a13e020c2589833f1816a0cfc6, 8a912ef5b7c5d14fb41b9a7935d1df5bb87058bf, 74204bf9050f7627aead9875fe4e07ba125cb19b, c6a368f9c7af4c14b14d390c2543af8001c9bdb9, fd819ad3ecf6f3c232a06b27423ce9ed8c20da89
LinuxLinux Kernel2.6.12 up to, but not including, 6.6.26; 6.7 up to, but not including, 6.8.5; 6.96.6.26, 6.8.5

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

Official description

In the Linux kernel, the following vulnerability has been resolved: ax25: fix use-after-free bugs caused by ax25_ds_del_timer When the ax25 device is detaching, the ax25_dev_device_down() calls ax25_ds_del_timer() to cleanup the slave_timer. When the timer handler is running, the ax25_ds_del_timer() that calls del_timer() in it will return directly. As a result, the use-after-free bugs could happen, one of the scenarios is shown below: (Thread 1) | (Thread 2) | ax25_ds_timeout() ax25_dev_device_down() | ax25_ds_del_timer() | del_timer() | ax25_dev_put() //FREE | | ax25_dev-> //USE In order to mitigate bugs, when the device is detaching, use timer_shutdown_sync() to stop the timer.

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: total).
  3. Record last changed materially (score, affected products, status or references).

References

Recent Use After Free vulnerabilities

Spotted an error? Tell us.