==================================================================
BUG: KASAN: stack-out-of-bounds in jhash2 include/linux/jhash.h:138 [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+0x38d/0x460 net/xfrm/xfrm_hash.h:95
Read of size 4 at addr ffffc90000170a18 by task syz.5.4078/16171
CPU: 1 PID: 16171 Comm: syz.5.4078 Not tainted 5.10.234-syzkaller-00148-g6686f2996d23 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 12/27/2024
Call Trace:
<IRQ>
__dump_stack lib/dump_stack.c:77 [inline]
dump_stack_lvl+0x1e2/0x24b lib/dump_stack.c:118
print_address_description+0x81/0x3b0 mm/kasan/report.c:248
__kasan_report mm/kasan/report.c:435 [inline]
kasan_report+0x179/0x1c0 mm/kasan/report.c:452
__asan_report_load4_noabort+0x14/0x20 mm/kasan/report_generic.c:308
jhash2 include/linux/jhash.h:138 [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+0x38d/0x460 net/xfrm/xfrm_hash.h:95
xfrm_dst_hash net/xfrm/xfrm_state.c:63 [inline]
xfrm_state_find+0x2f1/0x2dd0 net/xfrm/xfrm_state.c:1068
xfrm_tmpl_resolve_one net/xfrm/xfrm_policy.c:2395 [inline]
xfrm_tmpl_resolve net/xfrm/xfrm_policy.c:2440 [inline]
xfrm_resolve_and_create_bundle+0x65a/0x2b70 net/xfrm/xfrm_policy.c:2733
xfrm_bundle_lookup net/xfrm/xfrm_policy.c:2968 [inline]
xfrm_lookup_with_ifid+0x71a/0x19d0 net/xfrm/xfrm_policy.c:3099
xfrm_lookup net/xfrm/xfrm_policy.c:3191 [inline]
xfrm_lookup_route+0x3b/0x160 net/xfrm/xfrm_policy.c:3202
ip_route_output_flow+0x1ef/0x310 net/ipv4/route.c:2790
ip_route_output_key include/net/route.h:142 [inline]
tipc_udp_xmit+0x209/0x9e0 net/tipc/udp_media.c:183
tipc_udp_send_msg+0x216/0x2e0 net/tipc/udp_media.c:265
tipc_bearer_xmit_skb+0x2b1/0x3b0 net/tipc/bearer.c:548
tipc_disc_timeout+0x6fa/0x8b0 net/tipc/discover.c:337
call_timer_fn+0x3b/0x2d0 kernel/time/timer.c:1450
expire_timers kernel/time/timer.c:1495 [inline]
__run_timers+0x72a/0xa10 kernel/time/timer.c:1789
run_timer_softirq+0x69/0xf0 kernel/time/timer.c:1802
__do_softirq+0x268/0x5bb kernel/softirq.c:309
asm_call_irq_on_stack+0xf/0x20
</IRQ>
__run_on_irqstack arch/x86/include/asm/irq_stack.h:26 [inline]
run_on_irqstack_cond arch/x86/include/asm/irq_stack.h:77 [inline]
do_softirq_own_stack+0x60/0x80 arch/x86/kernel/irq_64.c:77
invoke_softirq kernel/softirq.c:405 [inline]
__irq_exit_rcu+0x128/0x150 kernel/softirq.c:435
irq_exit_rcu+0x9/0x10 kernel/softirq.c:447
sysvec_apic_timer_interrupt+0xbf/0xe0 arch/x86/kernel/apic/apic.c:1106
asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:635
RIP: 0010:handle_mm_fault+0x244/0x1a10 mm/memory.c:5350
Code: 89 de 81 e6 80 01 00 00 31 ff e8 47 4c cc ff 89 d8 25 80 01 00 00 0f 84 a5 01 00 00 e8 85 48 cc ff 8b 5c 24 24 89 de 83 e6 40 <31> ff e8 25 4c cc ff 83 e3 40 89 9c 24 9c 00 00 00 75 07 e8 64 48
RSP: 0018:ffffc90000c778c0 EFLAGS: 00000246
RAX: ffffffff819e85ad RBX: 0000000000000014 RCX: 0000000000080000
RDX: ffffc90004d39000 RSI: 0000000000000000 RDI: 0000000000080000
RBP: ffffc90000c77b30 R08: ffffffff819e8546 R09: ffffffff819c8b17
R10: 0000000000000002 R11: ffff8881144b3b40 R12: ffff8881144b3b40
R13: dffffc0000000000 R14: 0000000000000000 R15: ffff88810e454b90
faultin_page mm/gup.c:902 [inline]
__get_user_pages+0xb31/0x11b0 mm/gup.c:1121
populate_vma_page_range mm/gup.c:1454 [inline]
__mm_populate+0x363/0x520 mm/gup.c:1502
mm_populate include/linux/mm.h:2782 [inline]
vm_mmap_pgoff+0x264/0x390 mm/util.c:548
ksys_mmap_pgoff+0xf8/0x1f0 mm/mmap.c:1700
__do_sys_mmap arch/x86/kernel/sys_x86_64.c:95 [inline]
__se_sys_mmap arch/x86/kernel/sys_x86_64.c:86 [inline]
__x64_sys_mmap+0x103/0x120 arch/x86/kernel/sys_x86_64.c:86
do_syscall_64+0x34/0x70
entry_SYSCALL_64_after_hwframe+0x61/0xcb
RIP: 0033:0x7fb1b367cde9
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:00007fb1b1ce7038 EFLAGS: 00000246 ORIG_RAX: 0000000000000009
RAX: ffffffffffffffda RBX: 00007fb1b3895fa0 RCX: 00007fb1b367cde9
RDX: b635773f06ebbeee RSI: 0000000000b36000 RDI: 0000400000000000
RBP: 00007fb1b36fe2a0 R08: ffffffffffffffff R09: 0000000000000000
R10: 0000000000008031 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 00007fb1b3895fa0 R15: 00007ffe46981a08
Memory state around the buggy address:
ffffc90000170900: f3 f3 f3 f3 00 00 00 00 00 00 00 00 00 00 00 00
ffffc90000170980: 00 00 00 00 00 00 00 00 f1 f1 f1 f1 00 00 00 00
>ffffc90000170a00: 00 00 00 f2 f2 f2 f2 f2 00 00 00 00 00 00 00 00
^
ffffc90000170a80: 00 00 00 f3 f3 f3 f3 f3 00 00 00 00 00 00 00 00
ffffc90000170b00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================
----------------
Code disassembly (best guess):
0: 89 de mov %ebx,%esi
2: 81 e6 80 01 00 00 and $0x180,%esi
8: 31 ff xor %edi,%edi
a: e8 47 4c cc ff call 0xffcc4c56
f: 89 d8 mov %ebx,%eax
11: 25 80 01 00 00 and $0x180,%eax
16: 0f 84 a5 01 00 00 je 0x1c1
1c: e8 85 48 cc ff call 0xffcc48a6
21: 8b 5c 24 24 mov 0x24(%rsp),%ebx
25: 89 de mov %ebx,%esi
27: 83 e6 40 and $0x40,%esi
* 2a: 31 ff xor %edi,%edi <-- trapping instruction
2c: e8 25 4c cc ff call 0xffcc4c56
31: 83 e3 40 and $0x40,%ebx
34: 89 9c 24 9c 00 00 00 mov %ebx,0x9c(%rsp)
3b: 75 07 jne 0x44
3d: e8 .byte 0xe8
3e: 64 fs
3f: 48 rex.W