==================================================================
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 ffff88807a530008 by task syz-fuzzer/5097
CPU: 0 PID: 5097 Comm: syz-fuzzer Not tainted 6.9.0-syzkaller-12123-g531876c80004 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/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:5624 [inline]
__netif_receive_skb+0x1ea/0x650 net/core/dev.c:5738
process_backlog+0x391/0x7d0 net/core/dev.c:6067
__napi_poll+0xcb/0x490 net/core/dev.c:6721
napi_poll net/core/dev.c:6790 [inline]
net_rx_action+0x7bb/0x10a0 net/core/dev.c:6906
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:rcu_dynticks_curr_cpu_in_eqs include/linux/context_tracking.h:122 [inline]
RIP: 0010:rcu_is_watching+0x15/0xb0 kernel/rcu/tree.c:724
Code: 00 00 00 00 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 f3 0f 1e fa 41 57 41 56 53 65 ff 05 58 90 87 7e e8 bb cf 09 0a <89> c3 83 f8 08 73 7a 49 bf 00 00 00 00 00 fc ff df 4c 8d 34 dd e0
RSP: 0018:ffffc9000359f920 EFLAGS: 00000282
RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffffffff817254f4
RDX: 0000000000000000 RSI: ffffffff8c1fe4e0 RDI: ffffffff8c1fe4a0
RBP: ffffc9000359fa88 R08: ffffffff8fad36af R09: 1ffffffff1f5a6d5
R10: dffffc0000000000 R11: fffffbfff1f5a6d6 R12: 1ffff920006b3f30
R13: dffffc0000000000 R14: 0000000000000000 R15: 0000000000000004
trace_lock_acquire include/trace/events/lock.h:24 [inline]
lock_acquire+0xe3/0x550 kernel/locking/lockdep.c:5725
rcu_lock_acquire include/linux/rcupdate.h:329 [inline]
rcu_read_lock include/linux/rcupdate.h:781 [inline]
__fget_files+0x49/0x470 fs/file.c:1035
__fget_light fs/file.c:1151 [inline]
__fdget+0x16c/0x1e0 fs/file.c:1159
fdget include/linux/file.h:66 [inline]
do_epoll_wait+0x12b/0x2040 fs/eventpoll.c:2445
do_epoll_pwait+0x56/0x1e0 fs/eventpoll.c:2498
__do_sys_epoll_pwait fs/eventpoll.c:2511 [inline]
__se_sys_epoll_pwait fs/eventpoll.c:2505 [inline]
__x64_sys_epoll_pwait+0x2b8/0x310 fs/eventpoll.c:2505
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:0x40720e
Code: 48 83 ec 38 e8 13 00 00 00 48 83 c4 38 5d c3 cc cc cc cc cc cc cc cc cc cc cc cc cc 49 89 f2 48 89 fa 48 89 ce 48 89 df 0f 05 <48> 3d 01 f0 ff ff 76 15 48 f7 d8 48 89 c1 48 c7 c0 ff ff ff ff 48
RSP: 002b:000000c000855748 EFLAGS: 00000246 ORIG_RAX: 0000000000000119
RAX: ffffffffffffffda RBX: 0000000000000004 RCX: 000000000040720e
RDX: 0000000000000080 RSI: 000000c000855818 RDI: 0000000000000004
RBP: 000000c000855790 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 000000c000855820
R13: 0000000000000004 R14: 000000c00082d040 R15: 0000000000000000
The buggy address belongs to the physical page:
page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x7a530
head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
memcg:ffff888077c76481
flags: 0xfff00000000040(head|node=0|zone=1|lastcpupid=0x7ff)
page_type: 0xffffefff(slab)
raw: 00fff00000000040 ffff88801504f500 dead000000000122 0000000000000000
raw: 0000000000000000 0000000080040004 00000001ffffefff ffff888077c76481
head: 00fff00000000040 ffff88801504f500 dead000000000122 0000000000000000
head: 0000000000000000 0000000080040004 00000001ffffefff ffff888077c76481
head: 00fff00000000003 ffffea0001e94c01 ffffffffffffffff 0000000000000000
head: 0000000000000008 0000000000000000 00000000ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 3, migratetype Unmovable, gfp_mask 0x1d20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 8859, tgid 8859 (syz-executor.1), ts 223450325715, free_ts 223429632004
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x1f3/0x230 mm/page_alloc.c:1468
prep_new_page mm/page_alloc.c:1476 [inline]
get_page_from_freelist+0x2e2d/0x2ee0 mm/page_alloc.c:3402
__alloc_pages_noprof+0x256/0x6c0 mm/page_alloc.c:4660
__alloc_pages_node_noprof include/linux/gfp.h:269 [inline]
alloc_pages_node_noprof include/linux/gfp.h:296 [inline]
alloc_slab_page+0x5f/0x120 mm/slub.c:2264
allocate_slab+0x5a/0x2e0 mm/slub.c:2427
new_slab mm/slub.c:2480 [inline]
___slab_alloc+0xcd1/0x14b0 mm/slub.c:3666
__slab_alloc+0x58/0xa0 mm/slub.c:3756
__slab_alloc_node mm/slub.c:3809 [inline]
slab_alloc_node mm/slub.c:3988 [inline]
__do_kmalloc_node mm/slub.c:4120 [inline]
kmalloc_node_track_caller_noprof+0x281/0x440 mm/slub.c:4141
kmemdup_noprof+0x2a/0x60 mm/util.c:131
__addrconf_sysctl_register+0xb1/0x3a0 net/ipv6/addrconf.c:7197
addrconf_sysctl_register+0x167/0x1c0 net/ipv6/addrconf.c:7263
ipv6_add_dev+0xcf6/0x1220 net/ipv6/addrconf.c:456
addrconf_notify+0x6a7/0x1020 net/ipv6/addrconf.c:3652
notifier_call_chain+0x19f/0x3e0 kernel/notifier.c:93
call_netdevice_notifiers_extack net/core/dev.c:2030 [inline]
call_netdevice_notifiers net/core/dev.c:2044 [inline]
register_netdevice+0x1570/0x19e0 net/core/dev.c:10407
veth_newlink+0x628/0xcd0 drivers/net/veth.c:1829
page last free pid 8132 tgid 8132 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
free_pages_prepare mm/page_alloc.c:1088 [inline]
free_unref_page+0xd22/0xea0 mm/page_alloc.c:2565
__folio_put+0x3b9/0x620 mm/swap.c:129
folio_put include/linux/mm.h:1508 [inline]
free_large_kmalloc+0x105/0x1c0 mm/slub.c:4528
kfree+0x1c4/0x360 mm/slub.c:4551
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/0xd70 kernel/workqueue.c:3393
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:
ffff88807a52ff00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff88807a52ff80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff88807a530000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
^
ffff88807a530080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff88807a530100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================
----------------
Code disassembly (best guess):
0: 00 00 add %al,(%rax)
2: 00 00 add %al,(%rax)
4: 00 90 90 90 90 90 add %dl,-0x6f6f6f70(%rax)
a: 90 nop
b: 90 nop
c: 90 nop
d: 90 nop
e: 90 nop
f: 90 nop
10: 90 nop
11: 90 nop
12: 90 nop
13: 90 nop
14: 90 nop
15: f3 0f 1e fa endbr64
19: 41 57 push %r15
1b: 41 56 push %r14
1d: 53 push %rbx
1e: 65 ff 05 58 90 87 7e incl %gs:0x7e879058(%rip) # 0x7e87907d
25: e8 bb cf 09 0a call 0xa09cfe5
* 2a: 89 c3 mov %eax,%ebx <-- trapping instruction
2c: 83 f8 08 cmp $0x8,%eax
2f: 73 7a jae 0xab
31: 49 bf 00 00 00 00 00 movabs $0xdffffc0000000000,%r15
38: fc ff df
3b: 4c rex.WR
3c: 8d .byte 0x8d
3d: 34 dd xor $0xdd,%al
3f: e0 .byte 0xe0