PT-2024-27935

CVE-2024-38306

·

Published

2024-06-06

·

Updated

2026-10-09

Description by

CVSS 3.1
7.8
High
MetricsAV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Name of the Vulnerable Software and Affected Versions Linux kernel versions prior to 6.8
Description The Linux kernel has a vulnerability that can cause rare kernel crashes due to bad page status error messages. This issue is caused by a race condition between thread A allocating an extent buffer and thread B releasing a page, leading to a refcount underflow and eventually causing a BUG ON() on the page->mapping. The condition is not easy to hit and requires specific circumstances, such as the release being triggered for the middle page of an extent buffer. The vulnerability was introduced by a commit that changed the sequence of allocating a new extent buffer.
Recommendations To resolve this issue, update the Linux kernel to a version that includes the fix, which moves all the code requiring i private lock into attach eb folio to filemap(), ensuring proper lock protection. Additionally, an extra lockdep assert locked() has been added to prevent future problems. As a temporary workaround, consider disabling the alloc extent buffer() function until a patch is available. Restrict access to the vulnerable btrfs module to minimize the risk of exploitation. Avoid using the folio detach private() function in the affected API endpoint until the issue is resolved.
Exploitability
Exploit
Fix
Impacts
Vendors
Affected products
Related identifiers
USN-6999-1
USN-6999-2
USN-7004-1
USN-7005-1
USN-7005-2
USN-7008-1
USN-7029-1
Found an issue in the description? Have something to add? Feel free to write us 👾