mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-11-15 19:56:03 +00:00
The virtbt_setup_zephyr() sends the Zephyr vendor command 0xfc08 (Read Build Information) and hands the response to bt_dev_info() and hci_set_fw_info() as a "%s" string starting at skb->data + 1, without checking the length. A backend that answers with status only leaves that pointer past the end of the received data, so the walk reads adjacent slab memory until it meets a NUL. Those bytes reach the kernel log and the firmware-info debugfs file. To fix this, print the string with a bounded "%.*s" limited to skb->len - 1. A short or unterminated response then prints as much as arrived instead of failing setup. This mirrors commitdd068ef044("Bluetooth: bpa10x: avoid OOB read of revision string in bpa10x_setup()"), which fixed the identical pattern. Fixes:afd2daa26c("Bluetooth: Add support for virtio transport driver") Signed-off-by: HyeongJun An <sammiee5311@gmail.com> Assisted-by: Claude:claude-opus-4-8 Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
454 lines
9.4 KiB
454 lines
9.4 KiB