================================================================== BUG: KASAN: use-after-free in __list_del_entry_valid+0x2b/0x120 lib/list_debug.c:46 Read of size 8 at addr ffff888021e11308 by task syz.6.819/7276 CPU: 1 PID: 7276 Comm: syz.6.819 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/16/2026 Call Trace: dump_stack_lvl+0x188/0x250 lib/dump_stack.c:106 print_address_description+0x60/0x2d0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:434 [inline] kasan_report+0xdf/0x130 mm/kasan/report.c:451 __list_del_entry_valid+0x2b/0x120 lib/list_debug.c:46 __list_del_entry include/linux/list.h:139 [inline] list_del include/linux/list.h:153 [inline] mgmt_pending_remove+0x24/0x1a0 net/bluetooth/mgmt_util.c:268 mgmt_pending_foreach+0xc1/0x110 net/bluetooth/mgmt_util.c:226 mgmt_index_removed+0x125/0x2a0 net/bluetooth/mgmt.c:8554 hci_sock_bind+0xa77/0xe00 net/bluetooth/hci_sock.c:1257 __sys_bind+0x2e9/0x3e0 net/socket.c:1730 __do_sys_bind net/socket.c:1741 [inline] __se_sys_bind net/socket.c:1739 [inline] __x64_sys_bind+0x76/0x80 net/socket.c:1739 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 RIP: 0033:0x7fa0775ad199 Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 e8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fa075805028 EFLAGS: 00000246 ORIG_RAX: 0000000000000031 RAX: ffffffffffffffda RBX: 00007fa077834fa0 RCX: 00007fa0775ad199 RDX: 0000000000000006 RSI: 0000200000000100 RDI: 0000000000000005 RBP: 00007fa0776440b8 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fa077835038 R14: 00007fa077834fa0 R15: 00007ffc09fd6f38 Allocated by task 7274: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track mm/kasan/common.c:46 [inline] set_alloc_info mm/kasan/common.c:434 [inline] ____kasan_kmalloc mm/kasan/common.c:513 [inline] __kasan_kmalloc+0xaf/0xe0 mm/kasan/common.c:522 kmalloc include/linux/slab.h:607 [inline] kzalloc include/linux/slab.h:738 [inline] mgmt_pending_add+0x60/0x310 net/bluetooth/mgmt_util.c:236 set_powered+0x315/0x830 net/bluetooth/mgmt.c:1230 hci_mgmt_cmd+0x94d/0xd80 net/bluetooth/hci_sock.c:1663 hci_sock_sendmsg+0x379/0xaa0 net/bluetooth/hci_sock.c:1798 sock_sendmsg_nosec net/socket.c:706 [inline] __sock_sendmsg net/socket.c:718 [inline] sock_write_iter+0x2a6/0x3a0 net/socket.c:1090 call_write_iter include/linux/fs.h:2179 [inline] new_sync_write fs/read_write.c:507 [inline] vfs_write+0x748/0xd70 fs/read_write.c:594 ksys_write+0x153/0x260 fs/read_write.c:647 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 Freed by task 146: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track+0x4b/0x70 mm/kasan/common.c:46 kasan_set_free_info+0x1f/0x40 mm/kasan/generic.c:360 ____kasan_slab_free+0xd5/0x110 mm/kasan/common.c:366 kasan_slab_free include/linux/kasan.h:230 [inline] slab_free_hook mm/slub.c:1710 [inline] slab_free_freelist_hook+0xec/0x170 mm/slub.c:1736 slab_free mm/slub.c:3504 [inline] kfree+0xef/0x2a0 mm/slub.c:4564 hci_power_on+0x2b0/0x5f0 net/bluetooth/hci_core.c:2286 process_one_work+0x867/0xff0 kernel/workqueue.c:2310 worker_thread+0xad7/0x12a0 kernel/workqueue.c:2457 kthread+0x42e/0x520 kernel/kthread.c:334 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287 The buggy address belongs to the object at ffff888021e11300 which belongs to the cache kmalloc-64 of size 64 The buggy address is located 8 bytes inside of 64-byte region [ffff888021e11300, ffff888021e11340) The buggy address belongs to the page: page:ffffea0000878440 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x21e11 flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000200 0000000000000000 0000000100000001 ffff888016c41640 raw: 0000000000000000 0000000000200020 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x112c40(GFP_NOFS|__GFP_NOWARN|__GFP_NORETRY|__GFP_HARDWALL), pid 3557, ts 235590371593, free_ts 235066968516 prep_new_page mm/page_alloc.c:2426 [inline] get_page_from_freelist+0x24f6/0x2670 mm/page_alloc.c:4192 __alloc_pages+0x1ee/0x480 mm/page_alloc.c:5501 alloc_slab_page mm/slub.c:1780 [inline] allocate_slab mm/slub.c:1917 [inline] new_slab+0xc0/0x4b0 mm/slub.c:1980 ___slab_alloc+0x807/0xdd0 mm/slub.c:3013 __slab_alloc mm/slub.c:3100 [inline] slab_alloc_node mm/slub.c:3191 [inline] slab_alloc mm/slub.c:3233 [inline] __kmalloc+0x11d/0x340 mm/slub.c:4408 kmalloc include/linux/slab.h:612 [inline] kzalloc include/linux/slab.h:738 [inline] tomoyo_encode2 security/tomoyo/realpath.c:45 [inline] tomoyo_encode+0x28a/0x550 security/tomoyo/realpath.c:80 tomoyo_realpath_from_path+0x5a2/0x5e0 security/tomoyo/realpath.c:288 tomoyo_get_realpath security/tomoyo/file.c:151 [inline] tomoyo_path_perm+0x23f/0x5d0 security/tomoyo/file.c:822 security_inode_getattr+0xcf/0x120 security/security.c:1398 vfs_getattr+0x26/0x3a0 fs/stat.c:157 vfs_fstat fs/stat.c:182 [inline] __do_sys_newfstat fs/stat.c:421 [inline] __se_sys_newfstat fs/stat.c:418 [inline] __x64_sys_newfstat+0x137/0x210 fs/stat.c:418 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1340 [inline] free_pcp_prepare mm/page_alloc.c:1391 [inline] free_unref_page_prepare+0x637/0x6c0 mm/page_alloc.c:3317 free_unref_page+0x8f/0x2a0 mm/page_alloc.c:3396 __vunmap+0x8e0/0xa80 mm/vmalloc.c:2628 memslot_rmap_free arch/x86/kvm/x86.c:11795 [inline] kvm_arch_free_memslot+0x74/0x150 arch/x86/kvm/x86.c:11804 kvm_free_memslot virt/kvm/kvm_main.c:935 [inline] kvm_free_memslots virt/kvm/kvm_main.c:949 [inline] kvm_destroy_vm virt/kvm/kvm_main.c:1255 [inline] kvm_put_kvm+0x1036/0x16b0 virt/kvm/kvm_main.c:1284 kvm_vcpu_release+0x53/0x60 virt/kvm/kvm_main.c:3645 __fput+0x212/0x8c0 fs/file_table.c:311 task_work_run+0x125/0x1a0 kernel/task_work.c:188 get_signal+0x123e/0x12e0 kernel/signal.c:2685 arch_do_signal_or_restart+0xe6/0x12a0 arch/x86/kernel/signal.c:867 handle_signal_work kernel/entry/common.c:157 [inline] exit_to_user_mode_loop+0x9e/0x130 kernel/entry/common.c:181 exit_to_user_mode_prepare+0xee/0x180 kernel/entry/common.c:217 __syscall_exit_to_user_mode_work kernel/entry/common.c:299 [inline] syscall_exit_to_user_mode+0x16/0x40 kernel/entry/common.c:310 do_syscall_64+0x58/0xa0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x66/0xd0 Memory state around the buggy address: ffff888021e11200: 00 00 00 00 00 00 00 04 fc fc fc fc fc fc fc fc ffff888021e11280: 00 00 00 00 00 04 fc fc fc fc fc fc fc fc fc fc >ffff888021e11300: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ^ ffff888021e11380: 00 00 00 00 00 00 fc fc fc fc fc fc fc fc fc fc ffff888021e11400: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ==================================================================