================================================================== BUG: KASAN: slab-out-of-bounds in decode_session6 net/xfrm/xfrm_policy.c:3450 [inline] BUG: KASAN: slab-out-of-bounds in __xfrm_decode_session+0x1520/0x1d20 net/xfrm/xfrm_policy.c:3556 Read of size 1 at addr ffff0000cd7319ce by task syz-executor.5/7121 CPU: 1 PID: 7121 Comm: syz-executor.5 Not tainted 6.3.0-rc7-syzkaller-g14f8db1c0f9a #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/14/2023 Call trace: dump_backtrace+0x1b8/0x1e4 arch/arm64/kernel/stacktrace.c:233 show_stack+0x2c/0x44 arch/arm64/kernel/stacktrace.c:240 __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd0/0x124 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:319 [inline] print_report+0x174/0x514 mm/kasan/report.c:430 kasan_report+0xd4/0x130 mm/kasan/report.c:536 __asan_report_load1_noabort+0x20/0x2c mm/kasan/report_generic.c:378 decode_session6 net/xfrm/xfrm_policy.c:3450 [inline] __xfrm_decode_session+0x1520/0x1d20 net/xfrm/xfrm_policy.c:3556 xfrm_decode_session include/net/xfrm.h:1210 [inline] xfrmi_xmit+0x158/0x17e8 net/xfrm/xfrm_interface_core.c:539 __netdev_start_xmit include/linux/netdevice.h:4884 [inline] netdev_start_xmit include/linux/netdevice.h:4898 [inline] xmit_one net/core/dev.c:3581 [inline] dev_hard_start_xmit+0x240/0x8ac net/core/dev.c:3597 sch_direct_xmit+0x234/0x548 net/sched/sch_generic.c:342 qdisc_restart net/sched/sch_generic.c:407 [inline] __qdisc_run+0x8a0/0x2228 net/sched/sch_generic.c:415 __dev_xmit_skb net/core/dev.c:3871 [inline] __dev_queue_xmit+0xdf4/0x37dc net/core/dev.c:4213 dev_queue_xmit include/linux/netdevice.h:3054 [inline] neigh_connected_output+0x2f8/0x38c net/core/neighbour.c:1612 neigh_output include/net/neighbour.h:546 [inline] ip6_finish_output2+0xd78/0x1a5c net/ipv6/ip6_output.c:134 __ip6_finish_output net/ipv6/ip6_output.c:195 [inline] ip6_finish_output+0x538/0x8c8 net/ipv6/ip6_output.c:206 NF_HOOK_COND include/linux/netfilter.h:291 [inline] ip6_output+0x270/0x594 net/ipv6/ip6_output.c:227 dst_output include/net/dst.h:444 [inline] NF_HOOK include/linux/netfilter.h:302 [inline] ndisc_send_skb+0xc30/0x1790 net/ipv6/ndisc.c:508 ndisc_send_rs+0x47c/0x5d4 net/ipv6/ndisc.c:718 addrconf_rs_timer+0x300/0x58c net/ipv6/addrconf.c:3936 call_timer_fn+0x19c/0x8cc kernel/time/timer.c:1700 expire_timers kernel/time/timer.c:1751 [inline] __run_timers+0x55c/0x734 kernel/time/timer.c:2022 run_timer_softirq+0x7c/0x114 kernel/time/timer.c:2035 __do_softirq+0x2d0/0xd54 kernel/softirq.c:571 ____do_softirq+0x14/0x20 arch/arm64/kernel/irq.c:80 call_on_irq_stack+0x24/0x4c arch/arm64/kernel/entry.S:899 do_softirq_own_stack+0x20/0x2c arch/arm64/kernel/irq.c:85 invoke_softirq kernel/softirq.c:452 [inline] __irq_exit_rcu+0x28c/0x534 kernel/softirq.c:650 irq_exit_rcu+0x14/0x84 kernel/softirq.c:662 __el1_irq arch/arm64/kernel/entry-common.c:472 [inline] el1_interrupt+0x38/0x68 arch/arm64/kernel/entry-common.c:486 el1h_64_irq_handler+0x18/0x24 arch/arm64/kernel/entry-common.c:491 el1h_64_irq+0x64/0x68 arch/arm64/kernel/entry.S:587 __daif_local_irq_enable arch/arm64/include/asm/irqflags.h:33 [inline] arch_local_irq_enable arch/arm64/include/asm/irqflags.h:55 [inline] raw_spin_rq_unlock_irq kernel/sched/sched.h:1378 [inline] finish_lock_switch+0xc0/0x1e4 kernel/sched/core.c:5065 finish_task_switch+0x120/0x618 kernel/sched/core.c:5184 context_switch kernel/sched/core.c:5310 [inline] __schedule+0x1040/0x1e2c kernel/sched/core.c:6625 schedule+0xc4/0x170 kernel/sched/core.c:6701 schedule_timeout+0xb8/0x348 kernel/time/timer.c:2143 unix_wait_for_peer+0x1d8/0x2a8 net/unix/af_unix.c:1450 unix_dgram_sendmsg+0xd90/0x16c0 net/unix/af_unix.c:2048 sock_sendmsg_nosec net/socket.c:724 [inline] sock_sendmsg net/socket.c:747 [inline] ____sys_sendmsg+0x568/0x81c net/socket.c:2501 ___sys_sendmsg net/socket.c:2555 [inline] __sys_sendmmsg+0x318/0x7d8 net/socket.c:2641 __do_sys_sendmmsg net/socket.c:2670 [inline] __se_sys_sendmmsg net/socket.c:2667 [inline] __arm64_sys_sendmmsg+0xa0/0xbc net/socket.c:2667 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2c0 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142 do_el0_svc+0x64/0x198 arch/arm64/kernel/syscall.c:193 el0_svc+0x4c/0x15c arch/arm64/kernel/entry-common.c:637 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:591 Allocated by task 5557: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4c/0x7c mm/kasan/common.c:52 kasan_save_alloc_info+0x24/0x30 mm/kasan/generic.c:510 ____kasan_kmalloc mm/kasan/common.c:374 [inline] __kasan_kmalloc+0xac/0xc4 mm/kasan/common.c:383 kasan_kmalloc include/linux/kasan.h:196 [inline] __do_kmalloc_node mm/slab_common.c:967 [inline] __kmalloc+0xcc/0x1b8 mm/slab_common.c:980 kmalloc include/linux/slab.h:584 [inline] shmem_initxattrs+0xc4/0x1bc mm/shmem.c:3283 security_inode_init_security+0x270/0x370 security/security.c:1147 shmem_mknod+0xcc/0x1cc mm/shmem.c:2935 shmem_create+0x40/0x54 mm/shmem.c:2994 lookup_open fs/namei.c:3416 [inline] open_last_lookups fs/namei.c:3484 [inline] path_openat+0xf80/0x27f8 fs/namei.c:3712 do_filp_open+0x1bc/0x3cc fs/namei.c:3742 do_sys_openat2+0x128/0x3d8 fs/open.c:1348 do_sys_open fs/open.c:1364 [inline] __do_sys_openat fs/open.c:1380 [inline] __se_sys_openat fs/open.c:1375 [inline] __arm64_sys_openat+0x1f0/0x240 fs/open.c:1375 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2c0 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142 do_el0_svc+0x64/0x198 arch/arm64/kernel/syscall.c:193 el0_svc+0x4c/0x15c arch/arm64/kernel/entry-common.c:637 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:591 The buggy address belongs to the object at ffff0000cd731900 which belongs to the cache kmalloc-128 of size 128 The buggy address is located 189 bytes to the right of allocated 17-byte region [ffff0000cd731900, ffff0000cd731911) The buggy address belongs to the physical page: page:00000000c18cd522 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10d731 flags: 0x5ffc00000000200(slab|node=0|zone=2|lastcpupid=0x7ff) raw: 05ffc00000000200 ffff0000c0002300 fffffc0003585ec0 dead000000000004 raw: 0000000000000000 0000000000100010 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff0000cd731880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff0000cd731900: 00 00 01 fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff0000cd731980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff0000cd731a00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff0000cd731a80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================