CVE-2024-40901: scsi: mpt3sas: Avoid test/set_bit() operating in non-allocated memory
In the Linux kernel, the following vulnerability has been resolved:
scsi: mpt3sas: Avoid test/setbit() operating in non-allocated memory
The Linux kernel CVE team has assigned CVE-2024-40901 to this issue.
Upstream advisory: https://lore.kernel.org/linux-cve-announce/2024071207-CVE-2024-40901-05c4@gregkh/T
Other sources
In the Linux kernel, the following vulnerability has been resolved:
scsi: mpt3sas: Avoid test/setbit() operating in non-allocated memory
There is a potential out-of-bounds access when using testbit() on a single word. The testbit() and setbit() functions operate on long values, and when testing or setting a single word, they can exceed the word boundary. KASAN detects this issue and produces a dump:
BUG: KASAN: slab-out-of-bounds in scsihadddevice.constprop.0 (./arch/x86/include/asm/bitops.h:60 ./include/asm-generic/bitops/instrumented-atomic.h:29 drivers/scsi/mpt3sas/mpt3sasscsih.c:7331) mpt3sas
Write of size 8 at addr ffff8881d26e3c60 by task kworker/u1536:2/2965
For full log, please look at [1].
Make the allocation at least the size of sizeof(unsigned long) so that setbit() and testbit() have sufficient room for read/write operations without overwriting unallocated memory.
[1] Link: https://lore.kernel.org/all/ZkNcALr3W3KGYYJG@gmail.com/
— NVD
Linux Kernel is vulnerable to a denial of service, caused by out-of-bounds access when using testbit() in mpt3sasbase.c. A local authenticated attacker could exploit this vulnerability to cause a denial of service.
— IBM
Affected Software
Remediation
Event History
Frequently Asked Questions
What is the severity of CVE-2024-40901?
CVE-2024-40901 has been assigned a severity rating that indicates a high potential for impact on system integrity and performance.
How do I fix CVE-2024-40901?
To resolve CVE-2024-40901, update the Linux kernel to a secure version as specified in the affected software list.
What systems are affected by CVE-2024-40901?
CVE-2024-40901 affects specific versions of the Linux kernel including 4.19.317, 5.4.279, and all listed subsequent versions.
Is CVE-2024-40901 publicly known?
Yes, CVE-2024-40901 is publicly documented and was addressed by the Linux kernel security community.
What does the vulnerability CVE-2024-40901 involve?
CVE-2024-40901 concerns a memory handling issue in the SCSI mpt3sas driver of the Linux kernel.