CyberSecBulletin
CVE-2024-38610NVD status: Modified

Linux: Use After Free

CVE-2024-38610 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 5c6705aa47b5b78d7ad36fea832bb69caa5bf49a, afeb0e69627695f759fc73c39c1640dbf8649b32, e873f36ec890bece26ecce850e969917bceebbb6 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 5c6705aa47b5b78d7ad36fea832bb69caa5bf49a or afeb0e69627695f759fc73c39c1640dbf8649b32 or e873f36ec890bece26ecce850e969917bceebbb6 or 4c4ba3cf3a15ccfbaf787d0296fa42cdb00da9b4, whichever matches your release line, or a later version.
  2. Update Linux Kernel to 5.15.161 or 5.17 or 6.1.93 or 6.6.33, whichever matches your release line, or a later version.

Affected products and versions

VendorProductAffected versionsFixed in
LinuxLinuxb9c43aa0b18da5619aac347d54cb67fe30d1f884 up to, but not including, 5c6705aa47b5b78d7ad36fea832bb69caa5bf49a; 8a6e85f75a83d16a71077e41f2720c691f432002 up to, but not including, afeb0e69627695f759fc73c39c1640dbf8649b32; 8a6e85f75a83d16a71077e41f2720c691f432002 up to, but not including, e873f36ec890bece26ecce850e969917bceebbb6; 8a6e85f75a83d16a71077e41f2720c691f432002 up to, but not including, 4c4ba3cf3a15ccfbaf787d0296fa42cdb00da9b4; 8a6e85f75a83d16a71077e41f2720c691f432002 up to, but not including, 2c8d6e24930b8ef7d4a81787627c559ae0e0d3bb; 8a6e85f75a83d16a71077e41f2720c691f432002 up to, but not including, 3d6586008f7b638f91f3332602592caa8b00b559; 149d5fb7e0124c3763e92edd1fde19417f4d2d09; 02098ac42b7ff055ec72cd083ee1eb0a23481a19; and 4 more ranges5c6705aa47b5b78d7ad36fea832bb69caa5bf49a, afeb0e69627695f759fc73c39c1640dbf8649b32, e873f36ec890bece26ecce850e969917bceebbb6, 4c4ba3cf3a15ccfbaf787d0296fa42cdb00da9b4, 2c8d6e24930b8ef7d4a81787627c559ae0e0d3bb, 3d6586008f7b638f91f3332602592caa8b00b559
LinuxLinux Kernel5.15.33 up to, but not including, 5.15.161; 5.16.19 up to, but not including, 5.17; 5.17.2 up to, but not including, 6.1.93; 6.2 up to, but not including, 6.6.33; 6.7 up to, but not including, 6.8.12; 6.9 up to, but not including, 6.9.35.15.161, 5.17, 6.1.93, 6.6.33, 6.8.12, 6.9.3

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: drivers/virt/acrn: fix PFNMAP PTE checks in acrn_vm_ram_map() Patch series "mm: follow_pte() improvements and acrn follow_pte() fixes". Patch #1 fixes a bunch of issues I spotted in the acrn driver. It compiles, that's all I know. I'll appreciate some review and testing from acrn folks. Patch #2+#3 improve follow_pte(), passing a VMA instead of the MM, adding more sanity checks, and improving the documentation. Gave it a quick test on x86-64 using VM_PAT that ends up using follow_pte(). This patch (of 3): We currently miss handling various cases, resulting in a dangerous follow_pte() (previously follow_pfn()) usage. (1) We're not checking PTE write permissions. Maybe we should simply always require pte_write() like we do for pin_user_pages_fast(FOLL_WRITE)? Hard to tell, so let's check for ACRN_MEM_ACCESS_WRITE for now. (2) We're not rejecting refcounted pages. As we are not using MMU notifiers, messing with refcounted pages is dangerous and can result in use-after-free. Let's make sure to reject them. (3) We are only looking at the first PTE of a bigger range. We only lookup a single PTE, but memmap->len may span a larger area. Let's loop over all involved PTEs and make sure the PFN range is actually contiguous. Reject everything else: it couldn't have worked either way, and rather made use access PFNs we shouldn't be accessing.

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.