CyberSecBulletin
CVE-2024-56619NVD status: Modified

Linux: Use After Free

CVE-2024-56619 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 09d6d05579fd46e61abf6e457bb100ff11f3a9d3, e3732102a9d638d8627d14fdf7b208462f0520e0, 48eb6e7404948032bbe811c5affbe39f6b316951 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.21% 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 09d6d05579fd46e61abf6e457bb100ff11f3a9d3 or e3732102a9d638d8627d14fdf7b208462f0520e0 or 48eb6e7404948032bbe811c5affbe39f6b316951 or 5af8366625182f01f6d8465c9a3210574673af57, whichever matches your release line, or a later version.
  2. Update Linux Kernel to 5.4.287 or 5.10.231 or 5.15.174 or 6.1.120, whichever matches your release line, or a later version.

Affected products and versions

VendorProductAffected versionsFixed in
LinuxLinux2ba466d74ed74f073257f86e61519cb8f8f46184 up to, but not including, 09d6d05579fd46e61abf6e457bb100ff11f3a9d3; 2ba466d74ed74f073257f86e61519cb8f8f46184 up to, but not including, e3732102a9d638d8627d14fdf7b208462f0520e0; 2ba466d74ed74f073257f86e61519cb8f8f46184 up to, but not including, 48eb6e7404948032bbe811c5affbe39f6b316951; 2ba466d74ed74f073257f86e61519cb8f8f46184 up to, but not including, 5af8366625182f01f6d8465c9a3210574673af57; 2ba466d74ed74f073257f86e61519cb8f8f46184 up to, but not including, c3afea07477baccdbdec4483f8d5e59d42a3f67f; 2ba466d74ed74f073257f86e61519cb8f8f46184 up to, but not including, 31f7b57a77d4c82a34ddcb6ff35b5aa577ef153e; 2ba466d74ed74f073257f86e61519cb8f8f46184 up to, but not including, 985ebec4ab0a28bb5910c3b1481a40fbf7f9e61d; 2.6.3009d6d05579fd46e61abf6e457bb100ff11f3a9d3, e3732102a9d638d8627d14fdf7b208462f0520e0, 48eb6e7404948032bbe811c5affbe39f6b316951, 5af8366625182f01f6d8465c9a3210574673af57, c3afea07477baccdbdec4483f8d5e59d42a3f67f, 31f7b57a77d4c82a34ddcb6ff35b5aa577ef153e
LinuxLinux Kernel2.6.30 up to, but not including, 5.4.287; 5.5 up to, but not including, 5.10.231; 5.11 up to, but not including, 5.15.174; 5.16 up to, but not including, 6.1.120; 6.2 through 6.6.66; 6.7 through 6.12.5; 6.135.4.287, 5.10.231, 5.15.174, 6.1.120

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 CISA (ADP).

Official description

In the Linux kernel, the following vulnerability has been resolved: nilfs2: fix potential out-of-bounds memory access in nilfs_find_entry() Syzbot reported that when searching for records in a directory where the inode's i_size is corrupted and has a large value, memory access outside the folio/page range may occur, or a use-after-free bug may be detected if KASAN is enabled. This is because nilfs_last_byte(), which is called by nilfs_find_entry() and others to calculate the number of valid bytes of directory data in a page from i_size and the page index, loses the upper 32 bits of the 64-bit size information due to an inappropriate type of local variable to which the i_size value is assigned. This caused a large byte offset value due to underflow in the end address calculation in the calling nilfs_find_entry(), resulting in memory access that exceeds the folio/page size. Fix this issue by changing the type of the local variable causing the bit loss from "unsigned int" to "u64". The return value of nilfs_last_byte() is also of type "unsigned int", but it is truncated so as not to exceed PAGE_SIZE and no bit loss occurs, so no change is required.

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.