{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2024-40901","id":"CVE-2024-40901","title":"scsi: mpt3sas: Avoid test/set_bit() operating in non-allocated memory","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nscsi: mpt3sas: Avoid test/set_bit() operating in non-allocated memory\n\nThere is a potential out-of-bounds access when using test_bit() on a single\nword. The test_bit() and set_bit() functions operate on long values, and\nwhen testing or setting a single word, they can exceed the word\nboundary. KASAN detects this issue and produces","descriptionLong":"In the Linux kernel, the following vulnerability has been resolved:\n\nscsi: mpt3sas: Avoid test/set_bit() operating in non-allocated memory\n\nThere is a potential out-of-bounds access when using test_bit() on a single\nword. The test_bit() and set_bit() functions operate on long values, and\nwhen testing or setting a single word, they can exceed the word\nboundary. KASAN detects this issue and produces a dump:\n\n\t BUG: KASAN: slab-out-of-bounds in _scsih_add_device.constprop.0 (./arch/x86/include/asm/bitops.h:60 ./include/asm-generic/bitops/instrumented-atomic.h:29 drivers/scsi/mpt3sas/mpt3sas_scsih.c:7331) mpt3sas\n\n\t Write of size 8 at addr ffff8881d26e3c60 by task kworker/u1536:2/2965\n\nFor full log, please look at [1].\n\nMake the allocation at least the size of sizeof(unsigned long) so that\nset_bit() and test_bit() have sufficient room for read/write operations\nwithout overwriting unallocated memory.\n\n[1] Link: https://lore.kernel.org/all/ZkNcALr3W3KGYYJG@gmail.com/","published":"2024-07-12T12:20:42.859Z","updated":"2026-10-28T02:30:33.998715276Z","reserved":"2024-07-12T12:17:45.579Z","status":"Modified","rejected":false,"assigner":"Linux","metric":{"version":"3.1","score":7.3,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:H/A:H","rating":"high","source":"Linux"},"metrics":[{"version":"3.1","score":7.3,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:H/A:H","rating":"high","source":"Linux"},{"version":"3.1","score":7.3,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:H/A:H","rating":"high","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67"},{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","rating":"high","source":"NVD"},{"version":"3.1","score":7.3,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:H/A:H","rating":"high","source":"OSV"}],"rating":"high","products":["Linux"],"affectedProducts":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"c696f7b83edeac804e898952058089143f49ca0a","lessThan":"e9bce7c751f6d6c7be88c0bc081a66aaf61a23ee","status":"affected","versionType":"git"},{"version":"c696f7b83edeac804e898952058089143f49ca0a","lessThan":"19649e49a6df07cd2e03e0a11396fd3a99485ec2","status":"affected","versionType":"git"},{"version":"c696f7b83edeac804e898952058089143f49ca0a","lessThan":"0081d2b3ae0a17a86b8cc0fa3c8bdc54e233ba16","status":"affected","versionType":"git"},{"version":"c696f7b83edeac804e898952058089143f49ca0a","lessThan":"521f333e644c4246ca04a4fc4772edc53dd2a801","status":"affected","versionType":"git"},{"version":"c696f7b83edeac804e898952058089143f49ca0a","lessThan":"46bab2bcd771e725ff5ca3a68ba68cfeac45676c","status":"affected","versionType":"git"},{"version":"c696f7b83edeac804e898952058089143f49ca0a","lessThan":"9079338c5a0d1f1fee34fb1c9e99b754efe414c5","status":"affected","versionType":"git"},{"version":"c696f7b83edeac804e898952058089143f49ca0a","lessThan":"18abb5db0aa9b2d48f7037a88b41af2eef821674","status":"affected","versionType":"git"},{"version":"c696f7b83edeac804e898952058089143f49ca0a","lessThan":"4254dfeda82f20844299dca6c38cbffcfd499f41","status":"affected","versionType":"git"}],"platforms":[]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"4.10","status":"affected"},{"version":"0","lessThan":"4.10","status":"unaffected","versionType":"semver"},{"version":"4.19.317","lessThanOrEqual":"4.19.*","status":"unaffected","versionType":"semver"},{"version":"5.4.279","lessThanOrEqual":"5.4.*","status":"unaffected","versionType":"semver"},{"version":"5.10.221","lessThanOrEqual":"5.10.*","status":"unaffected","versionType":"semver"},{"version":"5.15.162","lessThanOrEqual":"5.15.*","status":"unaffected","versionType":"semver"},{"version":"6.1.95","lessThanOrEqual":"6.1.*","status":"unaffected","versionType":"semver"},{"version":"6.6.35","lessThanOrEqual":"6.6.*","status":"unaffected","versionType":"semver"},{"version":"6.9.6","lessThanOrEqual":"6.9.*","status":"unaffected","versionType":"semver"},{"version":"6.10","lessThanOrEqual":"*","status":"unaffected","versionType":"original_commit_for_fix"}],"platforms":[]}],"packages":[],"cwes":["CWE-787"],"aliases":[],"references":[{"url":"https://git.kernel.org/stable/c/e9bce7c751f6d6c7be88c0bc081a66aaf61a23ee","tags":["x_transferred","Mailing List","Patch","web"]},{"url":"https://git.kernel.org/stable/c/19649e49a6df07cd2e03e0a11396fd3a99485ec2","tags":["x_transferred","Mailing List","Patch","web"]},{"url":"https://git.kernel.org/stable/c/0081d2b3ae0a17a86b8cc0fa3c8bdc54e233ba16","tags":["x_transferred","Mailing List","Patch","web"]},{"url":"https://git.kernel.org/stable/c/521f333e644c4246ca04a4fc4772edc53dd2a801","tags":["x_transferred","Mailing List","Patch","web"]},{"url":"https://git.kernel.org/stable/c/46bab2bcd771e725ff5ca3a68ba68cfeac45676c","tags":["x_transferred","Mailing List","Patch","web"]},{"url":"https://git.kernel.org/stable/c/9079338c5a0d1f1fee34fb1c9e99b754efe414c5","tags":["x_transferred","Mailing List","Patch","web"]},{"url":"https://git.kernel.org/stable/c/18abb5db0aa9b2d48f7037a88b41af2eef821674","tags":["x_transferred","Mailing List","Patch","web"]},{"url":"https://git.kernel.org/stable/c/4254dfeda82f20844299dca6c38cbffcfd499f41","tags":["x_transferred","Mailing List","Patch","web"]},{"url":"https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html","tags":["web"]},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-398330.html","tags":["web"]},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-355557.html","tags":["web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/40xxx/CVE-2024-40901.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-40901","tags":["advisory"]},{"url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","tags":["package"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial"},"epss":0.00313,"epssPercentile":0.24677,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2024-40901","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-40901","ok":true,"note":"Modified"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2024-40901","ok":true,"note":"0 packages"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2024-40901","ok":true,"note":"scored 2026-11-18"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}