CVE-2024-38543

lib/test_hmm.c: handle src_pfns and dst_pfns allocation failure

MEDIUM
5.5
CVSS Score
Published: June 19, 2024 at 01:35 PM UTC
Updated: June 17, 2026 at 07:40 AM UTC
1 product affected across 1 vendorLinux Kernel

Using Linux by Linux?

Get instant alerts when new vulnerabilities affect Linux - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
MEDIUM5.5
Exploit prediction
EPSS 0.2%
SSVC
No known exploit

Description

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.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

5.8 ≤ v < 6.1.935.8 ≤ v < 6.105.8 ≤ v < 6.6.335.8 ≤ v < 6.8.125.8 ≤ v < 6.9.36.2 ≤ v < 6.6.336.7 ≤ v < 6.8.126.9 ≤ v < 6.9.35.8b2ef9f5a5cb37643ca5def3516c546457074b882
Vendor states this is fixed in 1a21fdeea502658e315bd939409b755974f4fb64 (fixed)
Vendor states this is fixed in 3b20d18f475bd17309db640dbe7d7c7ebb5bc2bc (fixed)
Vendor states this is fixed in 65e528a69cb3ed4a286c45b4afba57461c8b5b33 (fixed)
Vendor states this is fixed in c2af060d1c18beaec56351cf9c9bcbbc5af341a3 (fixed)
Vendor states this is fixed in ce47e8ead9a72834cc68431d53f8092ce69bebb7 (fixed)
Vendor states this is fixed in 5.8 (unaffected)
Vendor states this is fixed in 6.1.93 (unaffected)
Vendor states this is fixed in 6.10 (unaffected)
Vendor states this is fixed in 6.6.33 (unaffected)
Vendor states this is fixed in 6.8.12 (unaffected)
Vendor states this is fixed in 6.9.3 (unaffected)

References (5)

Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/1a21fdeea502658e315bd939409b755974f4fb64
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/3b20d18f475bd17309db640dbe7d7c7ebb5bc2bc
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/65e528a69cb3ed4a286c45b4afba57461c8b5b33
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/c2af060d1c18beaec56351cf9c9bcbbc5af341a3
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/ce47e8ead9a72834cc68431d53f8092ce69bebb7

SSVC — Action Prioritization

SSVCNo known exploitNot automatablePartial impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

Attack Vector
LOCAL
Complexity
LOW
Privileges
LOW
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
NONE
Integrity
NONE
Availability
HIGH
Vector?

Quick Info

StatusMODIFIED
CWE
CWE-476

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card