================================================================== BUG: KASAN: slab-use-after-free in skb_dst_drop include/net/dst.h:274 [inline] BUG: KASAN: slab-use-after-free in skb_release_head_state+0x283/0x2b0 net/core/skbuff.c:1157 Read of size 8 at addr ffff8880588e0698 by task syz-executor.2/12653 CPU: 3 PID: 12653 Comm: syz-executor.2 Not tainted 6.10.0-rc3-syzkaller-00021-g2ef5971ff345 #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.2-debian-1.16.2-1 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:114 print_address_description mm/kasan/report.c:377 [inline] print_report+0xc3/0x620 mm/kasan/report.c:488 kasan_report+0xd9/0x110 mm/kasan/report.c:601 skb_dst_drop include/net/dst.h:274 [inline] skb_release_head_state+0x283/0x2b0 net/core/skbuff.c:1157 skb_release_all net/core/skbuff.c:1171 [inline] __kfree_skb net/core/skbuff.c:1187 [inline] kfree_skb_reason+0xed/0x210 net/core/skbuff.c:1223 kfree_skb include/linux/skbuff.h:1257 [inline] __hci_req_sync+0x61d/0x980 net/bluetooth/hci_request.c:184 hci_req_sync+0x97/0xd0 net/bluetooth/hci_request.c:206 hci_dev_cmd+0x634/0x960 net/bluetooth/hci_core.c:787 hci_sock_ioctl+0x4f3/0x880 net/bluetooth/hci_sock.c:1150 hci_sock_compat_ioctl net/bluetooth/hci_sock.c:1177 [inline] hci_sock_compat_ioctl+0x68/0x80 net/bluetooth/hci_sock.c:1166 compat_sock_ioctl+0x181/0x7f0 net/socket.c:3522 __do_compat_sys_ioctl+0x2c3/0x330 fs/ioctl.c:1007 do_syscall_32_irqs_on arch/x86/entry/common.c:165 [inline] __do_fast_syscall_32+0x73/0x120 arch/x86/entry/common.c:386 do_fast_syscall_32+0x32/0x80 arch/x86/entry/common.c:411 entry_SYSENTER_compat_after_hwframe+0x84/0x8e RIP: 0023:0xf7286579 Code: b8 01 10 06 03 74 b4 01 10 07 03 74 b0 01 10 08 03 74 d8 01 00 00 00 00 00 00 00 00 00 00 00 00 00 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 90 90 90 90 8d b4 26 00 00 00 00 8d b4 26 00 00 00 00 RSP: 002b:00000000ffbb2374 EFLAGS: 00000292 ORIG_RAX: 0000000000000036 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00000000400448dd RDX: 00000000ffbb23c4 RSI: 00000000f73dcff4 RDI: 0000000000000003 RBP: 0000000000000003 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000292 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 Allocated by task 65: kasan_save_stack+0x33/0x60 mm/kasan/common.c:47 kasan_save_track+0x14/0x30 mm/kasan/common.c:68 unpoison_slab_object mm/kasan/common.c:312 [inline] __kasan_slab_alloc+0x89/0x90 mm/kasan/common.c:338 kasan_slab_alloc include/linux/kasan.h:201 [inline] slab_post_alloc_hook mm/slub.c:3941 [inline] slab_alloc_node mm/slub.c:4001 [inline] kmem_cache_alloc_noprof+0x121/0x2f0 mm/slub.c:4008 skb_clone+0x190/0x3f0 net/core/skbuff.c:2052 hci_send_cmd_sync net/bluetooth/hci_core.c:4123 [inline] hci_cmd_work+0x66a/0x710 net/bluetooth/hci_core.c:4143 process_one_work+0x958/0x1ad0 kernel/workqueue.c:3231 process_scheduled_works kernel/workqueue.c:3312 [inline] worker_thread+0x6c8/0xf70 kernel/workqueue.c:3393 kthread+0x2c1/0x3a0 kernel/kthread.c:389 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 Freed by task 65: kasan_save_stack+0x33/0x60 mm/kasan/common.c:47 kasan_save_track+0x14/0x30 mm/kasan/common.c:68 kasan_save_free_info+0x3b/0x60 mm/kasan/generic.c:579 poison_slab_object+0xf7/0x160 mm/kasan/common.c:240 __kasan_slab_free+0x32/0x50 mm/kasan/common.c:256 kasan_slab_free include/linux/kasan.h:184 [inline] slab_free_hook mm/slub.c:2196 [inline] slab_free mm/slub.c:4437 [inline] kmem_cache_free+0x12f/0x3a0 mm/slub.c:4512 kfree_skbmem+0x10e/0x200 net/core/skbuff.c:1131 __kfree_skb net/core/skbuff.c:1188 [inline] kfree_skb_reason+0x138/0x210 net/core/skbuff.c:1223 kfree_skb include/linux/skbuff.h:1257 [inline] hci_req_sync_complete+0x16c/0x270 net/bluetooth/hci_request.c:109 hci_event_packet+0x963/0x1190 net/bluetooth/hci_event.c:7479 hci_rx_work+0x2c4/0x1610 net/bluetooth/hci_core.c:4074 process_one_work+0x958/0x1ad0 kernel/workqueue.c:3231 process_scheduled_works kernel/workqueue.c:3312 [inline] worker_thread+0x6c8/0xf70 kernel/workqueue.c:3393 kthread+0x2c1/0x3a0 kernel/kthread.c:389 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 The buggy address belongs to the object at ffff8880588e0640 which belongs to the cache skbuff_head_cache of size 240 The buggy address is located 88 bytes inside of freed 240-byte region [ffff8880588e0640, ffff8880588e0730) The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x588e0 head: order:1 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0x4fff00000000040(head|node=1|zone=1|lastcpupid=0x7ff) page_type: 0xffffefff(slab) raw: 04fff00000000040 ffff888016f66780 dead000000000100 dead000000000122 raw: 0000000000000000 0000000000190019 00000001ffffefff 0000000000000000 head: 04fff00000000040 ffff888016f66780 dead000000000100 dead000000000122 head: 0000000000000000 0000000000190019 00000001ffffefff 0000000000000000 head: 04fff00000000001 ffffea0001623801 ffffffffffffffff 0000000000000000 head: 0000000000000002 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 1, migratetype Unmovable, gfp_mask 0x152820(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_HARDWALL), pid 12618, tgid 12618 (syz-executor.1), ts 392207552922, free_ts 354415832073 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x2d1/0x350 mm/page_alloc.c:1468 prep_new_page mm/page_alloc.c:1476 [inline] get_page_from_freelist+0x136a/0x2e50 mm/page_alloc.c:3420 __alloc_pages_noprof+0x22b/0x2460 mm/page_alloc.c:4678 __alloc_pages_node_noprof include/linux/gfp.h:269 [inline] alloc_pages_node_noprof include/linux/gfp.h:296 [inline] alloc_slab_page+0x56/0x110 mm/slub.c:2265 allocate_slab mm/slub.c:2428 [inline] new_slab+0x84/0x260 mm/slub.c:2481 ___slab_alloc+0xdac/0x1870 mm/slub.c:3667 __kmem_cache_alloc_bulk mm/slub.c:4723 [inline] kmem_cache_alloc_bulk_noprof+0x249/0x8e0 mm/slub.c:4795 napi_skb_cache_get+0x154/0x210 net/core/skbuff.c:346 __napi_build_skb net/core/skbuff.c:525 [inline] napi_alloc_skb+0x2b2/0x5d0 net/core/skbuff.c:843 napi_get_frags net/core/gro.c:680 [inline] napi_get_frags+0x61/0x140 net/core/gro.c:675 napi_get_frags_check+0x2e/0xa0 net/core/skbuff.c:300 netif_napi_add_weight+0x538/0xab0 net/core/dev.c:6619 netif_napi_add include/linux/netdevice.h:2638 [inline] gro_cells_init net/core/gro_cells.c:85 [inline] gro_cells_init+0x193/0x2f0 net/core/gro_cells.c:70 ip_tunnel_init+0x1de/0x760 net/ipv4/ip_tunnel.c:1326 ipgre_tunnel_init+0x207/0x4f0 net/ipv4/ip_gre.c:1046 register_netdevice+0x59f/0x1c40 net/core/dev.c:10302 page last free pid 9244 tgid 9244 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1088 [inline] __free_pages_ok+0x5b6/0xbd0 mm/page_alloc.c:1208 __folio_put+0x239/0x360 mm/swap.c:129 kvfree+0x47/0x50 mm/util.c:680 btree_bounce_free fs/bcachefs/btree_io.c:118 [inline] btree_node_sort+0xf9f/0x14f0 fs/bcachefs/btree_io.c:386 bch2_btree_post_write_cleanup fs/bcachefs/btree_io.c:2271 [inline] bch2_btree_post_write_cleanup+0x145/0x600 fs/bcachefs/btree_io.c:2245 bch2_btree_node_write+0x282/0x2f0 fs/bcachefs/btree_io.c:2312 btree_node_write_if_need fs/bcachefs/btree_io.h:151 [inline] __btree_node_flush+0x2fb/0x3c0 fs/bcachefs/btree_trans_commit.c:250 journal_flush_pins.constprop.0+0x4b6/0xa50 fs/bcachefs/journal_reclaim.c:553 journal_flush_done+0x253/0x2c0 fs/bcachefs/journal_reclaim.c:809 bch2_journal_flush_pins+0x1ae/0x240 fs/bcachefs/journal_reclaim.c:839 bch2_journal_flush_all_pins fs/bcachefs/journal_reclaim.h:76 [inline] __bch2_fs_read_only+0x13a/0x500 fs/bcachefs/super.c:276 bch2_fs_read_only+0x9b2/0xf10 fs/bcachefs/super.c:356 __bch2_fs_stop+0xfc/0x540 fs/bcachefs/super.c:613 generic_shutdown_super+0x159/0x3d0 fs/super.c:642 bch2_kill_sb+0x3b/0x50 fs/bcachefs/fs.c:2034 deactivate_locked_super+0xbe/0x1a0 fs/super.c:473 Memory state around the buggy address: ffff8880588e0580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fc fc ffff8880588e0600: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb >ffff8880588e0680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880588e0700: fb fb fb fb fb fb fc fc fc fc fc fc fc fc fc fc ffff8880588e0780: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== ---------------- Code disassembly (best guess), 2 bytes skipped: 0: 10 06 adc %al,(%rsi) 2: 03 74 b4 01 add 0x1(%rsp,%rsi,4),%esi 6: 10 07 adc %al,(%rdi) 8: 03 74 b0 01 add 0x1(%rax,%rsi,4),%esi c: 10 08 adc %cl,(%rax) e: 03 74 d8 01 add 0x1(%rax,%rbx,8),%esi 1e: 00 51 52 add %dl,0x52(%rcx) 21: 55 push %rbp 22: 89 e5 mov %esp,%ebp 24: 0f 34 sysenter 26: cd 80 int $0x80 * 28: 5d pop %rbp <-- trapping instruction 29: 5a pop %rdx 2a: 59 pop %rcx 2b: c3 ret 2c: 90 nop 2d: 90 nop 2e: 90 nop 2f: 90 nop 30: 8d b4 26 00 00 00 00 lea 0x0(%rsi,%riz,1),%esi 37: 8d b4 26 00 00 00 00 lea 0x0(%rsi,%riz,1),%esi