syzbot


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

Status: upstream: reported C repro on 2023/01/01 01:05
Reported-by: syzbot+d9747a1ee3bcfff01cf8@syzkaller.appspotmail.com
First crash: 650d, last: 650d
Similar bugs (15)
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 2450d 2517d 4/28 fixed on 2018/01/31 00:24
android-44 KASAN: stack-out-of-bounds Read in xfrm_state_find C 842 1778d 2010d 0/2 public: reported C repro on 2019/04/12 00:00
android-5-15 KASAN: stack-out-of-bounds Read in xfrm_state_find origin:upstream missing-backport C error error 2 165d 650d 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 2083d 2385d 13/28 fixed on 2019/11/11 16:48
upstream KMSAN: uninit-value in xfrm_state_find net C error done 215 512d 2311d 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 650d 650d 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 2546d 2619d 0/28 closed as invalid on 2017/10/23 16:19
android-5-10 KASAN: stack-out-of-bounds Read in xfrm_state_find 1 1070d 1070d 0/2 closed as invalid on 2022/02/03 13:56
android-49 KASAN: stack-out-of-bounds Read in xfrm_state_find C 4151 2111d 2622d 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 2084d 2011d 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 2528d 2536d 3/28 fixed on 2017/11/18 01:42
android-49 KASAN: stack-out-of-bounds Read in xfrm_state_find (2) C 392 1775d 2011d 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 2395d 2446d 4/28 fixed on 2018/03/23 18:14
upstream KMSAN: uninit-value in xfrm_state_find (2) net 19 186d 344d 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 43d 43d 0/28 closed as invalid on 2024/10/09 09:35
Last patch testing requests (8)
Created Duration User Patch Repo Result
2024/08/28 00:01 13m retest repro android12-5.4 report log
2024/06/18 19:35 45m retest repro android12-5.4 report log
2024/04/05 14:20 35m retest repro android12-5.4 report log
2024/01/26 10:14 15m retest repro android12-5.4 report log
2023/11/17 10:03 7m retest repro android12-5.4 report log
2023/09/08 09:04 14m retest repro android12-5.4 report log
2023/06/30 08:45 7m retest repro android12-5.4 report log
2023/04/21 06:04 11m retest repro android12-5.4 report log

Sample crash report:
==================================================================
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:63 [inline]
BUG: KASAN: stack-out-of-bounds in xfrm_state_find+0x2f65/0x34a0 net/xfrm/xfrm_state.c:1063
Read of size 4 at addr ffff8881f6f09a18 by task swapper/1/0

CPU: 1 PID: 0 Comm: swapper/1 Not tainted 5.4.219-syzkaller-00012-ga8aad8851131 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022
Call Trace:
 <IRQ>
 __dump_stack lib/dump_stack.c:77 [inline]
 dump_stack+0x1d8/0x241 lib/dump_stack.c:118
 print_address_description+0x8c/0x630 mm/kasan/report.c:384
 __kasan_report+0xf6/0x130 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 net/xfrm/xfrm_hash.h:95 [inline]
 xfrm_dst_hash net/xfrm/xfrm_state.c:63 [inline]
 xfrm_state_find+0x2f65/0x34a0 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+0x6fc/0x3290 net/xfrm/xfrm_policy.c:2736
 xfrm_bundle_lookup net/xfrm/xfrm_policy.c:2960 [inline]
 xfrm_lookup_with_ifid+0x78a/0x2120 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+0x1f6/0x320 net/ipv4/route.c:2756
 ip_route_output_ports include/net/route.h:163 [inline]
 igmpv3_newpack+0x414/0x1040 net/ipv4/igmp.c:371
 add_grhead+0x75/0x2b0 net/ipv4/igmp.c:442
 add_grec+0x12f8/0x1600 net/ipv4/igmp.c:576
 igmpv3_send_cr net/ipv4/igmp.c:713 [inline]
 igmp_ifc_timer_expire+0x823/0xf10 net/ipv4/igmp.c:811
 call_timer_fn+0x31/0x350 kernel/time/timer.c:1418
 expire_timers+0x21e/0x400 kernel/time/timer.c:1463
 __run_timers+0x5e0/0x700 kernel/time/timer.c:1787
 run_timer_softirq+0x46/0x80 kernel/time/timer.c:1800
 __do_softirq+0x23e/0x643 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:538 [inline]
 smp_apic_timer_interrupt+0x113/0x440 arch/x86/kernel/apic/apic.c:1150
 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:834
 </IRQ>

The buggy address belongs to the page:
page:ffffea0007dbc240 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0
flags: 0x8000000000001000(reserved)
raw: 8000000000001000 ffffea0007dbc248 ffffea0007dbc248 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:
 ffff8881f6f09900: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 ffff8881f6f09980: 00 00 00 00 00 00 00 00 f1 f1 f1 f1 00 00 00 00
>ffff8881f6f09a00: 00 00 00 f3 f3 f3 f3 f3 00 00 00 00 00 00 00 00
                            ^
 ffff8881f6f09a80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 ffff8881f6f09b00: 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
2023/01/01 01:05 android12-5.4 a8aad8851131 ab32d508 .config strace log report syz C [disk image] [vmlinux] [kernel image] ci2-android-5-4-kasan KASAN: stack-out-of-bounds Read in xfrm_state_find
* Struck through repros no longer work on HEAD.