* [PATCH] Bluetooth: btintel_pcie: fix TX descriptor bounds check
@ 2026-09-28 5:46 Ravindra
2026-09-28 6:01 ` Ravindra
0 siblings, 1 reply; 2+ messages in thread
From: Ravindra @ 2026-09-28 5:46 UTC (permalink / raw)
To: linux-bluetooth; +Cc: marcel, luiz.dentz, linux-kernel, Ravindra
btintel_pcie_prepare_tx() uses tfd_index to access the TFD and data
buffer arrays before the index is advanced modulo txq->count. An index
equal to txq->count is one past the end of both arrays, so reject it in
the bounds check.
Signed-off-by: Ravindra <ravindra@intel.com>
---
drivers/bluetooth/btintel_pcie.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/bluetooth/btintel_pcie.c b/drivers/bluetooth/btintel_pcie.c
index 59cf600014bb..aaf409a9afb1 100644
--- a/drivers/bluetooth/btintel_pcie.c
+++ b/drivers/bluetooth/btintel_pcie.c
@@ -536,7 +536,7 @@ static int btintel_pcie_send_sync(struct btintel_pcie_data *data,
tfd_index = data->ia.tr_hia[BTINTEL_PCIE_TXQ_NUM];
- if (tfd_index > txq->count)
+ if (tfd_index >= txq->count)
return -ERANGE;
if (skb->len > BTINTEL_PCIE_BUFFER_SIZE - BTINTEL_PCIE_HCI_TYPE_LEN) {
--
2.43.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* RE: [PATCH] Bluetooth: btintel_pcie: fix TX descriptor bounds check
2026-09-28 5:46 [PATCH] Bluetooth: btintel_pcie: fix TX descriptor bounds check Ravindra
@ 2026-09-28 6:01 ` Ravindra
0 siblings, 0 replies; 2+ messages in thread
From: Ravindra @ 2026-09-28 6:01 UTC (permalink / raw)
To: linux-bluetooth
Cc: marcel, luiz.dentz, linux-kernel, K, Kiran, Tumkur Narayan, Chethan
Cc: chethan.tumkur.narayan@intel.com, kiran.k@intel.com
Adding Kiran and Chethan to the thread for visibility. The patch was sent
earlier; no resend is needed.
> Subject: [PATCH] Bluetooth: btintel_pcie: fix TX descriptor bounds check
>
> btintel_pcie_prepare_tx() uses tfd_index to access the TFD and data buffer
> arrays before the index is advanced modulo txq->count. An index equal to
> txq->count is one past the end of both arrays, so reject it in the bounds check.
>
> Signed-off-by: Ravindra <ravindra@intel.com>
> ---
> drivers/bluetooth/btintel_pcie.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/bluetooth/btintel_pcie.c b/drivers/bluetooth/btintel_pcie.c
> index 59cf600014bb..aaf409a9afb1 100644
> --- a/drivers/bluetooth/btintel_pcie.c
> +++ b/drivers/bluetooth/btintel_pcie.c
> @@ -536,7 +536,7 @@ static int btintel_pcie_send_sync(struct
> btintel_pcie_data *data,
>
> tfd_index = data->ia.tr_hia[BTINTEL_PCIE_TXQ_NUM];
>
> - if (tfd_index > txq->count)
> + if (tfd_index >= txq->count)
> return -ERANGE;
>
> if (skb->len > BTINTEL_PCIE_BUFFER_SIZE -
> BTINTEL_PCIE_HCI_TYPE_LEN) {
> --
> 2.43.0
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-09-28 6:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-28 5:46 [PATCH] Bluetooth: btintel_pcie: fix TX descriptor bounds check Ravindra
2026-09-28 6:01 ` Ravindra
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®