diff options
| author | Milan P. Gandhi <mgandhi@redhat.com> | 2026-11-05 17:54:01 +0530 |
|---|---|---|
| committer | Martin K. Petersen (Oracle) <mkp@kernel.org> | 2026-11-08 22:36:12 -0500 |
| commit | e550f2b2b4aab4c5f12db89d04d8978ce4ed7b4e (patch) | |
| tree | ebf7ec662fe131621ac0fbbe6baaba5165e891ac /scripts/Makefile.thinlto | |
| parent | 08f08a6d49efc422258edba802faa4fc7677309e (diff) | |
| download | linux-next-e550f2b2b4aab4c5f12db89d04d8978ce4ed7b4e.tar.gz linux-next-e550f2b2b4aab4c5f12db89d04d8978ce4ed7b4e.zip | |
scsi: mpi3mr: Validate reply frame size bounds
Firmware provides reply_frame_size in dwords, which the driver multiplies
by 4 to compute facts.reply_sz (u16). If the reported size exceeds U16_MAX
/ 4, the multiplication overflows u16 before assignment, causing
under-allocated DMA reply buffers.
Furthermore, several paths assume a minimal reply frame size:
- logdata_entry_sz calculations underflow or hit zero when reply_sz <= 20
bytes, leading to zero-size allocations and divide-by-zero crashes.
- Unsolicited status descriptors and fixed replies (such as struct
mpi3_iounit_control_reply, 64 bytes) require at least 16 dwords.
Validate reply_frame_size in mpi3mr_issue_iocfacts() to ensure it is within
[16, U16_MAX / 4] dwords before processing facts data.
Fixes: 824a156633df ("scsi: mpi3mr: Base driver code")
Cc: stable@vger.kernel.org
Signed-off-by: Milan P. Gandhi <mgandhi@redhat.com>
Link: https://patch.msgid.link/20261105122401.266559-1-mgandhi@redhat.com
Signed-off-by: Martin K. Petersen (Oracle) <mkp@kernel.org>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
