================================================================== BUG: KASAN: use-after-free in rht_ptr_rcu include/linux/rhashtable.h:376 [inline] BUG: KASAN: use-after-free in __rhashtable_lookup include/linux/rhashtable.h:607 [inline] BUG: KASAN: use-after-free in rhashtable_lookup+0x30e/0x860 include/linux/rhashtable.h:646 Read of size 8 at addr ffff8882033b1868 by task syz.4.19/6912 CPU: 0 UID: 0 PID: 6912 Comm: syz.4.19 Not tainted 6.13.0-rc1-syzkaller-00182-gb8f52214c61a #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0x169/0x550 mm/kasan/report.c:489 kasan_report+0x143/0x180 mm/kasan/report.c:602 rht_ptr_rcu include/linux/rhashtable.h:376 [inline] __rhashtable_lookup include/linux/rhashtable.h:607 [inline] rhashtable_lookup+0x30e/0x860 include/linux/rhashtable.h:646 br_mdb_ip_get_rcu net/bridge/br_multicast.c:102 [inline] br_mdb_entry_skb_get+0x67e/0x9a0 net/bridge/br_multicast.c:198 br_handle_frame_finish+0xebf/0x1fe0 net/bridge/br_input.c:183 br_nf_hook_thresh+0x472/0x590 br_nf_pre_routing_finish_ipv6+0xaa0/0xdd0 NF_HOOK include/linux/netfilter.h:314 [inline] br_nf_pre_routing_ipv6+0x379/0x770 net/bridge/br_netfilter_ipv6.c:184 nf_hook_entry_hookfn include/linux/netfilter.h:154 [inline] nf_hook_bridge_pre net/bridge/br_input.c:277 [inline] br_handle_frame+0x9fd/0x1530 net/bridge/br_input.c:424 __netif_receive_skb_core+0x14eb/0x4690 net/core/dev.c:5566 __netif_receive_skb_one_core net/core/dev.c:5670 [inline] __netif_receive_skb+0x12f/0x650 net/core/dev.c:5785 process_backlog+0x662/0x15b0 net/core/dev.c:6117 __napi_poll+0xcb/0x490 net/core/dev.c:6883 napi_poll net/core/dev.c:6952 [inline] net_rx_action+0x89b/0x1240 net/core/dev.c:7074 handle_softirqs+0x2d4/0x9b0 kernel/softirq.c:554 __do_softirq kernel/softirq.c:588 [inline] invoke_softirq kernel/softirq.c:428 [inline] __irq_exit_rcu+0xf7/0x220 kernel/softirq.c:655 irq_exit_rcu+0x9/0x30 kernel/softirq.c:671 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1049 [inline] sysvec_apic_timer_interrupt+0xa6/0xc0 arch/x86/kernel/apic/apic.c:1049 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702 RIP: 0010:get_current arch/x86/include/asm/current.h:49 [inline] RIP: 0010:__sanitizer_cov_trace_pc+0x8/0x70 kernel/kcov.c:216 Code: 8b 3d e4 50 8d 0c 48 89 de 5b e9 03 a2 5b 00 0f 1f 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 f3 0f 1e fa 48 8b 04 24 <65> 48 8b 0c 25 80 d4 03 00 65 8b 15 b0 62 64 7e 81 e2 00 01 ff 00 RSP: 0018:ffffc90003126b58 EFLAGS: 00000202 RAX: ffffffff81938cdb RBX: 1ffff110170e88b9 RCX: ffff88805ff3bc00 RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000000 RBP: ffffc90003126d50 R08: ffffffff81938caa R09: 1ffffffff203036e R10: dffffc0000000000 R11: fffffbfff203036f R12: dffffc0000000000 R13: ffff8880b87445c8 R14: ffff8880b863f940 R15: 0000000000000001 csd_lock_wait kernel/smp.c:340 [inline] smp_call_function_many_cond+0x1a0b/0x2c60 kernel/smp.c:884 on_each_cpu_cond_mask+0x3f/0x80 kernel/smp.c:1051 on_each_cpu include/linux/smp.h:71 [inline] flush_tlb_kernel_range+0x19b/0x230 arch/x86/mm/tlb.c:1074 pmd_free_pte_page+0x144/0x1a0 arch/x86/mm/pgtable.c:881 vmap_try_huge_pmd mm/vmalloc.c:153 [inline] vmap_pmd_range mm/vmalloc.c:172 [inline] vmap_pud_range mm/vmalloc.c:228 [inline] vmap_p4d_range mm/vmalloc.c:279 [inline] vmap_range_noflush+0x5f3/0xca0 mm/vmalloc.c:303 __vmap_pages_range_noflush+0x9a7/0xba0 mm/vmalloc.c:621 vmap_pages_range_noflush mm/vmalloc.c:641 [inline] vmap_pages_range mm/vmalloc.c:661 [inline] __vmalloc_area_node mm/vmalloc.c:3711 [inline] __vmalloc_node_range_noprof+0xf5c/0x1380 mm/vmalloc.c:3844 __kvmalloc_node_noprof+0x142/0x190 mm/util.c:672 __bch2_darray_resize_noprof+0xd8/0x240 fs/bcachefs/darray.c:24 bch2_fs_btree_write_buffer_init+0x264/0x2e0 fs/bcachefs/btree_write_buffer.c:844 bch2_fs_alloc fs/bcachefs/super.c:921 [inline] bch2_fs_open+0x2b79/0x2f80 fs/bcachefs/super.c:2065 bch2_fs_get_tree+0x738/0x1710 fs/bcachefs/fs.c:2157 vfs_get_tree+0x90/0x2b0 fs/super.c:1814 do_new_mount+0x2be/0xb40 fs/namespace.c:3507 do_mount fs/namespace.c:3847 [inline] __do_sys_mount fs/namespace.c:4057 [inline] __se_sys_mount+0x2d6/0x3c0 fs/namespace.c:4034 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fe48c37ffba Code: d8 64 89 02 48 c7 c0 ff ff ff ff eb a6 e8 de 1a 00 00 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fe48d1bde68 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007fe48d1bdef0 RCX: 00007fe48c37ffba RDX: 00000000200000c0 RSI: 0000000020000100 RDI: 00007fe48d1bdeb0 RBP: 00000000200000c0 R08: 00007fe48d1bdef0 R09: 0000000000800000 R10: 0000000000800000 R11: 0000000000000246 R12: 0000000020000100 R13: 00007fe48d1bdeb0 R14: 000000000000597f R15: 0000000020005bc0 The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x2033b1 flags: 0x57ff00000000000(node=1|zone=2|lastcpupid=0x7ff) raw: 057ff00000000000 ffffea00080cec48 ffffea00080cec48 0000000000000000 raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner info is not present (never set?) Memory state around the buggy address: ffff8882033b1700: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff8882033b1780: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff8882033b1800: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff8882033b1880: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff8882033b1900: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ================================================================== ---------------- Code disassembly (best guess): 0: 8b 3d e4 50 8d 0c mov 0xc8d50e4(%rip),%edi # 0xc8d50ea 6: 48 89 de mov %rbx,%rsi 9: 5b pop %rbx a: e9 03 a2 5b 00 jmp 0x5ba212 f: 0f 1f 00 nopl (%rax) 12: 90 nop 13: 90 nop 14: 90 nop 15: 90 nop 16: 90 nop 17: 90 nop 18: 90 nop 19: 90 nop 1a: 90 nop 1b: 90 nop 1c: 90 nop 1d: 90 nop 1e: 90 nop 1f: 90 nop 20: 90 nop 21: 90 nop 22: f3 0f 1e fa endbr64 26: 48 8b 04 24 mov (%rsp),%rax * 2a: 65 48 8b 0c 25 80 d4 mov %gs:0x3d480,%rcx <-- trapping instruction 31: 03 00 33: 65 8b 15 b0 62 64 7e mov %gs:0x7e6462b0(%rip),%edx # 0x7e6462ea 3a: 81 e2 00 01 ff 00 and $0xff0100,%edx