Bluetooth: hci0: 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 ffff88801d423468 by task kworker/u5:4/3660 CPU: 1 PID: 3660 Comm: kworker/u5:4 Not tainted 6.0.0-rc6-syzkaller-00045-gdc164f4fb00a #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/16/2022 Workqueue: hci0 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/0x6e9 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 5076: 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+0xa6/0xd0 mm/kasan/common.c:525 kasan_kmalloc include/linux/kasan.h:234 [inline] __do_kmalloc mm/slab.c:3686 [inline] __kmalloc+0x1f9/0x4a0 mm/slab.c:3695 kmalloc include/linux/slab.h:605 [inline] io_alloc_async_data+0xa5/0x160 io_uring/io_uring.c:1434 io_recvmsg_alloc_async io_uring/net.c:145 [inline] io_setup_async_msg.part.0+0x1b7/0x410 io_uring/net.c:159 io_setup_async_msg io_uring/net.c:744 [inline] io_recvmsg+0x16ef/0x1fe0 io_uring/net.c:746 io_issue_sqe+0x6b6/0xd20 io_uring/io_uring.c:1577 io_queue_sqe io_uring/io_uring.c:1755 [inline] io_submit_sqe io_uring/io_uring.c:2013 [inline] io_submit_sqes+0x94e/0x1d30 io_uring/io_uring.c:2124 __do_sys_io_uring_enter+0xb85/0x1ea0 io_uring/io_uring.c:3054 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd The buggy address belongs to the object at ffff88801d423400 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 104 bytes inside of 512-byte region [ffff88801d423400, ffff88801d423600) The buggy address belongs to the physical page: page:ffffea00007508c0 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff88801d423800 pfn:0x1d423 flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000200 ffffea000074d788 ffffea0000790008 ffff888011840600 raw: ffff88801d423800 ffff88801d423000 0000000100000001 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 0x2c20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_THISNODE), pid 2973, tgid 2973 (udevadm), ts 17975881297, free_ts 17958224701 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_node include/linux/gfp.h:243 [inline] kmem_getpages mm/slab.c:1363 [inline] cache_grow_begin+0x75/0x360 mm/slab.c:2569 cache_alloc_refill+0x27f/0x380 mm/slab.c:2942 ____cache_alloc mm/slab.c:3018 [inline] ____cache_alloc mm/slab.c:3001 [inline] slab_alloc_node mm/slab.c:3220 [inline] kmem_cache_alloc_node_trace+0x50a/0x570 mm/slab.c:3601 __do_kmalloc_node mm/slab.c:3623 [inline] __kmalloc_node_track_caller+0x38/0x60 mm/slab.c:3638 kmalloc_reserve net/core/skbuff.c:362 [inline] __alloc_skb+0xd9/0x2f0 net/core/skbuff.c:434 alloc_skb include/linux/skbuff.h:1257 [inline] alloc_uevent_skb+0x7b/0x210 lib/kobject_uevent.c:290 uevent_net_broadcast_untagged lib/kobject_uevent.c:326 [inline] kobject_uevent_net_broadcast lib/kobject_uevent.c:409 [inline] kobject_uevent_env+0xc2e/0x1640 lib/kobject_uevent.c:593 kobject_synth_uevent+0x701/0x850 lib/kobject_uevent.c:208 store_uevent+0x20/0x60 kernel/module/main.c:920 module_attr_store+0x50/0x80 kernel/params.c:919 sysfs_kf_write+0x110/0x160 fs/sysfs/file.c:136 kernfs_fop_write_iter+0x3f8/0x610 fs/kernfs/file.c:354 call_write_iter include/linux/fs.h:2187 [inline] new_sync_write fs/read_write.c:491 [inline] vfs_write+0x9e9/0xdd0 fs/read_write.c:578 ksys_write+0x127/0x250 fs/read_write.c:631 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 slab_destroy mm/slab.c:1615 [inline] slabs_destroy+0x89/0xc0 mm/slab.c:1635 cache_flusharray mm/slab.c:3389 [inline] ___cache_free+0x2a8/0x3d0 mm/slab.c:3452 qlink_free mm/kasan/quarantine.c:168 [inline] qlist_free_all+0x4f/0x1b0 mm/kasan/quarantine.c:187 kasan_quarantine_reduce+0x180/0x200 mm/kasan/quarantine.c:294 __kasan_slab_alloc+0x97/0xb0 mm/kasan/common.c:447 kasan_slab_alloc include/linux/kasan.h:224 [inline] slab_post_alloc_hook mm/slab.h:727 [inline] slab_alloc mm/slab.c:3294 [inline] __kmem_cache_alloc_lru mm/slab.c:3471 [inline] kmem_cache_alloc+0x214/0x520 mm/slab.c:3491 getname_flags.part.0+0x50/0x4f0 fs/namei.c:139 getname_flags include/linux/audit.h:320 [inline] getname+0x8e/0xd0 fs/namei.c:218 do_sys_openat2+0xf5/0x4c0 fs/open.c:1307 do_sys_open fs/open.c:1329 [inline] __do_sys_openat fs/open.c:1345 [inline] __se_sys_openat fs/open.c:1340 [inline] __x64_sys_openat+0x13f/0x1f0 fs/open.c:1340 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Memory state around the buggy address: ffff88801d423300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88801d423380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88801d423400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88801d423480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88801d423500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================