# CVE-2023-53376: scsi: mpi3mr: Use number of bits to manage bitmap sizes

- Severity: High 7.8 (CVSS:3.1, scored by Linux) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.17%, higher than 6% of CVEs (2026-12-02)
- Published: 2025-09-18T13:33:22.364Z
- Modified: 2026-08-05T09:13:44.095Z
- Weaknesses: CWE-125
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: Linux

## Description

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

scsi: mpi3mr: Use number of bits to manage bitmap sizes

To allocate bitmaps, the mpi3mr driver calculates sizes of bitmaps using
byte as unit. However, bitmap helper functions assume that bitmaps are
allocated using unsigned long as unit. This gap causes memory access beyond
the bitmap sizes and results in "BUG: KASAN: slab-out-of-bounds".  The BUG
was observed at firmware download to eHBA-9600. Call trace indicated that
the out-of-bounds access happened in find_first_zero_bit() called from
mpi3mr_send_event_ack() for miroc->evtack_cmds_bitmap.

To fix the BUG, do not use bytes to manage bitmap sizes. Instead, use
number of bits, and call bitmap helper functions which take number of bits
as arguments. For memory allocation, call bitmap_zalloc() instead of
kzalloc() and krealloc(). For memory free, call bitmap_free() instead of
kfree(). For zero clear, call bitmap_clear() instead of memset().

Remove three fields for bitmap byte sizes in struct scmd_priv which are no
longer required. Replace the field dev_handle_bitmap_sz with
dev_handle_bitmap_bits to keep number of bits of removepend_bitmap across
resize.

(As written by CVE List.)

## Affected

- Linux Linux: from 824a156633dfdb0e17979a0d0bb2c757d1bb949c before 6a675a6d57d31da43d8da576465c1cd5d5b0bd3d; from 824a156633dfdb0e17979a0d0bb2c757d1bb949c before 8ac713d2e9845e9234bb12ae5903040685d5aff9; from 824a156633dfdb0e17979a0d0bb2c757d1bb949c before 339e61565f81a6534afdc18fd854b2e2628bf5db; 5.14 (not affected: before 5.14; from 6.1.18 up to 6.1.*; from 6.2.5 up to 6.2.*; from 6.3 up to *)
- linux linux_kernel: from 5.14 before 6.1.18; from 6.2 before 6.2.5

## Every score

- Linux: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- CISA-ADP: CVSS:3.1 7.1 High `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H`
- NVD: CVSS:3.1 7.1 High `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H`

## References

- <https://git.kernel.org/stable/c/6a675a6d57d31da43d8da576465c1cd5d5b0bd3d> (patch)
- <https://git.kernel.org/stable/c/8ac713d2e9845e9234bb12ae5903040685d5aff9> (patch)
- <https://git.kernel.org/stable/c/339e61565f81a6534afdc18fd854b2e2628bf5db> (patch)

## Sources

- CVE List: [CVE-2023-53376](https://www.cve.org/CVERecord?id=CVE-2023-53376), CVE Terms of Use, modified 2026-08-05
- NVD: [CVE-2023-53376](https://nvd.nist.gov/vuln/detail/CVE-2023-53376), Public domain, modified 2026-08-04

---

Page: https://cve.day/CVE-2023-53376 · Whole record: https://cve.day/CVE-2023-53376.json · Rebuilt by cve.day 2026-11-25T22:58:34.857Z
