Skip to contentSkip to conversation

Bluetooth: btintel_pcie: fix TX descriptor bounds check

PATCH Applied Ravindra 3 participants 3 messages Sep 29 Bluetooth drivers

lore
Share & tools
lore

Ravindra

author
#0 lore raw

PATCH v2 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.

Fixes 6e65a09f9275 ("Bluetooth: btintel_pcie: Add *setup* function to download firmware")
---
 drivers/bluetooth/btintel_pcie.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/bluetooth/btintel_pcie.c +1 -1
index 84a6cf2f4920..b4142a78a049 100644
@@ -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
#1 lore raw

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/1175817/

---Test result---

Test Summary:

CheckPatch                    PASS      0.60 seconds
VerifyFixes                   PASS      0.08 seconds
VerifySignedoff               PASS      0.08 seconds
GitLint                       PASS      5.67 seconds
SubjectPrefix                 PASS      0.65 seconds
BuildKernel                   PASS      33.34 seconds
CheckAllWarning               PASS      35.91 seconds
CheckSparse                   PASS      47.68 seconds
BuildKernel32                 PASS      30.27 seconds
CheckKernelLLVM               PASS      36.10 seconds
TestRunnerSetup               PASS      819.43 seconds
IncrementalBuild              PASS      30.35 seconds

https://github.com/bluez/bluetooth-next/pull/839

---
Regards,
Linux Bluetooth

#2 lore raw
In reply to Ravindra
This patch was applied to bluetooth/bluetooth-next.git (master) by Luiz Augusto von Dentz <[email protected]>:

Hello:

This patch was applied to bluetooth/bluetooth-next.git (master) by Luiz Augusto von Dentz <[email protected]>:

Quoted 9 lines · On Tue, 29 Sep 2026 12:26:41 +0530 you wrote:

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.

Fixes 6e65a09f9275 ("Bluetooth: btintel_pcie: Add *setup* function to download firmware")

[...]

Here is the summary with links:
- [v2] Bluetooth: btintel_pcie: fix TX descriptor bounds check

    https://git.kernel.org/bluetooth/bluetooth-next/c/baa53af641c9

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html