btdev: Fix set PA data array overflow
Status from this message: This patch was applied to bluetooth/bluez.git (master)
Get series with b4
b4 am [email protected]Versions newest first
Patches in v1 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/1 | btdev: Fix set PA data array overflowemulator/ | +10 | 1 reply |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH BlueZ 0/1] btdev: Fix set PA data array overflow
This fixes an array overflow that can happen if the user issues the LE Set Periodic Advertising Data command with data length exceeding 31 bytes.
This can be noticed when running the Broadcast Source/Sink scenarios in bluetoothctl, using emulated controllers: If the source BASE exceeds 31 bytes, the PA reports received by the Sink looks something like the following:
Quoted 1 line
HCI Event: LE Meta Event (
0x3e) plen 39
LE Periodic Advertising Report (0x0f)
Sync handle: 1
TX power: 127 dbm (0x7f)
RSSI: not available (0x7f)
CTE Type: No Constant Tone Extension (0xff)
Data status: Incomplete, more data to come
Data length: 0x1f
25 16 51 18 e0 99 89 01 01 06 00 00 00 00 10 02
01 03 02 02 01 03 04 28 00 05 03 03 00 00 00Quoted 1 line
HCI Event: LE Meta Event (
0x3e) plen 15
LE Periodic Advertising Report (0x0f)
Sync handle: 1
TX power: 127 dbm (0x7f)
RSSI: not available (0x7f)
CTE Type: No Constant Tone Extension (0xff)
Data status: Complete
Data length: 0x07
00 00 00 00 00 00 00The second PA report contains invalid bytes that were read outside the PA data array.
Iulia Tanasescu (1):
btdev: Fix set PA data array overflow
emulator/btdev.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-)
base-commit: 41c7f3af0352d3e45f4f10b7584e955a7f5cc696
Signature · 1 line
2.39.2