CVE-2024-34777

Source
https://cve.org/CVERecord?id=CVE-2024-34777
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-34777.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2024-34777
Downstream
Related
Published
2024-06-21T11:18:45.481Z
Modified
2026-03-14T12:33:42.672650Z
Summary
dma-mapping: benchmark: fix node id validation
Details

In the Linux kernel, the following vulnerability has been resolved:

dma-mapping: benchmark: fix node id validation

While validating node ids in mapbenchmarkioctl(), nodepossible() may be provided with invalid argument outside of [0,MAXNUMNODES-1] range leading to:

BUG: KASAN: wild-memory-access in mapbenchmarkioctl (kernel/dma/mapbenchmark.c:214) Read of size 8 at addr 1fffffff8ccb6398 by task dmamapbenchma/971 CPU: 7 PID: 971 Comm: dmamapbenchma Not tainted 6.9.0-rc6 #37 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996) Call Trace: <TASK> dumpstacklvl (lib/dumpstack.c:117) kasanreport (mm/kasan/report.c:603) kasancheckrange (mm/kasan/generic.c:189) variabletestbit (arch/x86/include/asm/bitops.h:227) [inline] archtestbit (arch/x86/include/asm/bitops.h:239) [inline] testbit at (include/asm-generic/bitops/instrumented-non-atomic.h:142) [inline] nodestate (include/linux/nodemask.h:423) [inline] mapbenchmarkioctl (kernel/dma/mapbenchmark.c:214) fullproxyunlockedioctl (fs/debugfs/file.c:333) _x64sysioctl (fs/ioctl.c:890) dosyscall64 (arch/x86/entry/common.c:83) entrySYSCALL64afterhwframe (arch/x86/entry/entry64.S:130)

Compare node ids with sane bounds first. NUMANONODE is considered a special valid case meaning that benchmarking kthreads won't be bound to a cpuset of a given node.

Found by Linux Verification Center (linuxtesting.org).

Database specific
{
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/34xxx/CVE-2024-34777.json",
    "cna_assigner": "Linux"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
65789daa8087e125927230ccb7e1eab13999b0cf
Fixed
35d31c8bd4722b107f5a2f5ddddce839de04b936
Fixed
c57874265a3c5206d7aece3793bb2fc9abcd7570
Fixed
34a816d8735f3924b74be8e5bf766ade1f3bd10b
Fixed
63e7e05a48a35308aeddd7ecccb68363a5988e87
Fixed
1ff05e723f7ca30644b8ec3fb093f16312e408ad

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-34777.json"