================================================================== BUG: KASAN: use-after-free in rht_key_hashfn include/linux/rhashtable.h:159 [inline] BUG: KASAN: use-after-free in __rhashtable_lookup include/linux/rhashtable.h:604 [inline] BUG: KASAN: use-after-free in rhashtable_lookup include/linux/rhashtable.h:646 [inline] BUG: KASAN: use-after-free in rhashtable_lookup_fast+0x77a/0x9b0 include/linux/rhashtable.h:672 Read of size 4 at addr ffff888068fe8008 by task syz.4.2288/11617 CPU: 1 PID: 11617 Comm: syz.4.2288 Not tainted 6.10.0-syzkaller-04483-g0be9ae5486cd #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/27/2024 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:114 print_address_description mm/kasan/report.c:377 [inline] print_report+0x169/0x550 mm/kasan/report.c:488 kasan_report+0x143/0x180 mm/kasan/report.c:601 rht_key_hashfn include/linux/rhashtable.h:159 [inline] __rhashtable_lookup include/linux/rhashtable.h:604 [inline] rhashtable_lookup include/linux/rhashtable.h:646 [inline] rhashtable_lookup_fast+0x77a/0x9b0 include/linux/rhashtable.h:672 ila_lookup_wildcards net/ipv6/ila/ila_xlat.c:132 [inline] ila_xlat_addr net/ipv6/ila/ila_xlat.c:652 [inline] ila_nf_input+0x1fe/0x3c0 net/ipv6/ila/ila_xlat.c:190 nf_hook_entry_hookfn include/linux/netfilter.h:154 [inline] nf_hook_slow+0xc3/0x220 net/netfilter/core.c:626 nf_hook include/linux/netfilter.h:269 [inline] NF_HOOK+0x29e/0x450 include/linux/netfilter.h:312 __netif_receive_skb_one_core net/core/dev.c:5660 [inline] __netif_receive_skb+0x1ea/0x650 net/core/dev.c:5774 process_backlog+0x662/0x15b0 net/core/dev.c:6107 __napi_poll+0xcb/0x490 net/core/dev.c:6771 napi_poll net/core/dev.c:6840 [inline] net_rx_action+0x89b/0x1240 net/core/dev.c:6962 handle_softirqs+0x2c4/0x970 kernel/softirq.c:554 __do_softirq kernel/softirq.c:588 [inline] invoke_softirq kernel/softirq.c:428 [inline] __irq_exit_rcu+0xf4/0x1c0 kernel/softirq.c:637 irq_exit_rcu+0x9/0x30 kernel/softirq.c:649 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1043 [inline] sysvec_apic_timer_interrupt+0xa6/0xc0 arch/x86/kernel/apic/apic.c:1043 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702 RIP: 0010:preempt_schedule_irq+0xf6/0x1c0 kernel/sched/core.c:6851 Code: 89 f5 49 c1 ed 03 eb 0d 48 f7 03 08 00 00 00 0f 84 8b 00 00 00 bf 01 00 00 00 e8 25 59 d0 f5 e8 00 57 08 f6 fb bf 01 00 00 00 55 ad ff ff 43 80 7c 3d 00 00 74 08 4c 89 f7 e8 25 29 67 f6 48 RSP: 0018:ffffc90002d4f280 EFLAGS: 00000282 RAX: cde7e63586631000 RBX: 1ffff920005a9e58 RCX: ffffffff8173011a RDX: dffffc0000000000 RSI: ffffffff8bcac920 RDI: 0000000000000001 RBP: ffffc90002d4f340 R08: ffffffff92fcf65f R09: 1ffffffff25f9ecb R10: dffffc0000000000 R11: fffffbfff25f9ecc R12: 1ffff920005a9e50 R13: 1ffff920005a9e54 R14: ffffc90002d4f2a0 R15: dffffc0000000000 irqentry_exit+0x5e/0x90 kernel/entry/common.c:354 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702 RIP: 0010:slab_obj_exts mm/slab.h:548 [inline] RIP: 0010:__memcg_slab_post_alloc_hook+0x45c/0x7e0 mm/memcontrol.c:3780 Code: 83 f8 20 0f 83 c1 01 00 00 89 d1 41 d3 ed 45 89 ef be 01 00 00 00 48 8b 7c 24 10 e8 0e b2 00 00 48 b8 00 00 00 00 00 fc ff df <80> 3c 03 00 74 08 4c 89 e7 e8 46 f7 f7 ff 49 8b 04 24 48 85 c0 4c RSP: 0018:ffffc90002d4f408 EFLAGS: 00000287 RAX: dffffc0000000000 RBX: 1ffffd4000329cc7 RCX: ffffc90002d4f303 RDX: 0000000000000001 RSI: ffffffff8bcadaa0 RDI: ffffffff8c2045a0 RBP: 0000000000000ac0 R08: ffffffff8fae37af R09: 1ffffffff1f5c6f5 R10: dffffc0000000000 R11: fffffbfff1f5c6f6 R12: ffffea000194e638 R13: 0000000000000004 R14: ffffea000194e600 R15: 0000000000000004 memcg_slab_post_alloc_hook mm/slub.c:2104 [inline] slab_post_alloc_hook mm/slub.c:3963 [inline] slab_alloc_node mm/slub.c:4002 [inline] kmem_cache_alloc_lru_noprof+0x1e6/0x2b0 mm/slub.c:4021 proc_alloc_inode+0x2a/0xc0 fs/proc/inode.c:57 alloc_inode fs/inode.c:263 [inline] new_inode_pseudo fs/inode.c:1028 [inline] new_inode+0x6e/0x310 fs/inode.c:1047 proc_get_inode+0x22/0x660 fs/proc/inode.c:646 proc_lookup_de+0x24e/0x300 fs/proc/generic.c:253 __lookup_slow+0x28c/0x3f0 fs/namei.c:1718 lookup_slow+0x53/0x70 fs/namei.c:1735 walk_component fs/namei.c:2039 [inline] link_path_walk+0x99b/0xea0 fs/namei.c:2404 path_lookupat+0xa9/0x450 fs/namei.c:2565 do_o_path+0x95/0x230 fs/namei.c:3857 path_openat+0x2d90/0x3470 fs/namei.c:3879 do_filp_open+0x235/0x490 fs/namei.c:3913 do_sys_openat2+0x13e/0x1d0 fs/open.c:1416 do_sys_open fs/open.c:1431 [inline] __do_sys_openat fs/open.c:1447 [inline] __se_sys_openat fs/open.c:1442 [inline] __x64_sys_openat+0x247/0x2a0 fs/open.c:1442 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:0x7fc56c775b59 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 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:00007fc56d545048 EFLAGS: 00000246 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 00007fc56c905f60 RCX: 00007fc56c775b59 RDX: 0000000000200002 RSI: 0000000020000000 RDI: ffffffffffffff9c RBP: 00007fc56c7e4e5d R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007fc56c905f60 R15: 00007ffd1a0c1a48 The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x68fe8 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffff7f(buddy) raw: 00fff00000000000 ffffea0001629408 ffffea0000ba1e08 0000000000000000 raw: 0000000000000000 0000000000000003 00000000ffffff7f 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as freed page last allocated via order 3, migratetype Unmovable, gfp_mask 0x52dc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_ZERO), pid 5097, tgid 5097 (syz-executor), ts 72961949866, free_ts 296416587781 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1f3/0x230 mm/page_alloc.c:1473 prep_new_page mm/page_alloc.c:1481 [inline] get_page_from_freelist+0x2e4c/0x2f10 mm/page_alloc.c:3425 __alloc_pages_noprof+0x256/0x6c0 mm/page_alloc.c:4683 __alloc_pages_node_noprof include/linux/gfp.h:269 [inline] alloc_pages_node_noprof include/linux/gfp.h:296 [inline] __kmalloc_large_node+0x8b/0x1d0 mm/slub.c:4068 __do_kmalloc_node mm/slub.c:4111 [inline] __kmalloc_node_noprof+0x2d2/0x440 mm/slub.c:4130 kmalloc_node_noprof include/linux/slab.h:681 [inline] kvmalloc_node_noprof+0x72/0x190 mm/util.c:639 bucket_table_alloc lib/rhashtable.c:186 [inline] rhashtable_init_noprof+0x534/0xa60 lib/rhashtable.c:1071 ila_xlat_init_net+0xa0/0x110 net/ipv6/ila/ila_xlat.c:613 ops_init+0x359/0x610 net/core/net_namespace.c:139 setup_net+0x515/0xca0 net/core/net_namespace.c:343 copy_net_ns+0x4e2/0x7b0 net/core/net_namespace.c:508 create_new_namespaces+0x425/0x7b0 kernel/nsproxy.c:110 unshare_nsproxy_namespaces+0x124/0x180 kernel/nsproxy.c:228 ksys_unshare+0x619/0xc10 kernel/fork.c:3308 __do_sys_unshare kernel/fork.c:3379 [inline] __se_sys_unshare kernel/fork.c:3377 [inline] __x64_sys_unshare+0x38/0x40 kernel/fork.c:3377 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 page last free pid 35 tgid 35 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1093 [inline] free_unref_page+0xd22/0xea0 mm/page_alloc.c:2588 __folio_put+0x3b9/0x620 mm/swap.c:129 folio_put include/linux/mm.h:1513 [inline] free_large_kmalloc+0x105/0x1c0 mm/slub.c:4530 kfree+0x1c4/0x360 mm/slub.c:4553 rhashtable_free_and_destroy+0x7c6/0x920 lib/rhashtable.c:1169 ila_xlat_exit_net+0x55/0x110 net/ipv6/ila/ila_xlat.c:626 ops_exit_list net/core/net_namespace.c:173 [inline] cleanup_net+0x802/0xcc0 net/core/net_namespace.c:640 process_one_work kernel/workqueue.c:3231 [inline] process_scheduled_works+0xa2c/0x1830 kernel/workqueue.c:3312 worker_thread+0x86d/0xd40 kernel/workqueue.c:3390 kthread+0x2f0/0x390 kernel/kthread.c:389 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 Memory state around the buggy address: ffff888068fe7f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888068fe7f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888068fe8000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff888068fe8080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888068fe8100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ================================================================== ---------------- Code disassembly (best guess): 0: 89 f5 mov %esi,%ebp 2: 49 c1 ed 03 shr $0x3,%r13 6: eb 0d jmp 0x15 8: 48 f7 03 08 00 00 00 testq $0x8,(%rbx) f: 0f 84 8b 00 00 00 je 0xa0 15: bf 01 00 00 00 mov $0x1,%edi 1a: e8 25 59 d0 f5 call 0xf5d05944 1f: e8 00 57 08 f6 call 0xf6085724 24: fb sti 25: bf 01 00 00 00 mov $0x1,%edi * 2a: e8 55 ad ff ff call 0xffffad84 <-- trapping instruction 2f: 43 80 7c 3d 00 00 cmpb $0x0,0x0(%r13,%r15,1) 35: 74 08 je 0x3f 37: 4c 89 f7 mov %r14,%rdi 3a: e8 25 29 67 f6 call 0xf6672964 3f: 48 rex.W