summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/bin/stackcollapse-report
diff options
context:
space:
mode:
authorYuanZhe Liu <25031212351@stu.xidian.edu.cn>2026-11-05 13:56:39 +0800
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2026-11-05 11:04:13 -0500
commit868c886f45f7c10dc888b94c6993352702a84d04 (patch)
tree81c583664e543a549ce6b563875cec52b112af09 /tools/perf/scripts/python/bin/stackcollapse-report
parenteeca795cec6d9c6c193c2c1bd0cb26cde44f9fc3 (diff)
Bluetooth: btusb: fix use-after-free in force_poll_sync
The force_poll_sync debugfs file uses the driver's struct btusb_data as its private data. The file is created under hdev->debugfs and is removed only when the HCI device is released, while btusb_disconnect() frees btusb_data unconditionally. The HCI device can outlive the driver data, for example when an HCI socket still references it, so reading or writing the already opened file then dereferences freed memory: BUG: KASAN: slab-use-after-free in force_poll_sync_read+0x129/0x140 Read of size 1 at addr ffff88800cfb7038 ... Freed by task ...: kfree btusb_disconnect Remove the debugfs file before the private data is freed. debugfs_remove() waits for callers that are already inside the file operations, and any later access fails with -EIO instead of reaching the driver, so the force_poll_sync file can no longer dereference btusb_data after it is gone. Fixes: 800fe5ec302e ("Bluetooth: btusb: Add support for queuing during polling interval") Cc: stable@vger.kernel.org Co-developed-by: Bin Yu <byu@xidian.edu.cn> Signed-off-by: Bin Yu <byu@xidian.edu.cn> Co-developed-by: Cheng Wen <wencheng@xidian.edu.cn> Signed-off-by: Cheng Wen <wencheng@xidian.edu.cn> Signed-off-by: YuanZhe Liu <25031212351@stu.xidian.edu.cn> Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Diffstat (limited to 'tools/perf/scripts/python/bin/stackcollapse-report')
0 files changed, 0 insertions, 0 deletions