syzbot


KASAN: stack-out-of-bounds Read in xfrm_state_find

Status: closed as invalid on 2022/02/03 13:56
Reported-by: syzbot+7f38cb0182693e1502e3@syzkaller.appspotmail.com
First crash: 273d, last: 273d
similar bugs (10):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KASAN: stack-out-of-bounds Read in xfrm_state_find (3) C 10353 1653d 1721d 4/23 fixed on 2018/01/31 00:24
android-44 KASAN: stack-out-of-bounds Read in xfrm_state_find C 842 981d 1213d 0/2 public: reported C repro on 2019/04/12 00:00
upstream KASAN: stack-out-of-bounds Read in xfrm_state_find (5) C done 654 1286d 1588d 14/23 fixed on 2019/11/11 16:48
upstream KMSAN: uninit-value in xfrm_state_find C 188 18d 1514d 0/23 upstream: reported C repro on 2018/06/15 07:30
upstream KASAN: stack-out-of-bounds Read in xfrm_state_find C 365 1749d 1822d 0/23 closed as invalid on 2017/10/23 16:19
android-49 KASAN: stack-out-of-bounds Read in xfrm_state_find C 4151 1314d 1825d 0/3 closed as invalid on 2019/01/01 20:10
android-414 KASAN: stack-out-of-bounds Read in xfrm_state_find C 137 1288d 1214d 0/1 public: reported C repro on 2019/04/11 00:00
upstream KASAN: stack-out-of-bounds Read in xfrm_state_find (2) C 93 1731d 1740d 3/23 fixed on 2017/11/18 01:42
android-49 KASAN: stack-out-of-bounds Read in xfrm_state_find (2) C 392 978d 1214d 0/3 public: reported C repro on 2019/04/11 08:44
upstream KASAN: stack-out-of-bounds Read in xfrm_state_find (4) C 102 1598d 1649d 4/23 fixed on 2018/03/23 18:14

Sample crash report:
==================================================================
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 net/xfrm/xfrm_hash.h:95 [inline]
BUG: KASAN: stack-out-of-bounds in xfrm_dst_hash net/xfrm/xfrm_state.c:63 [inline]
BUG: KASAN: stack-out-of-bounds in xfrm_state_find+0x40d7/0x4de0 net/xfrm/xfrm_state.c:1066
Read of size 4 at addr ffffc90000e57c78 by task syz-executor.5/18566

CPU: 1 PID: 18566 Comm: syz-executor.5 Tainted: G        W         5.10.77-syzkaller-01258-g76698ea35fd3 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 __dump_stack lib/dump_stack.c:77 [inline]
 dump_stack_lvl+0x1e2/0x24b lib/dump_stack.c:118
 print_address_description+0x8d/0x3d0 mm/kasan/report.c:233
 __kasan_report+0x142/0x220 mm/kasan/report.c:419
 kasan_report+0x51/0x70 mm/kasan/report.c:436
 __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 net/xfrm/xfrm_hash.h:95 [inline]
 xfrm_dst_hash net/xfrm/xfrm_state.c:63 [inline]
 xfrm_state_find+0x40d7/0x4de0 net/xfrm/xfrm_state.c:1066
 xfrm_tmpl_resolve_one net/xfrm/xfrm_policy.c:2394 [inline]
 xfrm_tmpl_resolve net/xfrm/xfrm_policy.c:2439 [inline]
 xfrm_resolve_and_create_bundle+0x6a1/0x2d50 net/xfrm/xfrm_policy.c:2729
 xfrm_bundle_lookup net/xfrm/xfrm_policy.c:2964 [inline]
 xfrm_lookup_with_ifid+0xa21/0x24b0 net/xfrm/xfrm_policy.c:3095
 xfrm_lookup net/xfrm/xfrm_policy.c:3187 [inline]
 xfrm_lookup_route+0x3b/0x160 net/xfrm/xfrm_policy.c:3198
 ip_route_output_flow+0x1f6/0x320 net/ipv4/route.c:2781
 ip_route_output_ports include/net/route.h:169 [inline]
 ip4_datagram_release_cb+0x7f1/0xdc0 net/ipv4/datagram.c:119
 release_sock+0xb7/0x1b0 net/core/sock.c:3097
 ip4_datagram_connect+0x3a/0x50 net/ipv4/datagram.c:91
 inet_dgram_connect+0x1d7/0x3d0 net/ipv4/af_inet.c:581
 __sys_connect_file net/socket.c:1842 [inline]
 __sys_connect+0x387/0x410 net/socket.c:1859
 __do_sys_connect net/socket.c:1869 [inline]
 __se_sys_connect net/socket.c:1866 [inline]
 __x64_sys_connect+0x7a/0x90 net/socket.c:1866
 do_syscall_64+0x31/0x70 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x44/0xa9
RIP: 0033:0x7f53992feae9
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 bc ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f5397075188 EFLAGS: 00000246 ORIG_RAX: 000000000000002a
RAX: ffffffffffffffda RBX: 00007f5399411f60 RCX: 00007f53992feae9
RDX: 0000000000000010 RSI: 0000000020000480 RDI: 0000000000000005
RBP: 00007f5399358f25 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffe83878b5f R14: 00007f5397075300 R15: 0000000000022000


addr ffffc90000e57c78 is located in stack of task syz-executor.5/18566 at offset 88 in frame:
 ip4_datagram_release_cb+0x0/0xdc0 net/ipv4/datagram.c:92

this frame has 1 object:
 [32, 88) 'fl4'

Memory state around the buggy address:
 ffffc90000e57b00: f1 f1 f1 f1 00 00 00 00 00 00 f3 f3 f3 f3 f3 f3
 ffffc90000e57b80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffffc90000e57c00: 00 00 00 00 f1 f1 f1 f1 00 00 00 00 00 00 00 f3
                                                                ^
 ffffc90000e57c80: f3 f3 f3 f3 00 00 00 00 00 00 00 00 00 00 00 00
 ffffc90000e57d00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================

Crashes (1):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-android-5-10 2021/11/07 13:03 android12-5.10-lts 76698ea35fd3 4c1be0be .config log report info KASAN: stack-out-of-bounds Read in xfrm_state_find