CVE Database›Document archive›CVE-2023-53376

CVE-2023-53376

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

Loading…

Severity

Moderate

Red Hat Product Security

6

CVSS 3.1

Review impact separately from score.

Published · September 18, 2025

Updated · October 30, 2026

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.

Statement

This vulnerability is rated as having a Moderate impact because triggering the out-of-bounds memory access requires local administrative privileges and is restricted to systems utilizing Broadcom MPI3 storage hardware. The flaw stems from mismatched unit calculations for internal driver bitmaps during controller management events such as firmware downloads, potentially leading to a kernel crash or memory corruption. Deployments that do not use this specific storage hardware or that do not load the mpi3mr driver are not affected.

CVSS score applicability

The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.

Mitigation

No mitigation is specified in collected source.

CVSS / CWE

CVSS 3.1 · 6
CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:L/I:H/A:H

CWE-131 · Incorrect Calculation of Buffer Size