Bluetooth: btintel_pcie: fix TX descriptor bounds check
PATCH 1/1 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.
--- drivers/bluetooth/btintel_pcie.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/bluetooth/btintel_pcie.c +1 -1
@@ -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 ) {
Signature · 1 line
2.43.0
Adding Kiran and Chethan to the thread for visibility. The patch was sent earlier; no resend is needed.
Quoted 28 lines
Subject: [PATCH] Bluetooth:
btintel_pcie: fix TX descriptor bounds check
btintel_pcie_prepare_tx()usestfd_indexto access the TFD and data buffer arrays before the index is advanced modulotxq->count. An index equal totxq->countis one past the end of both arrays, so reject it in the bounds check.Signed-off-by Ravindra <[email protected]>--- drivers/bluetooth/btintel_pcie.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/bluetooth/btintel_pcie.c +1
-1@@ -536,7 +536,7 @@ static int btintel_pcie_send_sync(structbtintel_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
This is automated email and please do not reply to this email!
Dear submitter,
Thank you for submitting the patches to the linux bluetooth mailing list. This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/series/1174948/
---Test result---
Test Summary:
CheckPatch PASS 0.79 seconds VerifyFixes PASS 0.14 seconds VerifySignedoff PASS 0.14 seconds GitLint PASS 0.38 seconds SubjectPrefix PASS 0.14 seconds BuildKernel PASS 30.14 seconds CheckAllWarning PASS 33.86 seconds CheckSparse PASS 36.14 seconds BuildKernel32 PASS 29.54 seconds CheckKernelLLVM PASS 41.81 seconds TestRunnerSetup PASS 815.90 seconds IncrementalBuild PASS 29.95 seconds
https://github.com/bluez/bluetooth-next/pull/832
---
Regards,
Linux Bluetooth