aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/linux/bcma/ssh:/git@git.zx2c4.com
diff options
context:
space:
mode:
authorMichael Bommarito <michael.bommarito@gmail.com>2026-05-15 10:38:19 -0400
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2026-05-20 16:35:47 -0400
commitd3f7d17960ed50df3a6709c5158caff989c8c905 (patch)
treeb6c3158b1df542b2938ab94b6bc5c2852aa7a006 /include/linux/bcma/ssh:/git@git.zx2c4.com
parentBluetooth: btmtk: fix urb->setup_packet leak in error paths (diff)
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. Fixes: 12410572833a ("Bluetooth: Break add adv into two mgmt commands") Cc: stable@vger.kernel.org Assisted-by: Claude:claude-opus-4-7 Signed-off-by: Michael Bommarito <michael.bommarito@gmail.com> Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Diffstat (limited to 'include/linux/bcma/ssh:/git@git.zx2c4.com')
0 files changed, 0 insertions, 0 deletions