================================================================== BUG: KASAN: slab-use-after-free in skb_queue_empty_lockless include/linux/skbuff.h:1887 [inline] BUG: KASAN: slab-use-after-free in skb_queue_purge_reason+0xac/0x444 net/core/skbuff.c:3846 Read of size 8 at addr ffff0000d11b4058 by task syz.1.1728/12312 CPU: 1 UID: 0 PID: 12312 Comm: syz.1.1728 Not tainted 6.14.0-rc4-syzkaller-ge056da87c780 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 12/27/2024 Call trace: show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:466 (C) __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0xe4/0x150 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:408 [inline] print_report+0x198/0x550 mm/kasan/report.c:521 kasan_report+0xd8/0x138 mm/kasan/report.c:634 __asan_report_load8_noabort+0x20/0x2c mm/kasan/report_generic.c:381 skb_queue_empty_lockless include/linux/skbuff.h:1887 [inline] skb_queue_purge_reason+0xac/0x444 net/core/skbuff.c:3846 skb_queue_purge include/linux/skbuff.h:3364 [inline] vhci_flush+0x4c/0x60 drivers/bluetooth/hci_vhci.c:69 hci_dev_do_reset net/bluetooth/hci_core.c:551 [inline] hci_dev_reset+0x354/0x514 net/bluetooth/hci_core.c:591 hci_sock_ioctl+0x3f4/0x75c net/bluetooth/hci_sock.c:1133 sock_do_ioctl+0x134/0x2d0 net/socket.c:1199 sock_ioctl+0x4ec/0x838 net/socket.c:1318 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:906 [inline] __se_sys_ioctl fs/ioctl.c:892 [inline] __arm64_sys_ioctl+0x14c/0x1cc fs/ioctl.c:892 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:49 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:132 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:151 el0_svc+0x54/0x168 arch/arm64/kernel/entry-common.c:744 el0t_64_sync_handler+0x84/0x108 arch/arm64/kernel/entry-common.c:762 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:600 Allocated by task 12024: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x40/0x78 mm/kasan/common.c:68 kasan_save_alloc_info+0x40/0x50 mm/kasan/generic.c:562 poison_kmalloc_redzone mm/kasan/common.c:377 [inline] __kasan_kmalloc+0xac/0xc4 mm/kasan/common.c:394 kasan_kmalloc include/linux/kasan.h:260 [inline] __kmalloc_cache_noprof+0x2cc/0x428 mm/slub.c:4325 kmalloc_noprof include/linux/slab.h:901 [inline] kzalloc_noprof include/linux/slab.h:1037 [inline] vhci_open+0x64/0x32c drivers/bluetooth/hci_vhci.c:634 misc_open+0x2b8/0x328 drivers/char/misc.c:179 chrdev_open+0x3b0/0x4bc fs/char_dev.c:414 do_dentry_open+0xb7c/0x1538 fs/open.c:956 vfs_open+0x48/0x2d8 fs/open.c:1086 do_open fs/namei.c:3830 [inline] path_openat+0x2308/0x2b1c fs/namei.c:3989 do_filp_open+0x1e8/0x404 fs/namei.c:4016 do_sys_openat2+0x124/0x1b8 fs/open.c:1428 do_sys_open fs/open.c:1443 [inline] __do_sys_openat fs/open.c:1459 [inline] __se_sys_openat fs/open.c:1454 [inline] __arm64_sys_openat+0x1f0/0x240 fs/open.c:1454 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:49 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:132 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:151 el0_svc+0x54/0x168 arch/arm64/kernel/entry-common.c:744 el0t_64_sync_handler+0x84/0x108 arch/arm64/kernel/entry-common.c:762 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:600 Freed by task 12024: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x40/0x78 mm/kasan/common.c:68 kasan_save_free_info+0x54/0x6c mm/kasan/generic.c:576 poison_slab_object mm/kasan/common.c:247 [inline] __kasan_slab_free+0x64/0x8c mm/kasan/common.c:264 kasan_slab_free include/linux/kasan.h:233 [inline] slab_free_hook mm/slub.c:2353 [inline] slab_free mm/slub.c:4609 [inline] kfree+0x180/0x478 mm/slub.c:4757 vhci_release+0xb4/0xd0 drivers/bluetooth/hci_vhci.c:670 __fput+0x340/0x760 fs/file_table.c:464 ____fput+0x20/0x30 fs/file_table.c:492 task_work_run+0x230/0x2e0 kernel/task_work.c:227 exit_task_work include/linux/task_work.h:40 [inline] do_exit+0x4e8/0x1acc kernel/exit.c:938 do_group_exit+0x194/0x22c kernel/exit.c:1087 __do_sys_exit_group kernel/exit.c:1098 [inline] __se_sys_exit_group kernel/exit.c:1096 [inline] pid_child_should_wake+0x0/0x1dc kernel/exit.c:1096 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:49 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:132 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:151 el0_svc+0x54/0x168 arch/arm64/kernel/entry-common.c:744 el0t_64_sync_handler+0x84/0x108 arch/arm64/kernel/entry-common.c:762 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:600 The buggy address belongs to the object at ffff0000d11b4000 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 88 bytes inside of freed 1024-byte region [ffff0000d11b4000, ffff0000d11b4400) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff0000d11b7800 pfn:0x1111b0 head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0x5ffc00000000240(workingset|head|node=0|zone=2|lastcpupid=0x7ff) page_type: f5(slab) raw: 05ffc00000000240 ffff0000c0001dc0 fffffdffc3d13210 fffffdffc33ca210 raw: ffff0000d11b7800 000000000010000d 00000000f5000000 0000000000000000 head: 05ffc00000000240 ffff0000c0001dc0 fffffdffc3d13210 fffffdffc33ca210 head: ffff0000d11b7800 000000000010000d 00000000f5000000 0000000000000000 head: 05ffc00000000003 fffffdffc3446c01 ffffffffffffffff 0000000000000000 head: 0000000000000008 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff0000d11b3f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff0000d11b3f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff0000d11b4000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff0000d11b4080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff0000d11b4100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== Bluetooth: hci0: Opcode 0x0c03 failed: -4