syzbot


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

Status: auto-closed as invalid on 2020/09/13 07:38
Reported-by: syzbot+1624fa708388f7ddde9a@syzkaller.appspotmail.com
First crash: 1650d, last: 1650d
Similar bugs (6)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.19 KASAN: slab-out-of-bounds Read in _decode_session6 23 1065d 1720d 0/1 auto-closed as invalid on 2022/04/20 21:31
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 2192d 2214d 0/28 auto-obsoleted due to no activity on 2022/09/01 19:57

Sample crash report:
netlink: 24 bytes leftover after parsing attributes in process `syz-executor.1'.
==================================================================
BUG: KASAN: slab-out-of-bounds in _decode_session6+0xd2d/0x13d0 net/ipv6/xfrm6_policy.c:136
Read of size 1 at addr ffff888053ffb79e by task syz-fuzzer/6338

CPU: 1 PID: 6338 Comm: syz-fuzzer Not tainted 4.14.180-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:17 [inline]
 dump_stack+0x13e/0x194 lib/dump_stack.c:58
 print_address_description.cold+0x7c/0x1e2 mm/kasan/report.c:252
 kasan_report_error mm/kasan/report.c:351 [inline]
 kasan_report mm/kasan/report.c:409 [inline]
 kasan_report.cold+0xa9/0x2ae mm/kasan/report.c:393
 _decode_session6+0xd2d/0x13d0 net/ipv6/xfrm6_policy.c:136
 __xfrm_decode_session+0x5a/0x110 net/xfrm/xfrm_policy.c:2247
 xfrm_decode_session include/net/xfrm.h:1174 [inline]
 vti6_tnl_xmit+0x2f1/0x1860 net/ipv6/ip6_vti.c:578
 __netdev_start_xmit include/linux/netdevice.h:4039 [inline]
 netdev_start_xmit include/linux/netdevice.h:4048 [inline]
 xmit_one net/core/dev.c:3009 [inline]
 dev_hard_start_xmit+0x186/0x890 net/core/dev.c:3025
 sch_direct_xmit+0x25f/0x510 net/sched/sch_generic.c:186
 qdisc_restart net/sched/sch_generic.c:249 [inline]
 __qdisc_run+0x1b6/0xde0 net/sched/sch_generic.c:257
 __dev_xmit_skb net/core/dev.c:3235 [inline]
 __dev_queue_xmit+0x1573/0x25c0 net/core/dev.c:3493
 neigh_output include/net/neighbour.h:500 [inline]
 ip6_finish_output2+0x992/0x2150 net/ipv6/ip6_output.c:120
 ip6_finish_output+0x4d9/0xaf0 net/ipv6/ip6_output.c:154
 NF_HOOK_COND include/linux/netfilter.h:239 [inline]
 ip6_output+0x1c9/0x650 net/ipv6/ip6_output.c:171
 dst_output include/net/dst.h:462 [inline]
 NF_HOOK include/linux/netfilter.h:250 [inline]
 ndisc_send_skb+0xb56/0x11e0 net/ipv6/ndisc.c:483
 ndisc_send_rs+0x125/0x630 net/ipv6/ndisc.c:677
 addrconf_rs_timer+0x289/0x5a0 net/ipv6/addrconf.c:3765
 call_timer_fn+0x14a/0x650 kernel/time/timer.c:1279
 expire_timers kernel/time/timer.c:1318 [inline]
 __run_timers kernel/time/timer.c:1636 [inline]
 __run_timers kernel/time/timer.c:1604 [inline]
 run_timer_softirq+0x52a/0x1390 kernel/time/timer.c:1649
 __do_softirq+0x254/0x9bf kernel/softirq.c:288
 invoke_softirq kernel/softirq.c:368 [inline]
 irq_exit+0x15b/0x1a0 kernel/softirq.c:409
 exiting_irq arch/x86/include/asm/apic.h:648 [inline]
 smp_apic_timer_interrupt+0x141/0x5e0 arch/x86/kernel/apic/apic.c:1102
 apic_timer_interrupt+0x8f/0xa0 arch/x86/entry/entry_64.S:792
 </IRQ>
RIP: 0033:0x6fd73c
RSP: 002b:000000c457755350 EFLAGS: 00000206 ORIG_RAX: ffffffffffffff10
RAX: 000000c4223144d0 RBX: 000000c44ec62ec0 RCX: 0000000000000000
RDX: 0000000000000001 RSI: 0000000000000010 RDI: 000000000084d2c0
RBP: 000000c457755460 R08: 0000000000000001 R09: 0000000000000000
R10: 000000c44ec62ec0 R11: 0000000000000001 R12: ffffffffffffffff
R13: 00000000000000ed R14: 00000000000000ec R15: 0000000000000200

Allocated by task 3640:
 save_stack+0x32/0xa0 mm/kasan/kasan.c:447
 set_track mm/kasan/kasan.c:459 [inline]
 kasan_kmalloc mm/kasan/kasan.c:551 [inline]
 kasan_kmalloc+0xbf/0xe0 mm/kasan/kasan.c:529
 kmem_cache_alloc+0x127/0x770 mm/slab.c:3552
 getname_flags fs/namei.c:138 [inline]
 getname_flags+0xc8/0x560 fs/namei.c:128
 user_path_at_empty+0x2a/0x50 fs/namei.c:2631
 user_path_at include/linux/namei.h:57 [inline]
 vfs_statx+0xd1/0x160 fs/stat.c:185
 vfs_lstat include/linux/fs.h:3066 [inline]
 SYSC_newlstat+0x83/0xe0 fs/stat.c:350
 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292
 entry_SYSCALL_64_after_hwframe+0x42/0xb7

Freed by task 3640:
 save_stack+0x32/0xa0 mm/kasan/kasan.c:447
 set_track mm/kasan/kasan.c:459 [inline]
 kasan_slab_free+0x75/0xc0 mm/kasan/kasan.c:524
 __cache_free mm/slab.c:3496 [inline]
 kmem_cache_free+0x7c/0x2b0 mm/slab.c:3758
 putname+0xcd/0x110 fs/namei.c:259
 filename_lookup+0x23a/0x380 fs/namei.c:2386
 user_path_at include/linux/namei.h:57 [inline]
 vfs_statx+0xd1/0x160 fs/stat.c:185
 vfs_lstat include/linux/fs.h:3066 [inline]
 SYSC_newlstat+0x83/0xe0 fs/stat.c:350
 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292
 entry_SYSCALL_64_after_hwframe+0x42/0xb7

The buggy address belongs to the object at ffff888053ffa040
 which belongs to the cache names_cache of size 4096
The buggy address is located 1886 bytes to the right of
 4096-byte region [ffff888053ffa040, ffff888053ffb040)
The buggy address belongs to the page:
page:ffffea00014ffe80 count:1 mapcount:0 mapping:ffff888053ffa040 index:0x0 compound_mapcount: 0
flags: 0xfffe0000008100(slab|head)
raw: 00fffe0000008100 ffff888053ffa040 0000000000000000 0000000100000001
raw: ffffea000153bf20 ffffea00029b8220 ffff8880aa587e40 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
 ffff888053ffb680: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff888053ffb700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff888053ffb780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
                            ^
 ffff888053ffb800: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff888053ffb880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/05/16 07:38 linux-4.14.y ab9dfda23248 37bccd4e .config console log report ci2-linux-4-14
* Struck through repros no longer work on HEAD.