Bluetooth: hci3: hardware error 0x00 ================================================================== BUG: KASAN: use-after-free in __list_del_entry_valid+0xa6/0x130 lib/list_debug.c:62 Read of size 8 at addr ffff88807b335cd0 by task kworker/u5:0/30809 CPU: 0 PID: 30809 Comm: kworker/u5:0 Not tainted 6.0.0-rc5-syzkaller-00025-g3245cb65fd91 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/26/2022 Workqueue: hci3 hci_error_reset Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106 print_address_description+0x65/0x4b0 mm/kasan/report.c:317 print_report+0x108/0x220 mm/kasan/report.c:433 kasan_report+0xfb/0x130 mm/kasan/report.c:495 __list_del_entry_valid+0xa6/0x130 lib/list_debug.c:62 __list_del_entry include/linux/list.h:134 [inline] list_del include/linux/list.h:148 [inline] klist_release lib/klist.c:189 [inline] kref_put include/linux/kref.h:65 [inline] klist_dec_and_del+0x9c/0x430 lib/klist.c:206 klist_put lib/klist.c:217 [inline] klist_del+0xa3/0x100 lib/klist.c:230 device_del+0x67b/0xbe0 drivers/base/core.c:3699 hci_conn_del_sysfs+0xeb/0x180 net/bluetooth/hci_sysfs.c:78 hci_conn_cleanup+0x59a/0x750 net/bluetooth/hci_conn.c:147 hci_conn_del+0x2ae/0x3b0 net/bluetooth/hci_conn.c:1022 hci_conn_hash_flush+0x1bd/0x240 net/bluetooth/hci_conn.c:2367 hci_dev_close_sync+0x6e9/0xcb0 net/bluetooth/hci_sync.c:4476 hci_dev_do_close net/bluetooth/hci_core.c:554 [inline] hci_error_reset+0xdb/0x1d0 net/bluetooth/hci_core.c:1050 process_one_work+0x81c/0xd10 kernel/workqueue.c:2289 worker_thread+0xb14/0x1330 kernel/workqueue.c:2436 kthread+0x266/0x300 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 Allocated by task 28347: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track mm/kasan/common.c:45 [inline] set_alloc_info mm/kasan/common.c:437 [inline] ____kasan_kmalloc+0xdc/0x110 mm/kasan/common.c:516 kasan_kmalloc include/linux/kasan.h:234 [inline] kmem_cache_alloc_trace+0x97/0x310 mm/slub.c:3284 kmalloc include/linux/slab.h:600 [inline] batadv_forw_packet_alloc+0x122/0x3a0 net/batman-adv/send.c:519 batadv_iv_ogm_aggregate_new net/batman-adv/bat_iv_ogm.c:563 [inline] batadv_iv_ogm_queue_add+0x713/0xc20 net/batman-adv/bat_iv_ogm.c:671 batadv_iv_ogm_schedule_buff net/batman-adv/bat_iv_ogm.c:850 [inline] batadv_iv_ogm_schedule+0xbf7/0x1020 net/batman-adv/bat_iv_ogm.c:869 batadv_iv_send_outstanding_bat_ogm_packet+0x741/0x850 net/batman-adv/bat_iv_ogm.c:1713 process_one_work+0x81c/0xd10 kernel/workqueue.c:2289 worker_thread+0xb14/0x1330 kernel/workqueue.c:2436 kthread+0x266/0x300 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 Freed by task 5764: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track+0x4c/0x70 mm/kasan/common.c:45 kasan_set_free_info+0x1f/0x40 mm/kasan/generic.c:370 ____kasan_slab_free+0xd8/0x120 mm/kasan/common.c:367 kasan_slab_free include/linux/kasan.h:200 [inline] slab_free_hook mm/slub.c:1754 [inline] slab_free_freelist_hook+0x12e/0x1a0 mm/slub.c:1780 slab_free mm/slub.c:3534 [inline] kfree+0xda/0x210 mm/slub.c:4562 skb_free_head net/core/skbuff.c:662 [inline] skb_release_data+0x586/0x790 net/core/skbuff.c:691 skb_release_all net/core/skbuff.c:756 [inline] __kfree_skb+0x56/0x1d0 net/core/skbuff.c:770 netlink_broadcast+0x1057/0x1170 net/netlink/af_netlink.c:1518 nlmsg_multicast include/net/netlink.h:1033 [inline] nlmsg_notify+0xfa/0x1c0 net/netlink/af_netlink.c:2544 __addrconf_sysctl_register+0x35f/0x3c0 net/ipv6/addrconf.c:7093 addrconf_sysctl_register+0x128/0x180 net/ipv6/addrconf.c:7130 ipv6_add_dev+0xc44/0x1200 net/ipv6/addrconf.c:450 addrconf_notify+0x75b/0xfe0 net/ipv6/addrconf.c:3528 notifier_call_chain kernel/notifier.c:87 [inline] raw_notifier_call_chain+0xe7/0x170 kernel/notifier.c:455 call_netdevice_notifiers_info net/core/dev.c:1945 [inline] call_netdevice_notifiers_extack net/core/dev.c:1983 [inline] call_netdevice_notifiers+0x14e/0x1d0 net/core/dev.c:1997 register_netdevice+0x15d5/0x1a20 net/core/dev.c:10103 __ip_tunnel_create+0x2af/0x370 net/ipv4/ip_tunnel.c:267 ip_tunnel_init_net+0x219/0x700 net/ipv4/ip_tunnel.c:1073 ops_init+0x313/0x430 net/core/net_namespace.c:135 setup_net+0x4bb/0xc10 net/core/net_namespace.c:326 copy_net_ns+0x359/0x5b0 net/core/net_namespace.c:472 create_new_namespaces+0x4db/0x8e0 kernel/nsproxy.c:110 copy_namespaces+0x333/0x3b0 kernel/nsproxy.c:178 copy_process+0x1af7/0x4010 kernel/fork.c:2260 kernel_clone+0x22f/0x7a0 kernel/fork.c:2674 __do_sys_clone kernel/fork.c:2808 [inline] __se_sys_clone kernel/fork.c:2792 [inline] __x64_sys_clone+0x276/0x2e0 kernel/fork.c:2792 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Last potentially related work creation: kasan_save_stack+0x3b/0x60 mm/kasan/common.c:38 __kasan_record_aux_stack+0xaf/0xc0 mm/kasan/generic.c:348 insert_work+0x54/0x3e0 kernel/workqueue.c:1358 __queue_work+0xa31/0xce0 kernel/workqueue.c:1517 call_timer_fn+0xf5/0x210 kernel/time/timer.c:1474 expire_timers kernel/time/timer.c:1514 [inline] __run_timers+0x7a2/0x980 kernel/time/timer.c:1790 run_timer_softirq+0x63/0xf0 kernel/time/timer.c:1803 __do_softirq+0x382/0x793 kernel/softirq.c:571 The buggy address belongs to the object at ffff88807b335c00 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 208 bytes inside of 512-byte region [ffff88807b335c00, ffff88807b335e00) The buggy address belongs to the physical page: page:ffffea0001eccd00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x7b334 head:ffffea0001eccd00 order:2 compound_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 dead000000000100 dead000000000122 ffff888012041c80 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 0xd2a20(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 15, tgid 15 (ksoftirqd/0), ts 75621007704, free_ts 66466377098 prep_new_page mm/page_alloc.c:2532 [inline] get_page_from_freelist+0x72b/0x7a0 mm/page_alloc.c:4283 __alloc_pages+0x259/0x560 mm/page_alloc.c:5515 alloc_slab_page+0x70/0xf0 mm/slub.c:1824 allocate_slab+0x5e/0x520 mm/slub.c:1969 new_slab mm/slub.c:2029 [inline] ___slab_alloc+0x42e/0xce0 mm/slub.c:3031 __slab_alloc mm/slub.c:3118 [inline] slab_alloc_node mm/slub.c:3209 [inline] __kmalloc_node_track_caller+0x2bd/0x3f0 mm/slub.c:4955 kmalloc_reserve net/core/skbuff.c:362 [inline] __alloc_skb+0x11d/0x620 net/core/skbuff.c:434 __napi_alloc_skb+0x16b/0x680 net/core/skbuff.c:575 napi_alloc_skb include/linux/skbuff.h:3207 [inline] page_to_skb+0x299/0xb80 drivers/net/virtio_net.c:496 receive_mergeable+0x34e/0x26e0 drivers/net/virtio_net.c:1119 receive_buf+0x15c/0x1c80 drivers/net/virtio_net.c:1258 virtnet_receive drivers/net/virtio_net.c:1553 [inline] virtnet_poll+0x64e/0x12a0 drivers/net/virtio_net.c:1671 __napi_poll+0xbe/0x4b0 net/core/dev.c:6511 napi_poll net/core/dev.c:6578 [inline] net_rx_action+0x76c/0x10b0 net/core/dev.c:6689 __do_softirq+0x382/0x793 kernel/softirq.c:571 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+0x812/0x900 mm/page_alloc.c:1499 free_unref_page_prepare mm/page_alloc.c:3380 [inline] free_unref_page+0x7d/0x630 mm/page_alloc.c:3476 qlist_free_all+0x2b/0x70 mm/kasan/quarantine.c:187 kasan_quarantine_reduce+0x169/0x180 mm/kasan/quarantine.c:294 __kasan_slab_alloc+0x2f/0xe0 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_node mm/slub.c:3243 [inline] kmem_cache_alloc_node+0x1cc/0x350 mm/slub.c:3293 __alloc_skb+0xd5/0x620 net/core/skbuff.c:422 alloc_skb_fclone include/linux/skbuff.h:1307 [inline] tcp_stream_alloc_skb+0x3c/0x300 net/ipv4/tcp.c:861 tcp_sendmsg_locked+0xdcf/0x41b0 net/ipv4/tcp.c:1325 tcp_sendmsg+0x2c/0x40 net/ipv4/tcp.c:1483 sock_sendmsg_nosec net/socket.c:714 [inline] sock_sendmsg net/socket.c:734 [inline] sock_write_iter+0x3d4/0x540 net/socket.c:1108 call_write_iter include/linux/fs.h:2187 [inline] new_sync_write fs/read_write.c:491 [inline] vfs_write+0x7b5/0xbb0 fs/read_write.c:578 ksys_write+0x19b/0x2c0 fs/read_write.c:631 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Memory state around the buggy address: ffff88807b335b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88807b335c00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88807b335c80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88807b335d00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88807b335d80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================