Bluetooth: hci2: hardware error 0xfb ================================================================== BUG: KASAN: use-after-free in __list_del_entry_valid+0xf2/0x110 lib/list_debug.c:59 Read of size 8 at addr ffff8880206c0068 by task kworker/u5:8/3661 CPU: 0 PID: 3661 Comm: kworker/u5:8 Not tainted 6.0.0-rc3-syzkaller-00363-g7726d4c3e60b #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/26/2022 Workqueue: hci2 hci_error_reset Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:317 [inline] print_report.cold+0x2ba/0x719 mm/kasan/report.c:433 kasan_report+0xb1/0x1e0 mm/kasan/report.c:495 __list_del_entry_valid+0xf2/0x110 lib/list_debug.c:59 __list_del_entry include/linux/list.h:134 [inline] list_del include/linux/list.h:148 [inline] klist_release+0x66/0x480 lib/klist.c:189 kref_put include/linux/kref.h:65 [inline] klist_dec_and_del lib/klist.c:206 [inline] klist_put+0x151/0x1d0 lib/klist.c:217 device_del+0x243/0xc80 drivers/base/core.c:3683 hci_conn_del_sysfs+0xdc/0x180 net/bluetooth/hci_sysfs.c:78 hci_conn_cleanup+0x315/0x7b0 net/bluetooth/hci_conn.c:147 hci_conn_del+0x29b/0x790 net/bluetooth/hci_conn.c:1022 hci_conn_hash_flush+0x197/0x260 net/bluetooth/hci_conn.c:2367 hci_dev_close_sync+0x55d/0x1130 net/bluetooth/hci_sync.c:4476 hci_dev_do_close+0x2d/0x70 net/bluetooth/hci_core.c:554 hci_error_reset+0x96/0x130 net/bluetooth/hci_core.c:1050 process_one_work+0x991/0x1610 kernel/workqueue.c:2289 worker_thread+0x665/0x1080 kernel/workqueue.c:2436 kthread+0x2e4/0x3a0 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306 Allocated by task 3659: kasan_save_stack+0x1e/0x40 mm/kasan/common.c:38 kasan_set_track mm/kasan/common.c:45 [inline] set_alloc_info mm/kasan/common.c:437 [inline] ____kasan_kmalloc mm/kasan/common.c:516 [inline] ____kasan_kmalloc mm/kasan/common.c:475 [inline] __kasan_kmalloc+0xa9/0xd0 mm/kasan/common.c:525 kmalloc include/linux/slab.h:600 [inline] kzalloc include/linux/slab.h:733 [inline] device_private_init drivers/base/core.c:3361 [inline] device_add+0x1168/0x1e90 drivers/base/core.c:3411 hci_conn_add_sysfs+0x9b/0x1b0 net/bluetooth/hci_sysfs.c:53 hci_conn_complete_evt+0x323/0xe50 net/bluetooth/hci_event.c:3164 hci_event_func net/bluetooth/hci_event.c:7443 [inline] hci_event_packet+0x952/0xfd0 net/bluetooth/hci_event.c:7495 hci_rx_work+0xae7/0x1230 net/bluetooth/hci_core.c:4007 process_one_work+0x991/0x1610 kernel/workqueue.c:2289 worker_thread+0x665/0x1080 kernel/workqueue.c:2436 kthread+0x2e4/0x3a0 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306 Freed by task 3662: kasan_save_stack+0x1e/0x40 mm/kasan/common.c:38 kasan_set_track+0x21/0x30 mm/kasan/common.c:45 kasan_set_free_info+0x20/0x30 mm/kasan/generic.c:370 ____kasan_slab_free mm/kasan/common.c:367 [inline] ____kasan_slab_free+0x166/0x1c0 mm/kasan/common.c:329 kasan_slab_free include/linux/kasan.h:200 [inline] slab_free_hook mm/slub.c:1754 [inline] slab_free_freelist_hook+0x8b/0x1c0 mm/slub.c:1780 slab_free mm/slub.c:3534 [inline] kfree+0xe2/0x580 mm/slub.c:4562 device_add+0x453/0x1e90 drivers/base/core.c:3571 hci_conn_add_sysfs+0x9b/0x1b0 net/bluetooth/hci_sysfs.c:53 hci_le_cis_estabilished_evt+0x57c/0xae0 net/bluetooth/hci_event.c:6799 hci_le_meta_evt+0x2b8/0x510 net/bluetooth/hci_event.c:7110 hci_event_func net/bluetooth/hci_event.c:7440 [inline] hci_event_packet+0x63d/0xfd0 net/bluetooth/hci_event.c:7495 hci_rx_work+0xae7/0x1230 net/bluetooth/hci_core.c:4007 process_one_work+0x991/0x1610 kernel/workqueue.c:2289 worker_thread+0x665/0x1080 kernel/workqueue.c:2436 kthread+0x2e4/0x3a0 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306 The buggy address belongs to the object at ffff8880206c0000 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 104 bytes inside of 512-byte region [ffff8880206c0000, ffff8880206c0200) The buggy address belongs to the physical page: page:ffffea000081b000 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff8880206c0400 pfn:0x206c0 head:ffffea000081b000 order:2 compound_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 ffffea0000739508 ffffea0001e65c08 ffff888011841c80 raw: ffff8880206c0400 0000000000100007 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 2, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 1291, tgid 1291 (kworker/u4:1), ts 6888786293, free_ts 0 prep_new_page mm/page_alloc.c:2532 [inline] get_page_from_freelist+0x109b/0x2ce0 mm/page_alloc.c:4283 __alloc_pages+0x1c7/0x510 mm/page_alloc.c:5515 alloc_pages+0x1a6/0x270 mm/mempolicy.c:2270 alloc_slab_page mm/slub.c:1824 [inline] allocate_slab+0x27e/0x3d0 mm/slub.c:1969 new_slab mm/slub.c:2029 [inline] ___slab_alloc+0x7f1/0xe10 mm/slub.c:3031 __slab_alloc.constprop.0+0x4d/0xa0 mm/slub.c:3118 slab_alloc_node mm/slub.c:3209 [inline] slab_alloc mm/slub.c:3251 [inline] kmem_cache_alloc_trace+0x323/0x3e0 mm/slub.c:3282 kmalloc include/linux/slab.h:600 [inline] kzalloc include/linux/slab.h:733 [inline] alloc_bprm+0x51/0x900 fs/exec.c:1514 kernel_execve+0xab/0x500 fs/exec.c:1974 call_usermodehelper_exec_async+0x2e3/0x580 kernel/umh.c:112 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306 page_owner free stack trace missing Memory state around the buggy address: ffff8880206bff00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8880206bff80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff8880206c0000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880206c0080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880206c0100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================