Bluetooth: Unexpected start frame (len 12) Bluetooth: Unexpected start frame (len 12) Bluetooth: Unexpected start frame (len 12) ================================================================== BUG: KASAN: slab-use-after-free in instrument_atomic_read include/linux/instrumented.h:68 [inline] BUG: KASAN: slab-use-after-free in atomic_read include/linux/atomic/atomic-instrumented.h:32 [inline] BUG: KASAN: slab-use-after-free in refcount_read include/linux/refcount.h:136 [inline] BUG: KASAN: slab-use-after-free in skb_unref include/linux/skbuff.h:1227 [inline] BUG: KASAN: slab-use-after-free in __kfree_skb_reason net/core/skbuff.c:1116 [inline] BUG: KASAN: slab-use-after-free in kfree_skb_reason+0x36/0x210 net/core/skbuff.c:1143 Read of size 4 at addr ffff88802df1d364 by task kworker/u5:8/5102 CPU: 1 PID: 5102 Comm: kworker/u5:8 Not tainted 6.7.0-syzkaller-11091-g296455ade1fd #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/17/2023 Workqueue: hci5 hci_rx_work Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd9/0x1b0 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:377 [inline] print_report+0xc4/0x620 mm/kasan/report.c:488 kasan_report+0xda/0x110 mm/kasan/report.c:601 check_region_inline mm/kasan/generic.c:183 [inline] kasan_check_range+0xef/0x190 mm/kasan/generic.c:189 instrument_atomic_read include/linux/instrumented.h:68 [inline] atomic_read include/linux/atomic/atomic-instrumented.h:32 [inline] refcount_read include/linux/refcount.h:136 [inline] skb_unref include/linux/skbuff.h:1227 [inline] __kfree_skb_reason net/core/skbuff.c:1116 [inline] kfree_skb_reason+0x36/0x210 net/core/skbuff.c:1143 kfree_skb include/linux/skbuff.h:1244 [inline] l2cap_recv_reset net/bluetooth/l2cap_core.c:8485 [inline] l2cap_recv_acldata+0x11c/0xbf0 net/bluetooth/l2cap_core.c:8513 hci_acldata_packet net/bluetooth/hci_core.c:3875 [inline] hci_rx_work+0xaa7/0x1610 net/bluetooth/hci_core.c:4110 process_one_work+0x886/0x15d0 kernel/workqueue.c:2633 process_scheduled_works kernel/workqueue.c:2706 [inline] worker_thread+0x8b9/0x1290 kernel/workqueue.c:2787 kthread+0x2c6/0x3a0 kernel/kthread.c:388 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:242 Allocated by task 5102: kasan_save_stack+0x33/0x50 mm/kasan/common.c:47 kasan_save_track+0x14/0x30 mm/kasan/common.c:68 unpoison_slab_object mm/kasan/common.c:314 [inline] __kasan_slab_alloc+0x81/0x90 mm/kasan/common.c:340 kasan_slab_alloc include/linux/kasan.h:201 [inline] slab_post_alloc_hook mm/slub.c:3813 [inline] slab_alloc_node mm/slub.c:3860 [inline] kmem_cache_alloc_node+0x177/0x340 mm/slub.c:3903 __alloc_skb+0x287/0x330 net/core/skbuff.c:641 alloc_skb include/linux/skbuff.h:1296 [inline] bt_skb_alloc include/net/bluetooth/bluetooth.h:487 [inline] l2cap_recv_frag+0x139/0x2b0 net/bluetooth/l2cap_core.c:8432 l2cap_recv_acldata+0x294/0xbf0 net/bluetooth/l2cap_core.c:8544 hci_acldata_packet net/bluetooth/hci_core.c:3875 [inline] hci_rx_work+0xaa7/0x1610 net/bluetooth/hci_core.c:4110 process_one_work+0x886/0x15d0 kernel/workqueue.c:2633 process_scheduled_works kernel/workqueue.c:2706 [inline] worker_thread+0x8b9/0x1290 kernel/workqueue.c:2787 kthread+0x2c6/0x3a0 kernel/kthread.c:388 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:242 Freed by task 51: kasan_save_stack+0x33/0x50 mm/kasan/common.c:47 kasan_save_track+0x14/0x30 mm/kasan/common.c:68 kasan_save_free_info+0x3f/0x60 mm/kasan/generic.c:640 poison_slab_object mm/kasan/common.c:241 [inline] __kasan_slab_free+0x121/0x1b0 mm/kasan/common.c:257 kasan_slab_free include/linux/kasan.h:184 [inline] slab_free_hook mm/slub.c:2121 [inline] slab_free mm/slub.c:4299 [inline] kmem_cache_free+0x129/0x350 mm/slub.c:4363 kfree_skbmem+0xef/0x1b0 net/core/skbuff.c:1051 __kfree_skb net/core/skbuff.c:1109 [inline] kfree_skb_reason+0x13a/0x210 net/core/skbuff.c:1144 kfree_skb include/linux/skbuff.h:1244 [inline] l2cap_conn_del+0xa4/0x740 net/bluetooth/l2cap_core.c:1899 l2cap_connect_cfm+0xa10/0xfb0 net/bluetooth/l2cap_core.c:8248 hci_connect_cfm include/net/bluetooth/hci_core.h:1986 [inline] hci_conn_failed+0x1c3/0x370 net/bluetooth/hci_conn.c:1289 hci_abort_conn_sync+0x758/0xb50 net/bluetooth/hci_sync.c:5356 abort_conn_sync+0x187/0x390 net/bluetooth/hci_conn.c:2988 hci_cmd_sync_work+0x1a4/0x410 net/bluetooth/hci_sync.c:306 process_one_work+0x886/0x15d0 kernel/workqueue.c:2633 process_scheduled_works kernel/workqueue.c:2706 [inline] worker_thread+0x8b9/0x1290 kernel/workqueue.c:2787 kthread+0x2c6/0x3a0 kernel/kthread.c:388 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:242 The buggy address belongs to the object at ffff88802df1d280 which belongs to the cache skbuff_head_cache of size 240 The buggy address is located 228 bytes inside of freed 240-byte region [ffff88802df1d280, ffff88802df1d370) The buggy address belongs to the physical page: page:ffffea0000b7c740 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x2df1d flags: 0xfff00000000800(slab|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000000800 ffff88801769c640 ffffea0000b2b700 dead000000000006 raw: 0000000000000000 00000000000c000c 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 0x12820(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY), pid 5060, tgid 5053 (syz-fuzzer), ts 143753724769, free_ts 143262395120 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x2d0/0x350 mm/page_alloc.c:1533 prep_new_page mm/page_alloc.c:1540 [inline] get_page_from_freelist+0xa28/0x3780 mm/page_alloc.c:3311 __alloc_pages+0x22f/0x2440 mm/page_alloc.c:4567 __alloc_pages_node include/linux/gfp.h:238 [inline] alloc_pages_node include/linux/gfp.h:261 [inline] alloc_slab_page mm/slub.c:2190 [inline] allocate_slab mm/slub.c:2354 [inline] new_slab+0xcc/0x3a0 mm/slub.c:2407 ___slab_alloc+0x4af/0x19a0 mm/slub.c:3540 __kmem_cache_alloc_bulk mm/slub.c:4574 [inline] kmem_cache_alloc_bulk+0x27a/0x940 mm/slub.c:4648 napi_skb_cache_get+0x103/0x190 net/core/skbuff.c:331 __napi_build_skb+0x14/0x50 net/core/skbuff.c:510 __napi_alloc_skb+0x3a7/0x6f0 net/core/skbuff.c:829 napi_alloc_skb include/linux/skbuff.h:3292 [inline] page_to_skb+0x150/0xad0 drivers/net/virtio_net.c:569 receive_mergeable drivers/net/virtio_net.c:1683 [inline] receive_buf+0x115a/0x5160 drivers/net/virtio_net.c:1804 virtnet_receive drivers/net/virtio_net.c:2110 [inline] virtnet_poll+0xa07/0x1840 drivers/net/virtio_net.c:2203 __napi_poll.constprop.0+0xb4/0x540 net/core/dev.c:6576 napi_poll net/core/dev.c:6645 [inline] net_rx_action+0x956/0xe90 net/core/dev.c:6778 __do_softirq+0x21a/0x8de kernel/softirq.c:553 page last free pid 5051 tgid 5051 stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1140 [inline] free_unref_page_prepare+0x51f/0xb10 mm/page_alloc.c:2346 free_unref_page+0x33/0x3c0 mm/page_alloc.c:2486 __put_partials+0x14c/0x160 mm/slub.c:2922 qlink_free mm/kasan/quarantine.c:160 [inline] qlist_free_all+0x58/0x150 mm/kasan/quarantine.c:176 kasan_quarantine_reduce+0x18e/0x1d0 mm/kasan/quarantine.c:283 __kasan_slab_alloc+0x65/0x90 mm/kasan/common.c:324 kasan_slab_alloc include/linux/kasan.h:201 [inline] slab_post_alloc_hook mm/slub.c:3813 [inline] slab_alloc_node mm/slub.c:3860 [inline] kmem_cache_alloc_node+0x177/0x340 mm/slub.c:3903 __alloc_skb+0x287/0x330 net/core/skbuff.c:641 alloc_skb_fclone include/linux/skbuff.h:1346 [inline] tcp_stream_alloc_skb+0x34/0x560 net/ipv4/tcp.c:871 tcp_sendmsg_locked+0xea9/0x3440 net/ipv4/tcp.c:1153 tcp_sendmsg+0x2e/0x40 net/ipv4/tcp.c:1340 inet_sendmsg+0x9d/0xe0 net/ipv4/af_inet.c:847 sock_sendmsg_nosec net/socket.c:730 [inline] __sock_sendmsg+0xd5/0x180 net/socket.c:745 sock_write_iter+0x29b/0x3d0 net/socket.c:1160 call_write_iter include/linux/fs.h:2085 [inline] new_sync_write fs/read_write.c:497 [inline] vfs_write+0x64f/0xdf0 fs/read_write.c:590 ksys_write+0x1f0/0x250 fs/read_write.c:643 Memory state around the buggy address: ffff88802df1d200: fb fb fb fb fb fb fc fc fc fc fc fc fc fc fc fc ffff88802df1d280: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88802df1d300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fc fc ^ ffff88802df1d380: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb ffff88802df1d400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================