You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by ja...@apache.org on 2026/10/18 13:29:30 UTC
(mynewt-nimble) 10/16: nimble/ll: Add missing length check in LE Terminate BIG command
This is an automated email from the ASF dual-hosted git repository.
sjanc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git
commit 2b6e6ed3a8254b9204dfd859ac8c4fad8631a2ec
Author: Szymon Janc <sz...@codecoup.pl>
AuthorDate: Wed Oct 7 18:11:13 2026 +0200
nimble/ll: Add missing length check in LE Terminate BIG command
HCI LE Terminate BIG command handler did not validate parameters length
before reading parameters. Reject command with invalid parameters
length.
Assisted-by: Claude:claude-opus-5-5
---
nimble/controller/src/ble_ll_iso_big.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/nimble/controller/src/ble_ll_iso_big.c b/nimble/controller/src/ble_ll_iso_big.c
index 774465315..72598e619 100644
--- a/nimble/controller/src/ble_ll_iso_big.c
+++ b/nimble/controller/src/ble_ll_iso_big.c
@@ -1457,6 +1457,10 @@ ble_ll_iso_big_hci_terminate(const uint8_t *cmdbuf, uint8_t len)
const struct ble_hci_le_terminate_big_cp *cmd = (void *)cmdbuf;
int err;
+ if (len != sizeof(*cmd)) {
+ return BLE_ERR_INV_HCI_CMD_PARMS;
+ }
+
err = ble_ll_iso_big_terminate(cmd->big_handle, cmd->reason);
switch (err) {
case 0: