CVE-2024-39472: xfs: fix log recovery buffer allocation for the legacy h_size fixup
In the Linux kernel, the following vulnerability has been resolved:
xfs: fix log recovery buffer allocation for the legacy h_size fixup
Commit a70f9fe52daa ("xfs: detect and handle invalid iclog size set by
mkfs") added a fixup for incorrect h_size values used for the initial
umount record in old xfsprogs versions. Later commit 0c771b99d6c9
("xfs: clean up calculation of LR header blocks") cleaned up the log
reover buffer calculation, but stoped using the fixed up h_size value
to size the log recovery buffer, which can lead to an out of bounds
access when the incorrect h_size does not come from the old mkfs
tool, but a fuzzer.
Fix this by open coding xlog_logrec_hblks and taking the fixed h_size
into account for this calculation.
Security readout for executives and security teams
Plain-English summary
A flaw in Linux XFS log recovery can make the kernel access memory outside an allocated buffer when processing an invalid log header size. This could threaten system availability and data confidentiality. Exploitation requires local interaction with a problematic XFS filesystem; the supplied evidence does not show active exploitation.
Executive priority
Treat this as a high-priority kernel maintenance issue, especially where systems process external storage. Expedite patching for exposed XFS workflows. For ordinary managed servers with controlled storage, schedule prompt remediation while confirming vendor-specific affected and fixed versions. Current sources do not support an emergency response based on active exploitation.
Technical view
A prior XFS change corrected legacy log-header h_size values, but later recovery-buffer calculations stopped using that corrected value. A crafted or fuzzed invalid value can therefore produce an undersized buffer and an out-of-bounds access during log recovery. Referenced Linux stable commits correct the header-block calculation.
Likely exposure
Exposure is limited to systems running affected Linux kernel builds that use XFS and encounter an invalid log during recovery. Systems processing externally supplied disks, images, or removable media may face greater risk. The supplied version metadata is ambiguous, so distribution-specific package status must be verified.
Exploitation context
The CVSS vector describes a local, low-complexity issue requiring user interaction but no privileges, with potentially high confidentiality and availability impact. The bundle marks KEV false and provides no cited evidence of active exploitation. The triggering condition was demonstrated through fuzzing.
Researcher notes
The regression traces to commit 0c771b99d6c9, which calculated recovery-buffer header blocks without the corrected h_size. The fix open-codes that calculation using the adjusted value. The supplied affected-version entries are incomplete or ambiguous, including duplicated commit identifiers, so exact exposure requires git ancestry or distribution backport analysis.
Mitigation direction
Apply a vendor-supported kernel update containing the applicable referenced stable fix or backport.
Check distribution security guidance for the exact fixed kernel package and branch.
Prioritize systems that mount or recover externally supplied XFS filesystems.
Restrict handling of untrusted XFS volumes until the running kernel is remediated.
Validation and detection
Inventory running kernel versions and systems using XFS filesystems.
Confirm the running kernel contains the referenced fix or a documented vendor backport.
Compare installed kernel packages against applicable distribution security advisories.
Identify workflows accepting external disk images, removable media, or other XFS volumes.
Verify the remediated kernel is running, rather than merely installed.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cve · low confidence lookup
CVE-2024-39472 mapping review
Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.