================================================================== BUG: KASAN: slab-out-of-bounds in _decode_session6+0xf56/0x1370 net/ipv6/xfrm6_policy.c:137 Read of size 1 at addr ffff8880a109c52e by task systemd-udevd/11292 CPU: 0 PID: 11292 Comm: systemd-udevd Not tainted 4.19.190-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 syz-executor.5 uses obsolete (PF_INET,SOCK_PACKET) Call Trace: __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] vti6_tnl_xmit+0x42b/0x1c80 net/ipv6/ip6_vti.c:570 __netdev_start_xmit include/linux/netdevice.h:4345 [inline] netdev_start_xmit include/linux/netdevice.h:4359 [inline] xmit_one net/core/dev.c:3256 [inline] dev_hard_start_xmit+0x1a8/0x920 net/core/dev.c:3272 sch_direct_xmit+0x2d6/0xf50 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+0x795/0xe50 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:535 [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 RIP: 0010:arch_local_irq_restore arch/x86/include/asm/paravirt.h:789 [inline] RIP: 0010:lock_release+0x429/0x8b0 kernel/locking/lockdep.c:3930 Code: 84 08 00 00 00 00 00 00 48 c1 e8 03 80 3c 10 00 0f 85 95 03 00 00 48 83 3d db 54 a6 08 00 0f 84 cc 01 00 00 48 8b 3c 24 57 9d <0f> 1f 44 00 00 48 b8 00 00 00 00 00 fc ff df 49 c7 04 04 00 00 00 RSP: 0018:ffff888041687860 EFLAGS: 00000282 ORIG_RAX: ffffffffffffff13 RAX: 1ffffffff13e3049 RBX: ffff888040896540 RCX: 1ffff11008112dbe RDX: dffffc0000000000 RSI: 0000000000000002 RDI: 0000000000000282 RBP: 0000000000000001 R08: 0000000000000001 R09: 0000000000000001 R10: 0000000000000000 R11: 0000000000000000 R12: 1ffff110082d0f0f R13: 6ef1e41ac93df87f R14: ffff888040896540 R15: 0000000000000002 __raw_spin_unlock include/linux/spinlock_api_smp.h:150 [inline] _raw_spin_unlock+0x17/0x40 kernel/locking/spinlock.c:176 spin_unlock include/linux/spinlock.h:369 [inline] lockref_get_not_dead+0x66/0x80 lib/lockref.c:214 legitimize_path.isra.0+0x7f/0x1c0 fs/namei.c:625 unlazy_walk+0x108/0x540 fs/namei.c:677 may_lookup fs/namei.c:1700 [inline] link_path_walk.part.0+0x916/0x1230 fs/namei.c:2085 link_path_walk fs/namei.c:2270 [inline] path_lookupat+0xe4/0x8d0 fs/namei.c:2318 filename_lookup+0x1ac/0x5a0 fs/namei.c:2349 user_path_at include/linux/namei.h:57 [inline] vfs_statx+0x113/0x210 fs/stat.c:185 vfs_lstat include/linux/fs.h:3137 [inline] __do_sys_newlstat fs/stat.c:350 [inline] __se_sys_newlstat+0x96/0x120 fs/stat.c:344 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7fdc0031c335 Code: 69 db 2b 00 64 c7 00 16 00 00 00 b8 ff ff ff ff c3 0f 1f 40 00 83 ff 01 48 89 f0 77 30 48 89 c7 48 89 d6 b8 06 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 03 f3 c3 90 48 8b 15 31 db 2b 00 f7 d8 64 89 RSP: 002b:00007ffef6ac78d8 EFLAGS: 00000246 ORIG_RAX: 0000000000000006 RAX: ffffffffffffffda RBX: 0000564e6a28ba20 RCX: 00007fdc0031c335 RDX: 00007ffef6ac7910 RSI: 00007ffef6ac7910 RDI: 0000564e6a28aa20 RBP: 00007ffef6ac79d0 R08: 00007fdc005db1e8 R09: 0000000000001010 R10: 0000000000000020 R11: 0000000000000246 R12: 0000564e6a28aa20 R13: 0000564e6a28aa2c R14: 0000564e6a28d9a5 R15: 0000564e6a28d9ac Allocated by task 4694: kmem_cache_alloc+0x122/0x370 mm/slab.c:3559 getname_flags+0xce/0x590 fs/namei.c:140 user_path_at_empty+0x2a/0x50 fs/namei.c:2609 user_path_at include/linux/namei.h:57 [inline] vfs_statx+0x113/0x210 fs/stat.c:185 vfs_lstat include/linux/fs.h:3137 [inline] __do_sys_newlstat fs/stat.c:350 [inline] __se_sys_newlstat+0x96/0x120 fs/stat.c:344 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 4694: __cache_free mm/slab.c:3503 [inline] kmem_cache_free+0x7f/0x260 mm/slab.c:3765 putname+0xe1/0x120 fs/namei.c:261 filename_lookup+0x3d0/0x5a0 fs/namei.c:2358 user_path_at include/linux/namei.h:57 [inline] vfs_statx+0x113/0x210 fs/stat.c:185 vfs_lstat include/linux/fs.h:3137 [inline] __do_sys_newlstat fs/stat.c:350 [inline] __se_sys_newlstat+0x96/0x120 fs/stat.c:344 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 ffff8880a109ce40 which belongs to the cache names_cache of size 4096 The buggy address is located 2322 bytes to the left of 4096-byte region [ffff8880a109ce40, ffff8880a109de40) The buggy address belongs to the page: page:ffffea0002842700 count:1 mapcount:0 mapping:ffff88823b843380 index:0x0 compound_mapcount: 0 flags: 0xfff00000008100(slab|head) raw: 00fff00000008100 ffffea0002868608 ffffea00023c9988 ffff88823b843380 raw: 0000000000000000 ffff8880a109ce40 0000000100000001 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880a109c400: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880a109c480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff8880a109c500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff8880a109c580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880a109c600: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================