CyberSecBulletin
CVE-2024-26689NVD status: Modified

Linux: Use After Free

CVE-2024-26689 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 8180d0c27b93a6eb60da1b08ea079e3926328214, 70e329b440762390258a6fe8c0de93c9fdd56c77, f3f98d7d84b31828004545e29fd7262b9f444139 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.7% chance of exploitation within 30 days, higher than 54% of scored CVEs.

Next patch cycle

High severity with no evidence of exploitation so far.

What to do

  1. Update Linux to 8180d0c27b93a6eb60da1b08ea079e3926328214 or 70e329b440762390258a6fe8c0de93c9fdd56c77 or f3f98d7d84b31828004545e29fd7262b9f444139 or ae20db45e482303a20e56f2db667a9d9c54ac7e7, whichever matches your release line, or a later version.
  2. Update Linux Kernel to 5.10.210 or 5.15.149 or 6.1.79 or 6.6.18, whichever matches your release line, or a later version.

Affected products and versions

VendorProductAffected versionsFixed in
LinuxLinux9030aaf9bf0a1eee47a154c316c789e959638b0f up to, but not including, 8180d0c27b93a6eb60da1b08ea079e3926328214; 9030aaf9bf0a1eee47a154c316c789e959638b0f up to, but not including, 70e329b440762390258a6fe8c0de93c9fdd56c77; 9030aaf9bf0a1eee47a154c316c789e959638b0f up to, but not including, f3f98d7d84b31828004545e29fd7262b9f444139; 9030aaf9bf0a1eee47a154c316c789e959638b0f up to, but not including, ae20db45e482303a20e56f2db667a9d9c54ac7e7; 9030aaf9bf0a1eee47a154c316c789e959638b0f up to, but not including, 7958c1bf5b03c6f1f58e724dbdec93f8f60b96fc; 9030aaf9bf0a1eee47a154c316c789e959638b0f up to, but not including, cda4672da1c26835dcbd7aec2bfed954eda9b5ef; 2.6.348180d0c27b93a6eb60da1b08ea079e3926328214, 70e329b440762390258a6fe8c0de93c9fdd56c77, f3f98d7d84b31828004545e29fd7262b9f444139, ae20db45e482303a20e56f2db667a9d9c54ac7e7, 7958c1bf5b03c6f1f58e724dbdec93f8f60b96fc, cda4672da1c26835dcbd7aec2bfed954eda9b5ef
LinuxLinux Kernelbefore 5.10.210; 5.11 up to, but not including, 5.15.149; 5.16 up to, but not including, 6.1.79; 6.2 up to, but not including, 6.6.18; 6.7 up to, but not including, 6.7.6; 6.85.10.210, 5.15.149, 6.1.79, 6.6.18, 6.7.6
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
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: ceph: prevent use-after-free in encode_cap_msg() In fs/ceph/caps.c, in encode_cap_msg(), "use after free" error was caught by KASAN at this line - 'ceph_buffer_get(arg->xattr_buf);'. This implies before the refcount could be increment here, it was freed. In same file, in "handle_cap_grant()" refcount is decremented by this line - 'ceph_buffer_put(ci->i_xattrs.blob);'. It appears that a race occurred and resource was freed by the latter line before the former line could increment it. encode_cap_msg() is called by __send_cap() and __send_cap() is called by ceph_check_caps() after calling __prep_cap(). __prep_cap() is where arg->xattr_buf is assigned to ci->i_xattrs.blob. This is the spot where the refcount must be increased to prevent "use after free" error.

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.