| CVE |
Vendors |
Products |
Updated |
CVSS v3.1 |
| In the Linux kernel, the following vulnerability has been resolved:
scsi: mpi3mr: Fix out-of-bounds read when copying BSG MPI requests
The MPI request is copied out of the caller supplied payload without first
checking that the requested amount is actually present, so the copy can
read past the end of the payload buffer.
Check the range before copying. |
| In the Linux kernel, the following vulnerability has been resolved:
scsi: mpi3mr: Fix I/O block counter leak on admin request post failure
The per device I/O block counter is raised before a task management request
is posted and only lowered once the request completes. If the post itself
fails the counter stays raised and I/O to that device remains blocked.
Lower it on the failure path as well. |
| In the Linux kernel, the following vulnerability has been resolved:
scsi: mpi3mr: Fix target device reference leak in BSG task management
The target device lookup takes a reference, but it is only dropped inside a
branch that also requires the SCSI target data to be set up. When it is
not, the reference is leaked.
Drop the reference whenever the lookup succeeded. |
| In the Linux kernel, the following vulnerability has been resolved:
scsi: mpi3mr: Fix buffer overflow when caching log data
Each log data slot holds a header followed by the payload, but the copy was
sized against the whole slot and so wrote one header length past the end of
it. Subtracting the header on its own is not enough either, because the
entry size is derived from the controller reply size and can be smaller
than the header.
Work out the payload room first and clamp the copy to it. |
| In the Linux kernel, the following vulnerability has been resolved:
scsi: mpi3mr: Fix out-of-bounds reply frame access
The reply frame address reported on completion is only checked against the
start and the end of the pool. An address near the top can pass the check
while leaving less than a full frame, and an unaligned one resolves into
the middle of a frame instead of the start of one.
Require a whole frame to fit and the address to be frame aligned. |
| In the Linux kernel, the following vulnerability has been resolved:
scsi: mpi3mr: Fix out-of-bounds sense buffer access
The sense buffer address reported on completion is turned into a virtual
address with no range check, so an address outside the pool resolves to
memory that does not belong to it.
Check that it lies within the pool and is correctly aligned. |
| In the Linux kernel, the following vulnerability has been resolved:
scsi: mpi3mr: Fix out-of-bounds bitmap access during device removal
Device handles reported by the controller are used to index the remove
pending bitmap and to build a task management request without being
compared against the maximum handle the controller reported.
Check the handle before using it. |
| In the Linux kernel, the following vulnerability has been resolved:
scsi: mpi3mr: Fix target device reference leak in device removal handshake
The device removal handshake looks up the target device to update its state
but never drops the reference that the lookup takes.
Drop it once the state has been updated. |
| In the Linux kernel, the following vulnerability has been resolved:
scsi: mpi3mr: Fix out-of-bounds read in SAS topology change events
The number of entries in a SAS topology change event is used to walk the
entry array without being compared against the amount of event data that
was received, so the walk can run past the end of the buffer.
Work out how many entries the payload can hold and skip the event if it
claims more. |
| In the Linux kernel, the following vulnerability has been resolved:
scsi: mpi3mr: Fix out-of-bounds read of event data
The event data length from the reply is used as is, both when caching log
data and when sizing the buffer handed to the bottom half. A length larger
than the frame makes both of them read past the end of it.
Clamp the length to what the frame can hold. |
| In the Linux kernel, the following vulnerability has been resolved:
scsi: mpi3mr: Fix out-of-bounds phy array access on link change
The phy number that comes with a link change is used to index the node's
phy array without being compared against the number of phys allocated for
that node.
Check it first. |
| 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 size_t. |
| In the Linux kernel, the following vulnerability has been resolved:
scsi: mpi3mr: Fix out-of-bounds read in PCIe topology change events
The number of entries in a PCIe topology change event is used to walk the
entry array without being compared against the amount of event data that
was received.
Bound the entry count to the received event data before use. |
| In the Linux kernel, the following vulnerability has been resolved:
scsi: mpi3mr: zero out diagnostic buffer status memory
Memory allocated for the BSG diagnostic buffer status is not zeroed before
it is copied back to user space. Several fields in this structure are
reserved and never written by the driver. Use kzalloc() instead of
kmalloc() to zero out the allocated memory. |
| In the Linux kernel, the following vulnerability has been resolved:
scsi: mpi3mr: Fix use-after-free of the firmware event workqueue
The enqueue path reads the workqueue pointer before taking the event lock,
while the remove path clears that pointer and destroys the workqueue while
holding it. The enqueue can therefore reach queue_work() after the
workqueue is gone.
Move the check inside the lock. |
| In the Linux kernel, the following vulnerability has been resolved:
scsi: mpi3mr: Fix NULL pointer dereference on PCI error recovery
On a frozen PCI channel the driver unmaps the register window and frees the
interrupts, but leaves the firmware event workqueue running. An event
handler that is already in flight can still reach the register window after
it has been unmapped.
Stop event processing and drain the queue first, and start it again when
the channel resumes. |
| In the Linux kernel, the following vulnerability has been resolved:
usb: image: microtek: stop SG processing after transfer errors
When an SG URB completes with an error, mts_do_sg() calls
mts_transfer_cleanup(), which completes the SCSI command through
scsi_done(). However, the callback continues advancing the scatterlist
and may submit another URB for a command that has already been
completed.
Return immediately after the cleanup so that no further processing is
performed on the completed command. |
| In the Linux kernel, the following vulnerability has been resolved:
usb-storage: alauda: check the return value of alauda_read_map()
alauda_ensure_map_for_zone() ignores the value alauda_read_map()
returns. On failure lba_to_pba[zone] and pba_to_lba[zone] are left NULL,
and both callers dereference them immediately:
pba = MEDIA_INFO(us).lba_to_pba[zone][lba_offset];
alauda_read_map() returns USB_STOR_TRANSPORT_ERROR when either kcalloc()
fails or an alauda_get_redu_data() transfer fails, so one failed bulk
transfer is enough to reach the NULL dereference.
Return that value from alauda_ensure_map_for_zone() and check it in
alauda_read_data() and alauda_write_lba(). |
| In the Linux kernel, the following vulnerability has been resolved:
usb-storage: alauda: fix out-of-bounds zone index
MEDIA_INFO(us).lba_to_pba and .pba_to_lba are arrays of num_zones
pointers, allocated by kcalloc() in alauda_init_media().
alauda_ensure_map_for_zone() reads lba_to_pba[zone] and
pba_to_lba[zone], and when either is NULL alauda_read_map() writes a
pointer back to both. Two separate errors let zone reach num_zones, one
element past the end.
max_lba is capacity >> (blockshift + pageshift), which counts physical
blocks, but zone is lba / uzonesize and uzonesize is 125/128 of
zonesize. On a 16 MB card (alauda_card_ids id 0x73) num_zones is 1 and
uzonesize is 1000, so lba 1000 to 1023 pass the bounds check and index
element 1 of a one-element array.
alauda_read_data() also calls alauda_ensure_map_for_zone() before it
compares lba against max_lba, so any larger lba is used as an index
before the check rejects it. alauda_write_data() already checks first.
Bound lba by num_zones * uzonesize on both paths and move the read
side's call below the check. alauda_transport() reports
num_zones * uzonesize * blocksize for READ_CAPACITY, so the new bound is
exactly the range the device advertises and no block becomes
unreachable.
sd never issues an lba past the reported capacity; an SG_IO READ_10 can. |
| In the Linux kernel, the following vulnerability has been resolved:
firmware: arm_scmi: Protect xfer->async_done with xfer->lock
Asynchronous SCMI commands are completed by a delayed response. The RX
path signals the response with complete(xfer->async_done). Unlike
xfer->done, xfer->async_done is a pointer to a completion owned by
whoever is waiting for the delayed response, and it stays valid only for
as long as that waiter is still waiting. In do_xfer_with_response() it
is a DECLARE_COMPLETION_ONSTACK() in the caller's stack frame.
Nothing serialises the RX path against a waiter that gives up on a
timeout. scmi_msg_response_validate() does read xfer->async_done
under xfer->lock, and documents that as a requirement, but the lock is
dropped again before scmi_handle_response() dereferences the pointer,
and neither the arming nor the disarming side takes it at all. So a
delayed response arriving just as the wait times out can be signalled
on a completion that is already gone:
waiter RX path (IRQ context)
------ ---------------------
do_xfer_with_response():
xfer->async_done = &async_response
do_xfer(xfer)
wait_for_completion_timeout(xfer->async_done, tmo)
/* returns 0, gives up */
/* response receive interrupt */
scmi_handle_response():
scmi_xfer_command_acquire()
lock xfer->lock
validate: async_done != NULL
unlock xfer->lock
xfer->async_done = NULL
return -ETIMEDOUT
/* async_response goes out of scope */
complete(xfer->async_done)
That last complete() has two possible bad outcomes: it either dereferences
the NULL just stored by the waiter or - if that store is not yet visible
on the RX CPU - it takes a lock and writes to a stack frame that the
waiter may already have returned from.
Fix this by making xfer->lock cover xfer->async_done end-to-end. Add
helpers to arm and disarm it under the lock, use them on both the regular
and the raw paths, and have the RX path read and signal the completion
under that same lock. A waiter that is timing out then either completes
its disarm before the RX path looks, in which case the delayed response is
dropped, or blocks in the disarm until the RX path is done with the
completion, in which case the completion is still alive.
Log the dropped case, so every path where a delayed response that was
matched to a pending xfer and then discarded produces an error. (This is
the same treatment scmi_msg_response_validate() already gives a
delayed response that arrives after the waiter has disarmed the xfer) |