CVE-2024-38543: lib/test_hmm.c: handle src_pfns and dst_pfns allocation failure
In the Linux kernel, the following vulnerability has been resolved:
lib/test_hmm.c: handle src_pfns and dst_pfns allocation failure
The kcalloc() in dmirror_device_evict_chunk() will return null if the
physical memory has run out. As a result, if src_pfns or dst_pfns is
dereferenced, the null pointer dereference bug will happen.
Moreover, the device is going away. If the kcalloc() fails, the pages
mapping a chunk could not be evicted. So add a __GFP_NOFAIL flag in
kcalloc().
Finally, as there is no need to have physically contiguous memory, Switch
kcalloc() to kvcalloc() in order to avoid failing allocations.
Security readout for executives and security teams
Plain-English summary
This Linux kernel issue is a reliability flaw: under physical memory pressure, allocation failure in test_hmm code can lead to a null pointer dereference. The public record does not provide CVSS, active exploitation evidence, or a remote attack path. Treat it as patch-tracking work for Linux assets, not an emergency absent vendor-specific impact.
Executive priority
Moderate operational priority unless a vendor advisory raises severity for your environment. Patch during normal Linux maintenance cycles, with faster action for custom or exposed kernel deployments where affected versions are confirmed.
Technical view
In lib/test_hmm.c, dmirror_device_evict_chunk() used kcalloc() for src_pfns and dst_pfns. If allocation returned NULL and the pointers were dereferenced, a null pointer dereference could occur. The resolution adds no-fail allocation behavior and switches to kvcalloc() because physically contiguous memory is unnecessary.
Likely exposure
Exposure is limited to Linux systems running affected kernel versions or unpatched downstream kernels. The bundle lists Linux as affected and provides stable kernel commits, but does not map distribution packages or runtime prerequisites.
Exploitation context
The source bundle does not indicate active exploitation, KEV listing, exploit availability, privilege requirements, or a remote vector. The described condition depends on allocation failure during device eviction behavior in test_hmm code.
Researcher notes
Evidence is incomplete for severity and exploitability. The available record supports a kernel null pointer dereference from allocation failure and identifies stable fix commits, but not attack preconditions, affected configurations beyond Linux versions, or distribution package status.
Mitigation direction
Update Linux kernels through vendor-supported channels when fixes are available.
Verify downstream distribution advisories for backported stable commits.
Prioritize systems using affected kernel lines listed in the CVE record.
Do not deploy custom kernels missing the referenced stable fixes.
Validation and detection
Inventory Linux kernel versions across production and development assets.
Compare installed kernels with the CVE record and distribution advisories.
Confirm patched source includes the kvcalloc allocation change.
Record whether vendor kernels backported the referenced stable commits.
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-38543 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.