mirror of
https://github.com/torvalds/linux.git
synced 2026-09-22 12:44:03 +02:00
Bluetooth: btintel_pcie: fix off-by-one bounds check in RX submit
btintel_pcie_submit_rx() used frbd_index > rxq->count to guard the
FRBD array access, allowing frbd_index == rxq->count to pass through
and index one element past the end of the array. Change the check to
>= rxq->count so every out-of-range index is rejected.
This issue was reported by Claude Mythos.
Fixes: c2b636b3f7 (Bluetooth: btintel_pcie: Add support for PCIe transport)
Signed-off-by: Sai Teja Aluvala <aluvala.sai.teja@intel.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This commit is contained in:
parent
7b60ee5f46
commit
2ea5a87a5a
|
|
@ -508,7 +508,7 @@ static int btintel_pcie_submit_rx(struct btintel_pcie_data *data)
|
|||
|
||||
frbd_index = data->ia.tr_hia[BTINTEL_PCIE_RXQ_NUM];
|
||||
|
||||
if (frbd_index > rxq->count)
|
||||
if (frbd_index >= rxq->count)
|
||||
return -ERANGE;
|
||||
|
||||
/* Prepare for RX submit. It updates the FRBD with the address of DMA
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user