CVE-2026-139723: scsi: mpi3mr: Fix buffer overflow in the BSG target device map
In the Linux kernel, the following vulnerability has been resolved:
scsi: mpi3mr: Fix buffer overflow in the BSG target device map
The size of the target device map buffer is held in a u16 while the number of devices it is derived from is not bounded to fit. With enough devices the size wraps, a short buffer is allocated, and the loop that fills it writes past the end.
Do the calculation in sizet.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
Calculate the target device map buffer size in size_t rather than u16.
Event History
Frequently Asked Questions
What condition is required to trigger the overflow?
The mpi3mr BSG target device map must be derived from enough devices that its size calculation exceeds the capacity of the u16 used to store it. The resulting wrap causes allocation of a buffer that is too small.
What happens after the size calculation wraps?
A short target device map buffer is allocated, and the loop that populates the map writes beyond that buffer's end.
Are affected kernel versions or a device-count threshold provided?
No affected version range or exact number of devices needed to trigger the wrap is provided.