==================================================================
BUG: KASAN: stack-out-of-bounds in jhash2 include/linux/jhash.h:137 [inline]
BUG: KASAN: stack-out-of-bounds in __xfrm6_addr_hash net/xfrm/xfrm_hash.h:16 [inline]
BUG: KASAN: stack-out-of-bounds in __xfrm6_daddr_saddr_hash net/xfrm/xfrm_hash.h:29 [inline]
BUG: KASAN: stack-out-of-bounds in __xfrm_dst_hash+0x355/0x430 net/xfrm/xfrm_hash.h:95
Read of size 4 at addr ffff8881f6e09a78 by task syz-executor.0/412
CPU: 0 PID: 412 Comm: syz-executor.0 Not tainted 5.4.284-syzkaller-04988-g137306201ec6 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
Call Trace:
__dump_stack lib/dump_stack.c:77 [inline]
dump_stack+0x1d8/0x241 lib/dump_stack.c:118
print_address_description+0x8c/0x600 mm/kasan/report.c:384
__kasan_report+0xf3/0x120 mm/kasan/report.c:516
kasan_report+0x30/0x60 mm/kasan/common.c:653
jhash2 include/linux/jhash.h:137 [inline]
__xfrm6_addr_hash net/xfrm/xfrm_hash.h:16 [inline]
__xfrm6_daddr_saddr_hash net/xfrm/xfrm_hash.h:29 [inline]
__xfrm_dst_hash+0x355/0x430 net/xfrm/xfrm_hash.h:95
xfrm_dst_hash net/xfrm/xfrm_state.c:63 [inline]
xfrm_state_find+0x2cc/0x2dc0 net/xfrm/xfrm_state.c:1063
xfrm_tmpl_resolve_one net/xfrm/xfrm_policy.c:2397 [inline]
xfrm_tmpl_resolve net/xfrm/xfrm_policy.c:2442 [inline]
xfrm_resolve_and_create_bundle+0x6aa/0x31d0 net/xfrm/xfrm_policy.c:2736
xfrm_bundle_lookup net/xfrm/xfrm_policy.c:2960 [inline]
xfrm_lookup_with_ifid+0x549/0x1c90 net/xfrm/xfrm_policy.c:3091
xfrm_lookup net/xfrm/xfrm_policy.c:3183 [inline]
xfrm_lookup_route+0x37/0x170 net/xfrm/xfrm_policy.c:3194
ip_route_output_flow+0x1fe/0x330 net/ipv4/route.c:2750
ip_route_output_ports include/net/route.h:163 [inline]
igmpv3_newpack+0x437/0x1070 net/ipv4/igmp.c:374
add_grhead+0x75/0x2c0 net/ipv4/igmp.c:445
add_grec+0x12c9/0x15d0 net/ipv4/igmp.c:579
igmpv3_send_cr net/ipv4/igmp.c:716 [inline]
igmp_ifc_timer_expire+0x7bc/0xea0 net/ipv4/igmp.c:814
call_timer_fn+0x36/0x390 kernel/time/timer.c:1448
expire_timers kernel/time/timer.c:1493 [inline]
__run_timers+0x879/0xbe0 kernel/time/timer.c:1817
run_timer_softirq+0x63/0xf0 kernel/time/timer.c:1830
__do_softirq+0x23b/0x6b7 kernel/softirq.c:292
invoke_softirq kernel/softirq.c:373 [inline]
irq_exit+0x195/0x1c0 kernel/softirq.c:413
exiting_irq arch/x86/include/asm/apic.h:539 [inline]
smp_apic_timer_interrupt+0x11a/0x460 arch/x86/kernel/apic/apic.c:1149
apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:834
RIP: 0010:__raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:161 [inline]
RIP: 0010:_raw_spin_unlock_irqrestore+0x4d/0x80 kernel/locking/spinlock.c:191
Code: 74 0c 48 c7 c7 d0 3b eb 85 e8 9f 81 42 fd 48 83 3d e7 9d 99 01 00 74 36 48 89 df e8 3d 56 fa fc 66 90 4c 89 34 24 ff 34 24 9d 01 00 00 00 e8 b9 42 f3 fc 65 8b 05 7e ef b0 7b 85 c0 74 08 48
RSP: 0018:ffff8881dd3e7858 EFLAGS: 00000246 ORIG_RAX: ffffffffffffff13
RAX: 0000000000000001 RBX: ffffffff86ec8d40 RCX: dffffc0000000000
RDX: 0000000000000000 RSI: 0000000000000246 RDI: ffffffff86ec8d40
RBP: dffffc0000000000 R08: ffffffff81873ca2 R09: fffff520000023f1
R10: 0000000000000000 R11: dffffc0000000001 R12: ffff8881f18e8200
R13: 1ffff1103e31d040 R14: 0000000000000246 R15: 0000000000000400
spin_unlock_irqrestore include/linux/spinlock.h:393 [inline]
pcpu_alloc+0x69a/0x1050 mm/percpu.c:1701
xt_percpu_counter_alloc+0x141/0x1e0 net/netfilter/x_tables.c:1838
find_check_entry net/ipv6/netfilter/ip6_tables.c:547 [inline]
translate_table+0x137b/0x2320 net/ipv6/netfilter/ip6_tables.c:735
do_replace net/ipv6/netfilter/ip6_tables.c:1154 [inline]
do_ip6t_set_ctl+0x36f/0x600 net/ipv6/netfilter/ip6_tables.c:1684
nf_sockopt net/netfilter/nf_sockopt.c:106 [inline]
nf_setsockopt+0x28f/0x2b0 net/netfilter/nf_sockopt.c:115
__sys_setsockopt+0x4b4/0x840 net/socket.c:2093
__do_sys_setsockopt net/socket.c:2109 [inline]
__se_sys_setsockopt net/socket.c:2106 [inline]
__x64_sys_setsockopt+0xb1/0xc0 net/socket.c:2106
do_syscall_64+0xca/0x1c0 arch/x86/entry/common.c:290
entry_SYSCALL_64_after_hwframe+0x5c/0xc1
RIP: 0033:0x7f0f7cb2f5aa
Code: ff ff ff c3 0f 1f 40 00 48 c7 c2 b0 ff ff ff f7 d8 64 89 02 48 c7 c0 ff ff ff ff eb b7 0f 1f 00 49 89 ca b8 36 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 06 c3 0f 1f 44 00 00 48 c7 c2 b0 ff ff ff f7
RSP: 002b:00007ffd43256e68 EFLAGS: 00000206 ORIG_RAX: 0000000000000036
RAX: ffffffffffffffda RBX: 00007ffd43256ef0 RCX: 00007f0f7cb2f5aa
RDX: 0000000000000040 RSI: 0000000000000029 RDI: 0000000000000003
RBP: 0000000000000003 R08: 00000000000003b8 R09: 0079746972756365
R10: 00007f0f7cc26ba0 R11: 0000000000000206 R12: 00007f0f7cc26b40
R13: 00007ffd43256e8c R14: 0000000000000000 R15: 00007f0f7cc28d00
The buggy address belongs to the page:
page:ffffea0007db8240 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0
flags: 0x8000000000001000(reserved)
raw: 8000000000001000 ffffea0007db8248 ffffea0007db8248 0000000000000000
raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner info is not present (never set?)
Memory state around the buggy address:
ffff8881f6e09900: 00 00 00 00 00 00 f3 f3 f3 f3 f3 f3 00 00 00 00
ffff8881f6e09980: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffff8881f6e09a00: 00 00 00 00 f1 f1 f1 f1 00 00 00 00 00 00 00 f3
^
ffff8881f6e09a80: f3 f3 f3 f3 00 00 00 00 00 00 00 00 00 00 00 00
ffff8881f6e09b00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================
----------------
Code disassembly (best guess):
0: 74 0c je 0xe
2: 48 c7 c7 d0 3b eb 85 mov $0xffffffff85eb3bd0,%rdi
9: e8 9f 81 42 fd call 0xfd4281ad
e: 48 83 3d e7 9d 99 01 cmpq $0x0,0x1999de7(%rip) # 0x1999dfd
15: 00
16: 74 36 je 0x4e
18: 48 89 df mov %rbx,%rdi
1b: e8 3d 56 fa fc call 0xfcfa565d
20: 66 90 xchg %ax,%ax
22: 4c 89 34 24 mov %r14,(%rsp)
26: ff 34 24 push (%rsp)
29: 9d popf
* 2a: bf 01 00 00 00 mov $0x1,%edi <-- trapping instruction
2f: e8 b9 42 f3 fc call 0xfcf342ed
34: 65 8b 05 7e ef b0 7b mov %gs:0x7bb0ef7e(%rip),%eax # 0x7bb0efb9
3b: 85 c0 test %eax,%eax
3d: 74 08 je 0x47
3f: 48 rex.W