mirror of
https://github.com/torvalds/linux.git
synced 2026-09-12 04:23:03 +02:00
Bluetooth: btintel_pcie: fix tx_handle bounds off-by-one
Valid indices into txq->urbd0s/tfds/bufs are 0..txq->count-1, so
tfd_index == txq->count is already out of range. Change the guard in
btintel_pcie_msix_tx_handle() from '> txq->count' to '>= txq->count'.
This issue was reported by Claude Mythos.
Fixes: c2b636b3f7 ("Bluetooth: btintel_pcie: Add support for PCIe transport")
Signed-off-by: Kiran K <kiran.k@intel.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This commit is contained in:
parent
6436e1b533
commit
3dd1b41f96
|
|
@ -1099,7 +1099,7 @@ static void btintel_pcie_msix_tx_handle(struct btintel_pcie_data *data)
|
|||
|
||||
urbd0 = &txq->urbd0s[cr_tia];
|
||||
|
||||
if (urbd0->tfd_index > txq->count)
|
||||
if (urbd0->tfd_index >= txq->count)
|
||||
return;
|
||||
|
||||
cr_tia = (cr_tia + 1) % txq->count;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user