syzbot


KASAN: slab-out-of-bounds Read in _decode_session6

Status: auto-closed as invalid on 2022/04/20 21:31
Reported-by: syzbot+952d048ec312eadd7832@syzkaller.appspotmail.com
First crash: 1720d, last: 1065d
Similar bugs (11)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.14 KASAN: slab-out-of-bounds Read in _decode_session6 1 1650d 1650d 0/1 auto-closed as invalid on 2020/09/13 07:38
upstream KASAN: slab-out-of-bounds Read in _decode_session6 net C 35 2214d 2272d 11/28 fixed on 2018/10/30 01:28
linux-4.14 KASAN: slab-out-of-bounds Read in _decode_session6 (2) 2 927d 946d 0/1 auto-obsoleted due to no activity on 2022/09/05 20:15
android-414 KASAN: slab-out-of-bounds Read in _decode_session6 C 42 2193d 2051d 0/1 public: reported C repro on 2019/04/11 00:00
linux-4.19 KASAN: slab-out-of-bounds Read in _decode_session6 (2) C error 3 653d 794d 0/1 upstream: reported C repro on 2022/09/19 04:38
upstream KASAN: slab-out-of-bounds Read in _decode_session6 (2) net C done unreliable 26 2193d 2214d 0/28 auto-obsoleted due to no activity on 2022/09/01 19:57
linux-4.19 KASAN: use-after-free Read in _decode_session6 (2) 1 918d 918d 0/1 auto-obsoleted due to no activity on 2022/09/15 14:44
linux-4.14 KASAN: use-after-free Read in _decode_session6 2 1642d 1651d 0/1 auto-closed as invalid on 2020/09/21 07:45
linux-4.19 KASAN: use-after-free Read in _decode_session6 2 1611d 1643d 0/1 auto-closed as invalid on 2020/10/22 17:34
android-414 KASAN: use-after-free Read in _decode_session6 1 2261d 2261d 0/1 auto-closed as invalid on 2019/03/12 14:41
upstream KASAN: use-after-free Read in _decode_session6 net C done 4 2200d 2268d 13/28 fixed on 2019/11/07 18:45

Sample crash report:
ieee802154 phy0 wpan0: encryption failed: -22
ieee802154 phy1 wpan1: encryption failed: -22
ieee802154 phy0 wpan0: encryption failed: -22
ieee802154 phy1 wpan1: encryption failed: -22
==================================================================
BUG: KASAN: slab-out-of-bounds in _decode_session6+0xf56/0x1370 net/ipv6/xfrm6_policy.c:137
Read of size 1 at addr ffff8880540e6a85 by task swapper/0/0

CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.19.211-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 <IRQ>
 __dump_stack lib/dump_stack.c:77 [inline]
 dump_stack+0x1fc/0x2ef lib/dump_stack.c:118
 print_address_description.cold+0x54/0x219 mm/kasan/report.c:256
 kasan_report_error.cold+0x8a/0x1b9 mm/kasan/report.c:354
 kasan_report mm/kasan/report.c:412 [inline]
 __asan_report_load1_noabort+0x88/0x90 mm/kasan/report.c:430
 _decode_session6+0xf56/0x1370 net/ipv6/xfrm6_policy.c:137
 __xfrm_decode_session+0x5a/0x130 net/xfrm/xfrm_policy.c:2299
 xfrm_decode_session include/net/xfrm.h:1238 [inline]
 vti_tunnel_xmit+0x279/0x1850 net/ipv4/ip_vti.c:326
 __netdev_start_xmit include/linux/netdevice.h:4349 [inline]
 netdev_start_xmit include/linux/netdevice.h:4363 [inline]
 xmit_one net/core/dev.c:3256 [inline]
 dev_hard_start_xmit+0x1a8/0x920 net/core/dev.c:3272
 sch_direct_xmit+0x2d6/0xf70 net/sched/sch_generic.c:332
 qdisc_restart net/sched/sch_generic.c:395 [inline]
 __qdisc_run+0x4d0/0x1640 net/sched/sch_generic.c:403
 __dev_xmit_skb net/core/dev.c:3500 [inline]
 __dev_queue_xmit+0x1518/0x2e00 net/core/dev.c:3807
 neigh_output include/net/neighbour.h:501 [inline]
 ip6_finish_output2+0x113d/0x2290 net/ipv6/ip6_output.c:120
 ip6_finish_output+0x89b/0x10f0 net/ipv6/ip6_output.c:192
 NF_HOOK_COND include/linux/netfilter.h:278 [inline]
 ip6_output+0x205/0x770 net/ipv6/ip6_output.c:209
 dst_output include/net/dst.h:455 [inline]
 NF_HOOK include/linux/netfilter.h:289 [inline]
 ndisc_send_skb+0xa24/0x1720 net/ipv6/ndisc.c:491
 ndisc_send_rs+0x131/0x690 net/ipv6/ndisc.c:685
 addrconf_rs_timer+0x384/0x6a0 net/ipv6/addrconf.c:3835
 call_timer_fn+0x177/0x700 kernel/time/timer.c:1338
 expire_timers+0x243/0x4e0 kernel/time/timer.c:1375
 __run_timers kernel/time/timer.c:1696 [inline]
 run_timer_softirq+0x21c/0x670 kernel/time/timer.c:1709
 __do_softirq+0x265/0x980 kernel/softirq.c:292
 invoke_softirq kernel/softirq.c:372 [inline]
 irq_exit+0x215/0x260 kernel/softirq.c:412
 exiting_irq arch/x86/include/asm/apic.h:536 [inline]
 smp_apic_timer_interrupt+0x136/0x550 arch/x86/kernel/apic/apic.c:1098
 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:894
 </IRQ>
RIP: 0010:native_safe_halt+0xe/0x10 arch/x86/include/asm/irqflags.h:61
Code: 48 89 df e8 f4 20 7f f9 e9 2e ff ff ff 48 89 df e8 e7 20 7f f9 eb 82 90 90 90 90 90 e9 07 00 00 00 0f 00 2d 14 43 4e 00 fb f4 <c3> 90 e9 07 00 00 00 0f 00 2d 04 43 4e 00 f4 c3 90 90 41 56 41 55
RSP: 0018:ffffffff89e07d40 EFLAGS: 00000282 ORIG_RAX: ffffffffffffff13
RAX: 1ffffffff13e3054 RBX: dffffc0000000000 RCX: 0000000000000000
RDX: dffffc0000000000 RSI: 0000000000000001 RDI: ffffffff89e78904
RBP: 0000000000000000 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: ffffffff89f18290
R13: 1ffffffff13c0fb2 R14: 0000000000000000 R15: 0000000000000000
 arch_safe_halt arch/x86/include/asm/paravirt.h:94 [inline]
 default_idle+0x49/0x310 arch/x86/kernel/process.c:557
 cpuidle_idle_call kernel/sched/idle.c:153 [inline]
 do_idle+0x2ec/0x4b0 kernel/sched/idle.c:263
 cpu_startup_entry+0xc5/0xe0 kernel/sched/idle.c:369
 start_kernel+0x8d6/0x911 init/main.c:736
 secondary_startup_64+0xa4/0xb0 arch/x86/kernel/head_64.S:243

Allocated by task 844:
 kmem_cache_alloc+0x122/0x370 mm/slab.c:3559
 getname_flags+0xce/0x590 fs/namei.c:140
 getname fs/namei.c:211 [inline]
 do_renameat2+0x1c5/0xc70 fs/namei.c:4554
 __do_sys_rename fs/namei.c:4675 [inline]
 __se_sys_rename fs/namei.c:4673 [inline]
 __x64_sys_rename+0x5d/0x80 fs/namei.c:4673
 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
 entry_SYSCALL_64_after_hwframe+0x49/0xbe

Freed by task 844:
 __cache_free mm/slab.c:3503 [inline]
 kmem_cache_free+0x7f/0x260 mm/slab.c:3765
 putname+0xe1/0x120 fs/namei.c:261
 do_renameat2+0x26f/0xc70 fs/namei.c:4648
 __do_sys_rename fs/namei.c:4675 [inline]
 __se_sys_rename fs/namei.c:4673 [inline]
 __x64_sys_rename+0x5d/0x80 fs/namei.c:4673
 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
 entry_SYSCALL_64_after_hwframe+0x49/0xbe

The buggy address belongs to the object at ffff8880540e6c00
 which belongs to the cache names_cache of size 4096
The buggy address is located 379 bytes to the left of
 4096-byte region [ffff8880540e6c00, ffff8880540e7c00)
The buggy address belongs to the page:
page:ffffea0001503980 count:1 mapcount:0 mapping:ffff88823b843380 index:0x0 compound_mapcount: 0
flags: 0xfff00000008100(slab|head)
raw: 00fff00000008100 ffffea0002958888 ffffea000246ba08 ffff88823b843380
raw: 0000000000000000 ffff8880540e6c00 0000000100000001 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
 ffff8880540e6980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff8880540e6a00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff8880540e6a80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
                   ^
 ffff8880540e6b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff8880540e6b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
==================================================================
----------------
Code disassembly (best guess):
   0:	48 89 df             	mov    %rbx,%rdi
   3:	e8 f4 20 7f f9       	callq  0xf97f20fc
   8:	e9 2e ff ff ff       	jmpq   0xffffff3b
   d:	48 89 df             	mov    %rbx,%rdi
  10:	e8 e7 20 7f f9       	callq  0xf97f20fc
  15:	eb 82                	jmp    0xffffff99
  17:	90                   	nop
  18:	90                   	nop
  19:	90                   	nop
  1a:	90                   	nop
  1b:	90                   	nop
  1c:	e9 07 00 00 00       	jmpq   0x28
  21:	0f 00 2d 14 43 4e 00 	verw   0x4e4314(%rip)        # 0x4e433c
  28:	fb                   	sti
  29:	f4                   	hlt
* 2a:	c3                   	retq <-- trapping instruction
  2b:	90                   	nop
  2c:	e9 07 00 00 00       	jmpq   0x38
  31:	0f 00 2d 04 43 4e 00 	verw   0x4e4304(%rip)        # 0x4e433c
  38:	f4                   	hlt
  39:	c3                   	retq
  3a:	90                   	nop
  3b:	90                   	nop
  3c:	41 56                	push   %r14
  3e:	41 55                	push   %r13

Crashes (23):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/11/24 16:14 linux-4.19.y 3f8a27f9e27b 545ab074 .config console log report info ci2-linux-4-19 KASAN: slab-out-of-bounds Read in _decode_session6
2021/11/17 16:11 linux-4.19.y 3f8a27f9e27b cafff8b6 .config console log report info ci2-linux-4-19 KASAN: slab-out-of-bounds Read in _decode_session6
2021/11/13 22:39 linux-4.19.y 3f8a27f9e27b 75b04091 .config console log report info ci2-linux-4-19 KASAN: slab-out-of-bounds Read in _decode_session6
2021/11/04 09:00 linux-4.19.y 3f8a27f9e27b 4c1be0be .config console log report info ci2-linux-4-19 KASAN: slab-out-of-bounds Read in _decode_session6
2021/08/17 19:59 linux-4.19.y 59456c9cc40c a2fe1cb5 .config console log report info ci2-linux-4-19 KASAN: slab-out-of-bounds Read in _decode_session6
2021/05/19 15:45 linux-4.19.y 3c8c23092588 a343ba6b .config console log report info ci2-linux-4-19 KASAN: slab-out-of-bounds Read in _decode_session6
2021/04/24 05:12 linux-4.19.y 2965db2e004c 17f0b706 .config console log report info ci2-linux-4-19 KASAN: slab-out-of-bounds Read in _decode_session6
2021/04/24 02:39 linux-4.19.y 2965db2e004c 17f0b706 .config console log report info ci2-linux-4-19 KASAN: slab-out-of-bounds Read in _decode_session6
2021/03/02 05:29 linux-4.19.y 2d19be4653f5 183afb6c .config console log report info ci2-linux-4-19 KASAN: slab-out-of-bounds Read in _decode_session6
2021/12/21 21:31 linux-4.19.y 3f8a27f9e27b 6caa12e4 .config console log report info ci2-linux-4-19 KASAN: use-after-free Read in _decode_session6
2021/12/02 05:11 linux-4.19.y 3f8a27f9e27b 61f86278 .config console log report info ci2-linux-4-19 KASAN: use-after-free Read in _decode_session6
2021/11/22 15:33 linux-4.19.y 3f8a27f9e27b 545ab074 .config console log report info ci2-linux-4-19 KASAN: use-after-free Read in _decode_session6
2021/11/15 07:57 linux-4.19.y 3f8a27f9e27b 75b04091 .config console log report info ci2-linux-4-19 KASAN: use-after-free Read in _decode_session6
2021/11/14 12:23 linux-4.19.y 3f8a27f9e27b 75b04091 .config console log report info ci2-linux-4-19 KASAN: use-after-free Read in _decode_session6
2021/11/11 15:56 linux-4.19.y 3f8a27f9e27b 75b04091 .config console log report info ci2-linux-4-19 KASAN: use-after-free Read in _decode_session6
2021/11/07 13:33 linux-4.19.y 3f8a27f9e27b 4c1be0be .config console log report info ci2-linux-4-19 KASAN: use-after-free Read in _decode_session6
2021/07/10 13:51 linux-4.19.y 9f84340f012e 8f5a7b8c .config console log report info ci2-linux-4-19 KASAN: use-after-free Read in _decode_session6
2020/12/12 00:12 linux-4.19.y 13d2ce42de8c bca53db9 .config console log report info ci2-linux-4-19
2020/09/29 13:37 linux-4.19.y 10ad6cfd5736 1b88c6d5 .config console log report info ci2-linux-4-19
2020/06/26 09:17 linux-4.19.y a39e75458e1c aea82c00 .config console log report ci2-linux-4-19
2020/06/26 06:58 linux-4.19.y a39e75458e1c aea82c00 .config console log report ci2-linux-4-19
2020/06/12 17:01 linux-4.19.y 3fc898571b97 3036d6fd .config console log report ci2-linux-4-19
2020/03/07 06:44 linux-4.19.y 7472c4028e23 fd2a5f28 .config console log report ci2-linux-4-19
* Struck through repros no longer work on HEAD.