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: 1112d, last: 1112d
Similar bugs (16)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KASAN: stack-out-of-bounds Read in xfrm_state_find (3) net C 10353 2492d 2560d 4/28 fixed on 2018/01/31 00:24
android-44 KASAN: stack-out-of-bounds Read in xfrm_state_find C 842 1820d 2052d 0/2 public: reported C repro on 2019/04/12 00:00
android-54 KASAN: stack-out-of-bounds Read in xfrm_state_find C 1 692d 692d 0/2 upstream: reported C repro on 2023/01/01 01:05
android-5-15 KASAN: stack-out-of-bounds Read in xfrm_state_find origin:upstream missing-backport C error error 2 207d 692d 0/2 upstream: reported C repro on 2023/01/01 00:40
upstream KASAN: stack-out-of-bounds Read in xfrm_state_find (5) net C done 654 2125d 2427d 13/28 fixed on 2019/11/11 16:48
upstream KMSAN: uninit-value in xfrm_state_find net C error done 215 554d 2353d 22/28 fixed on 2023/07/01 16:05
android-5-10 KASAN: stack-out-of-bounds Read in xfrm_state_find (2) syz error error 1 692d 692d 0/2 auto-obsoleted due to no activity on 2023/05/14 02:28
upstream KASAN: stack-out-of-bounds Read in xfrm_state_find net C 365 2588d 2661d 0/28 closed as invalid on 2017/10/23 16:19
android-49 KASAN: stack-out-of-bounds Read in xfrm_state_find C 4151 2153d 2664d 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 2127d 2053d 0/1 public: reported C repro on 2019/04/11 00:00
upstream KASAN: stack-out-of-bounds Read in xfrm_state_find (2) net C 93 2570d 2579d 3/28 fixed on 2017/11/18 01:42
android-49 KASAN: stack-out-of-bounds Read in xfrm_state_find (2) C 392 1817d 2053d 0/3 public: reported C repro on 2019/04/11 08:44
upstream KASAN: stack-out-of-bounds Read in xfrm_state_find (4) net C 102 2437d 2488d 4/28 fixed on 2018/03/23 18:14
upstream KMSAN: uninit-value in xfrm_state_find (2) net 19 228d 387d 0/28 auto-obsoleted due to no activity on 2024/07/18 11:50
upstream KMSAN: uninit-value in xfrm_state_find (3) net 1 85d 85d 0/28 closed as invalid on 2024/10/09 09:35
upstream KASAN: slab-out-of-bounds Read in xfrm_state_find net 1 16d 12d 0/28 moderation: reported on 2024/11/11 04:52

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):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/11/07 13:03 android12-5.10-lts 76698ea35fd3 4c1be0be .config console log report info ci2-android-5-10 KASAN: stack-out-of-bounds Read in xfrm_state_find
* Struck through repros no longer work on HEAD.