Bluetooth: hci1: hardware error 0x00 ================================================================== BUG: KASAN: use-after-free in __list_del_entry_valid+0xf2/0x110 lib/list_debug.c:59 Read of size 8 at addr ffff888026a04068 by task kworker/u5:8/3657 CPU: 0 PID: 3657 Comm: kworker/u5:8 Not tainted 6.0.0-rc4-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/26/2022 Workqueue: hci1 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 3657: 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 3657: 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 ffff888026a04000 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 104 bytes inside of 512-byte region [ffff888026a04000, ffff888026a04200) The buggy address belongs to the physical page: page:ffffea00009a8100 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x26a04 head:ffffea00009a8100 order:2 compound_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 ffffea00009c0d00 dead000000000002 ffff888011841c80 raw: 0000000000000000 0000000000100010 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 2750, tgid 2750 (kworker/u4:2), ts 9037953224, free_ts 9022309190 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 last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1449 [inline] free_pcp_prepare+0x5e4/0xd20 mm/page_alloc.c:1499 free_unref_page_prepare mm/page_alloc.c:3380 [inline] free_unref_page+0x19/0x4d0 mm/page_alloc.c:3476 __stack_depot_save+0x168/0x500 lib/stackdepot.c:489 kasan_save_stack+0x2e/0x40 mm/kasan/common.c:39 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 skb_free_head+0xac/0x110 net/core/skbuff.c:658 pskb_expand_head+0x388/0x1110 net/core/skbuff.c:1758 netlink_trim+0x1ea/0x240 net/netlink/af_netlink.c:1301 netlink_broadcast+0x5f/0xd90 net/netlink/af_netlink.c:1497 nlmsg_multicast include/net/netlink.h:1033 [inline] genlmsg_mcast+0x1d3/0x2b0 net/netlink/genetlink.c:1467 genlmsg_multicast_allns net/netlink/genetlink.c:1486 [inline] genl_ctrl_event.isra.0+0x21e/0xa00 net/netlink/genetlink.c:1097 genl_register_family net/netlink/genetlink.c:432 [inline] genl_register_family+0xc9b/0x1410 net/netlink/genetlink.c:384 Memory state around the buggy address: ffff888026a03f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888026a03f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888026a04000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888026a04080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888026a04100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================