Bluetooth: MGMT: validate Add Extended Advertising Data length
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 12410572833a283ce92fcf9679ca8a2f372097ee · < 0bc1a5a69f541859293d79db72bd7854ac48df51| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
Bluetooth: MGMT: validate Add Extended Advertising Data length
MGMT_OP_ADD_EXT_ADV_DATA is registered as a variable-length command, with MGMT_ADD_EXT_ADV_DATA_SIZE as the fixed header size. The handler then uses cp->adv_data_len and cp->scan_rsp_len to validate and copy cp->data, but it never checks that those bytes are part of the mgmt command payload.
A short command can therefore make add_ext_adv_data() pass an out-of-bounds pointer into tlv_data_is_valid(). If the bytes beyond the command buffer are addressable, they can also be copied into the advertising instance as scan response data, where the caller can read them back via MGMT_OP_GET_ADV_INSTANCE. The trigger requires CAP_NET_ADMIN in the initial user namespace; KASAN reports an 8-byte slab-out-of-bounds read.
Reject commands whose length does not match the fixed header plus both advertising data lengths before parsing cp->data.
From the CVE record · Linux
The Linux kernel’s Bluetooth MGMT handler does not verify that an Add Extended Advertising Data command contains the data lengths it declares. A local attacker with CAP_NET_ADMIN in the initial user namespace can trigger an out-of-bounds read and may be able to read copied data back through MGMT_OP_GET_ADV_INSTANCE. No user interaction is described.
Administrators running Linux kernels with the affected Bluetooth MGMT handler should check their kernel version; affected versions are not specified.