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 net/xfrm/xfrm_hash.h:95 [inline] BUG: KASAN: stack-out-of-bounds in xfrm_dst_hash net/xfrm/xfrm_state.c:61 [inline] BUG: KASAN: stack-out-of-bounds in xfrm_state_find+0x3589/0x3850 net/xfrm/xfrm_state.c:952 Read of size 4 at addr ffff888046ec7838 by task syz-executor7/18430 CPU: 3 PID: 18430 Comm: syz-executor7 Not tainted 4.20.0-rc7+ #8 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Ubuntu-1.8.2-1ubuntu1 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0xfa/0x1ce lib/dump_stack.c:113 print_address_description+0x6e/0x280 mm/kasan/report.c:256 kasan_report_error mm/kasan/report.c:354 [inline] kasan_report+0x25e/0x380 mm/kasan/report.c:412 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 net/xfrm/xfrm_hash.h:95 [inline] xfrm_dst_hash net/xfrm/xfrm_state.c:61 [inline] xfrm_state_find+0x3589/0x3850 net/xfrm/xfrm_state.c:952 xfrm_tmpl_resolve_one net/xfrm/xfrm_policy.c:1413 [inline] xfrm_tmpl_resolve+0x305/0xb70 net/xfrm/xfrm_policy.c:1458 xfrm_resolve_and_create_bundle+0x134/0x2480 net/xfrm/xfrm_policy.c:1753 xfrm_lookup_with_ifid+0xd96/0x2480 net/xfrm/xfrm_policy.c:2076 xfrm_lookup net/xfrm/xfrm_policy.c:2200 [inline] xfrm_lookup_route+0x37/0x1b0 net/xfrm/xfrm_policy.c:2211 ip_route_output_flow+0x77/0x90 net/ipv4/route.c:2582 raw_sendmsg+0xcbf/0x3b00 net/ipv4/raw.c:648 inet_sendmsg+0x12d/0x5a0 net/ipv4/af_inet.c:798 sock_sendmsg_nosec net/socket.c:621 [inline] sock_sendmsg+0xb7/0x110 net/socket.c:631 sock_write_iter+0x2ed/0x520 net/socket.c:900 call_write_iter include/linux/fs.h:1857 [inline] new_sync_write fs/read_write.c:474 [inline] __vfs_write+0x5a6/0x7d0 fs/read_write.c:487 vfs_write+0x17f/0x4b0 fs/read_write.c:549 ksys_write+0xdd/0x210 fs/read_write.c:598 do_syscall_64+0x141/0x5f0 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x457669 Code: fd b3 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 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 0f 83 cb b3 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f8d50af7c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000000457669 RDX: 00000000000000bd RSI: 0000000020000000 RDI: 0000000000000003 RBP: 000000000072bf00 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f8d50af86d4 R13: 00000000004c2d95 R14: 00000000004da328 R15: 00000000ffffffff The buggy address belongs to the page: page:ffffea00011bb1c0 count:0 mapcount:0 mapping:0000000000000000 index:0x0 flags: 0x100000000000000() raw: 0100000000000000 0000000000000000 ffffea00011bb1c8 0000000000000000 raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888046ec7700: 00 f2 f2 f2 f2 f2 f2 f2 00 00 00 00 00 f2 f2 f2 ffff888046ec7780: f2 f2 f2 f2 00 00 00 00 00 00 f2 f2 f2 f2 f2 f2 >ffff888046ec7800: 00 00 00 00 00 00 00 f2 f2 f2 f2 f2 f8 f2 f2 f2 ^ ffff888046ec7880: f2 f2 f2 f2 f8 f2 f2 f2 f2 f2 f2 f2 00 f2 f2 f2 ffff888046ec7900: f2 f2 f2 f2 00 00 00 f2 f2 f2 f2 f2 00 00 00 00 ==================================================================