syzbot


KASAN: slab-out-of-bounds Read in _decode_session6 (2)

Status: auto-obsoleted due to no activity on 2022/09/05 20:15
Reported-by: syzbot+d7e50328552362322eec@syzkaller.appspotmail.com
First crash: 775d, last: 756d
Similar bugs (7)
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 1478d 1478d 0/1 auto-closed as invalid on 2020/09/13 07:38
linux-4.19 KASAN: slab-out-of-bounds Read in _decode_session6 23 894d 1549d 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 2043d 2101d 11/26 fixed on 2018/10/30 01:28
android-414 KASAN: slab-out-of-bounds Read in _decode_session6 C 42 2022d 1880d 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 482d 623d 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 2021d 2042d 0/26 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 746d 746d 0/1 auto-obsoleted due to no activity on 2022/09/15 14:44

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

CPU: 1 PID: 10858 Comm: syz-executor.1 Not tainted 4.14.277-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+0x1b2/0x281 lib/dump_stack.c:58
 print_address_description.cold+0x54/0x1d3 mm/kasan/report.c:252
 kasan_report_error.cold+0x8a/0x191 mm/kasan/report.c:351
 kasan_report mm/kasan/report.c:409 [inline]
 __asan_report_load1_noabort+0x68/0x70 mm/kasan/report.c:427
 _decode_session6+0xe6c/0x12f0 net/ipv6/xfrm6_policy.c:136
 __xfrm_decode_session+0x5a/0x110 net/xfrm/xfrm_policy.c:2238
 xfrm_decode_session include/net/xfrm.h:1174 [inline]
 vti6_tnl_xmit+0x2f3/0x17d0 net/ipv6/ip6_vti.c:577
 __netdev_start_xmit include/linux/netdevice.h:4054 [inline]
 netdev_start_xmit include/linux/netdevice.h:4063 [inline]
 xmit_one net/core/dev.c:3005 [inline]
 dev_hard_start_xmit+0x188/0x890 net/core/dev.c:3021
 sch_direct_xmit+0x251/0x500 net/sched/sch_generic.c:186
 qdisc_restart net/sched/sch_generic.c:249 [inline]
 __qdisc_run+0x25d/0xe00 net/sched/sch_generic.c:257
 __dev_xmit_skb net/core/dev.c:3231 [inline]
 __dev_queue_xmit+0x13ac/0x2480 net/core/dev.c:3489
 neigh_output include/net/neighbour.h:500 [inline]
 ip6_finish_output2+0xf48/0x1f10 net/ipv6/ip6_output.c:120
 ip6_finish_output+0x5c6/0xd50 net/ipv6/ip6_output.c:192
 NF_HOOK_COND include/linux/netfilter.h:239 [inline]
 ip6_output+0x1c5/0x660 net/ipv6/ip6_output.c:209
 dst_output include/net/dst.h:470 [inline]
 NF_HOOK include/linux/netfilter.h:250 [inline]
 ndisc_send_skb+0x82a/0x1390 net/ipv6/ndisc.c:483
 ndisc_send_rs+0x125/0x630 net/ipv6/ndisc.c:677
 addrconf_rs_timer+0x2bb/0x5a0 net/ipv6/addrconf.c:3769
 call_timer_fn+0x14a/0x650 kernel/time/timer.c:1280
 expire_timers+0x232/0x4d0 kernel/time/timer.c:1319
 __run_timers kernel/time/timer.c:1637 [inline]
 run_timer_softirq+0x1d5/0x5a0 kernel/time/timer.c:1650
 __do_softirq+0x24d/0x9ff kernel/softirq.c:288
 invoke_softirq kernel/softirq.c:368 [inline]
 irq_exit+0x193/0x240 kernel/softirq.c:409
 exiting_irq arch/x86/include/asm/apic.h:638 [inline]
 smp_apic_timer_interrupt+0x141/0x5e0 arch/x86/kernel/apic/apic.c:1106
 apic_timer_interrupt+0x93/0xa0 arch/x86/entry/entry_64.S:793
 </IRQ>
RIP: 0010:arch_local_irq_restore arch/x86/include/asm/paravirt.h:779 [inline]
RIP: 0010:rmqueue_pcplist mm/page_alloc.c:2807 [inline]
RIP: 0010:rmqueue mm/page_alloc.c:2824 [inline]
RIP: 0010:get_page_from_freelist+0xad7/0x25a0 mm/page_alloc.c:3173
RSP: 0018:ffff8880b1787658 EFLAGS: 00000286 ORIG_RAX: ffffffffffffff10
RAX: 1ffffffff11e1311 RBX: 0000000000000000 RCX: 1ffff11016923157
RDX: 0000000000000000 RSI: ffff8880b4918a98 RDI: 0000000000000286
RBP: 0000000000000004 R08: ffffea0001f7be00 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: ffffea0001f7be00
R13: dffffc0000000000 R14: 0000000000000000 R15: ffff88813fffb6c0
 __alloc_pages_nodemask+0x365/0x2720 mm/page_alloc.c:4185
 alloc_pages_current+0x155/0x260 mm/mempolicy.c:2107
 alloc_pages include/linux/gfp.h:520 [inline]
 __page_cache_alloc mm/filemap.c:871 [inline]
 pagecache_get_page+0x3f5/0xab0 mm/filemap.c:1501
 grab_cache_page_write_begin+0x63/0x90 mm/filemap.c:3005
 ext4_da_write_begin+0x249/0xe70 fs/ext4/inode.c:3107
 generic_perform_write+0x1c9/0x420 mm/filemap.c:3055
 __generic_file_write_iter+0x227/0x590 mm/filemap.c:3180
 ext4_file_write_iter+0x276/0xd20 fs/ext4/file.c:270
 call_write_iter include/linux/fs.h:1780 [inline]
 new_sync_write fs/read_write.c:469 [inline]
 __vfs_write+0x44c/0x630 fs/read_write.c:482
 vfs_write+0x17f/0x4d0 fs/read_write.c:544
 SYSC_write fs/read_write.c:590 [inline]
 SyS_write+0xf2/0x210 fs/read_write.c:582
 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292
 entry_SYSCALL_64_after_hwframe+0x46/0xbb
RIP: 0033:0x7f7dc580f0e9
RSP: 002b:00007f7dc4184168 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00007f7dc5921f60 RCX: 00007f7dc580f0e9
RDX: 00000000fd3678f9 RSI: 0000000020000000 RDI: 0000000000000005
RBP: 00007f7dc586908d R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fffb8b0f20f R14: 00007f7dc4184300 R15: 0000000000022000

Allocated by task 10631:
 save_stack mm/kasan/kasan.c:447 [inline]
 set_track mm/kasan/kasan.c:459 [inline]
 kasan_kmalloc+0xeb/0x160 mm/kasan/kasan.c:551
 kmem_cache_alloc+0x124/0x3c0 mm/slab.c:3552
 getname_flags+0xc8/0x550 fs/namei.c:138
 do_sys_open+0x1ce/0x410 fs/open.c:1075
 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292
 entry_SYSCALL_64_after_hwframe+0x46/0xbb

Freed by task 10631:
 save_stack mm/kasan/kasan.c:447 [inline]
 set_track mm/kasan/kasan.c:459 [inline]
 kasan_slab_free+0xc3/0x1a0 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
 do_sys_open+0x203/0x410 fs/open.c:1090
 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292
 entry_SYSCALL_64_after_hwframe+0x46/0xbb

The buggy address belongs to the object at ffff88809bcaaec0
 which belongs to the cache names_cache of size 4096
The buggy address is located 98 bytes to the left of
 4096-byte region [ffff88809bcaaec0, ffff88809bcabec0)
The buggy address belongs to the page:
page:ffffea00026f2a80 count:1 mapcount:0 mapping:ffff88809bcaaec0 index:0x0 compound_mapcount: 0
flags: 0xfff00000008100(slab|head)
raw: 00fff00000008100 ffff88809bcaaec0 0000000000000000 0000000100000001
raw: ffffea0001d53e20 ffffea0001d69da0 ffff88823f8bb200 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
 ffff88809bcaad00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff88809bcaad80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff88809bcaae00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
                                                    ^
 ffff88809bcaae80: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb
 ffff88809bcaaf00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/05/08 20:14 linux-4.14.y e3a56aaade89 e60b1103 .config console log report info ci2-linux-4-14 KASAN: slab-out-of-bounds Read in _decode_session6
2022/04/20 02:55 linux-4.14.y 74766a973637 7d7bc738 .config console log report info ci2-linux-4-14 KASAN: slab-out-of-bounds Read in _decode_session6
* Struck through repros no longer work on HEAD.