CyberSecBulletin
CVE-2024-26654NVD status: Modified

Linux: Use After Free

CVE-2024-26654 is a high-severity use after free vulnerability in Linux, with a CVSS 3.1 base score of 7.0 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 eeb2a2ca0b8de7e1c66afaf719529154e7dc60b2, 4206ad65a0ee76920041a755bd3c17c6ba59bba2, aa39e6878f61f50892ee2dd9d2176f72020be845 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.26% 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 eeb2a2ca0b8de7e1c66afaf719529154e7dc60b2 or 4206ad65a0ee76920041a755bd3c17c6ba59bba2 or aa39e6878f61f50892ee2dd9d2176f72020be845 or 8c990221681688da34295d6d76cc2f5b963e83f5, whichever matches your release line, or a later version.
  2. Update Linux Kernel to 4.19.312 or 5.4.274 or 5.10.215 or 5.15.154, whichever matches your release line, or a later version.

Affected products and versions

VendorProductAffected versionsFixed in
LinuxLinux198de43d758ca2700e2b52b49c0b189b4931466c up to, but not including, eeb2a2ca0b8de7e1c66afaf719529154e7dc60b2; 198de43d758ca2700e2b52b49c0b189b4931466c up to, but not including, 4206ad65a0ee76920041a755bd3c17c6ba59bba2; 198de43d758ca2700e2b52b49c0b189b4931466c up to, but not including, aa39e6878f61f50892ee2dd9d2176f72020be845; 198de43d758ca2700e2b52b49c0b189b4931466c up to, but not including, 8c990221681688da34295d6d76cc2f5b963e83f5; 198de43d758ca2700e2b52b49c0b189b4931466c up to, but not including, 9d66ae0e7bb78b54e1e0525456c6b54e1d132046; 198de43d758ca2700e2b52b49c0b189b4931466c up to, but not including, 61d4787692c1fccdc268ffa7a891f9c149f50901; 198de43d758ca2700e2b52b49c0b189b4931466c up to, but not including, e955e8a7f38a856fc6534ba4e6bffd4d5cc80ac3; 198de43d758ca2700e2b52b49c0b189b4931466c up to, but not including, 3c907bf56905de7d27b329afaf59c2fb35d17b04; and 2 more rangeseeb2a2ca0b8de7e1c66afaf719529154e7dc60b2, 4206ad65a0ee76920041a755bd3c17c6ba59bba2, aa39e6878f61f50892ee2dd9d2176f72020be845, 8c990221681688da34295d6d76cc2f5b963e83f5, 9d66ae0e7bb78b54e1e0525456c6b54e1d132046, 61d4787692c1fccdc268ffa7a891f9c149f50901
LinuxLinux Kernel2.6.23 up to, but not including, 4.19.312; 4.20 up to, but not including, 5.4.274; 5.5 up to, but not including, 5.10.215; 5.11 up to, but not including, 5.15.154; 5.16 up to, but not including, 6.1.84; 6.2 up to, but not including, 6.6.24; 6.7 up to, but not including, 6.7.12; 6.8 up to, but not including, 6.8.3; and 1 more ranges4.19.312, 5.4.274, 5.10.215, 5.15.154, 6.1.84, 6.6.24
DebianDebian Linux10.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
HighSuccess depends on conditions outside the attacker's control.
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:H/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.0HighNVD

Official description

In the Linux kernel, the following vulnerability has been resolved: ALSA: sh: aica: reorder cleanup operations to avoid UAF bugs The dreamcastcard->timer could schedule the spu_dma_work and the spu_dma_work could also arm the dreamcastcard->timer. When the snd_pcm_substream is closing, the aica_channel will be deallocated. But it could still be dereferenced in the worker thread. The reason is that del_timer() will return directly regardless of whether the timer handler is running or not and the worker could be rescheduled in the timer handler. As a result, the UAF bug will happen. The racy situation is shown below: (Thread 1) | (Thread 2) snd_aicapcm_pcm_close() | ... | run_spu_dma() //worker | mod_timer() flush_work() | del_timer() | aica_period_elapsed() //timer kfree(dreamcastcard->channel) | schedule_work() | run_spu_dma() //worker ... | dreamcastcard->channel-> //USE In order to mitigate this bug and other possible corner cases, call mod_timer() conditionally in run_spu_dma(), then implement PCM sync_stop op to cancel both the timer and worker. The sync_stop op will be called from PCM core appropriately when needed.

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.