From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH BlueZ v3 2/7] btdev: Check for valid SID on BT_HCI_CMD_LE_PA_CREATE_SYNC
Date: Wed, 16 Apr 2025 12:04:28 -0400 [thread overview]
Message-ID: <20250416160433.1822263-2-luiz.dentz@gmail.com> (raw)
In-Reply-To: <20250416160433.1822263-1-luiz.dentz@gmail.com>
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
---
emulator/btdev.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/emulator/btdev.c b/emulator/btdev.c
index 7e4cb9393593..a1c82ae306d7 100644
--- a/emulator/btdev.c
+++ b/emulator/btdev.c
@@ -5728,6 +5728,12 @@ static int cmd_pa_create_sync(struct btdev *dev, const void *data, uint8_t len)
uint8_t status = BT_HCI_ERR_SUCCESS;
struct le_per_adv *per_adv;
+ if (cmd->sid > 0x0f) {
+ cmd_status(dev, BT_HCI_ERR_INVALID_PARAMETERS,
+ BT_HCI_CMD_LE_PA_CREATE_SYNC);
+ return 0;
+ }
+
/* Create new train */
per_adv = le_per_adv_new(dev, cmd->addr_type, cmd->addr);
if (!per_adv)
--
2.49.0
next prev parent reply other threads:[~2025-04-16 16:04 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-16 16:04 [PATCH BlueZ v3 1/7] bap: Fix not setting SID for broadcast receiver Luiz Augusto von Dentz
2025-04-16 16:04 ` Luiz Augusto von Dentz [this message]
2025-04-16 16:04 ` [PATCH BlueZ v3 3/7] btdev: Fix not matching SID on le_pa_sync_estabilished Luiz Augusto von Dentz
2025-04-16 16:04 ` [PATCH BlueZ v3 4/7] iso-tester: Add test for SID=0xff Luiz Augusto von Dentz
2025-04-16 16:04 ` [PATCH BlueZ v3 5/7] iso-tester: Test getpeername return SID Luiz Augusto von Dentz
2025-04-16 16:04 ` [PATCH BlueZ v3 6/7] btio: Add support to BT_IO_OPT_ISO_BC_SID to bt_io_get Luiz Augusto von Dentz
2025-04-16 16:04 ` [PATCH BlueZ v3 7/7] bap: Add support for using SID for broadcast receiver Luiz Augusto von Dentz
2025-04-16 17:36 ` [BlueZ,v3,1/7] bap: Fix not setting " bluez.test.bot
2025-04-16 19:00 ` [PATCH BlueZ v3 1/7] " patchwork-bot+bluetooth
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250416160433.1822263-2-luiz.dentz@gmail.com \
--to=luiz.dentz@gmail.com \
--cc=linux-bluetooth@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox