================================================================== BUG: KASAN: slab-out-of-bounds in decode_session6+0xfc3/0x17f0 net/xfrm/xfrm_policy.c:3376 Read of size 1 at addr ffff88801d3ea2ad by task ksoftirqd/1/21 CPU: 1 PID: 21 Comm: ksoftirqd/1 Not tainted 6.0.0-rc6-syzkaller-00180-g49725ffc15fc #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/26/2022 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:317 [inline] print_report.cold+0x2ba/0x719 mm/kasan/report.c:433 kasan_report+0xb1/0x1e0 mm/kasan/report.c:495 decode_session6+0xfc3/0x17f0 net/xfrm/xfrm_policy.c:3376 __xfrm_decode_session+0x50/0xb0 net/xfrm/xfrm_policy.c:3482 xfrm_decode_session include/net/xfrm.h:1160 [inline] xfrmi_xmit+0x16f/0x1780 net/xfrm/xfrm_interface.c:356 __netdev_start_xmit include/linux/netdevice.h:4819 [inline] netdev_start_xmit include/linux/netdevice.h:4833 [inline] xmit_one net/core/dev.c:3590 [inline] dev_hard_start_xmit+0x183/0x880 net/core/dev.c:3606 sch_direct_xmit+0x19f/0xbe0 net/sched/sch_generic.c:342 qdisc_restart net/sched/sch_generic.c:407 [inline] __qdisc_run+0x4bb/0x1710 net/sched/sch_generic.c:415 __dev_xmit_skb net/core/dev.c:3880 [inline] __dev_queue_xmit+0x2299/0x3ad0 net/core/dev.c:4222 dev_queue_xmit include/linux/netdevice.h:3008 [inline] neigh_connected_output+0x3c0/0x520 net/core/neighbour.c:1581 neigh_output include/net/neighbour.h:551 [inline] ip6_finish_output2+0x564/0x1520 net/ipv6/ip6_output.c:134 __ip6_finish_output net/ipv6/ip6_output.c:195 [inline] ip6_finish_output+0x690/0x1160 net/ipv6/ip6_output.c:206 NF_HOOK_COND include/linux/netfilter.h:296 [inline] ip6_output+0x1ed/0x540 net/ipv6/ip6_output.c:227 dst_output include/net/dst.h:451 [inline] NF_HOOK include/linux/netfilter.h:307 [inline] ndisc_send_skb+0xa5f/0x1730 net/ipv6/ndisc.c:508 ndisc_send_rs+0x12e/0x6f0 net/ipv6/ndisc.c:718 addrconf_rs_timer+0x3ed/0x820 net/ipv6/addrconf.c:3931 call_timer_fn+0x1a0/0x6b0 kernel/time/timer.c:1474 expire_timers kernel/time/timer.c:1519 [inline] __run_timers.part.0+0x674/0xa80 kernel/time/timer.c:1790 __run_timers kernel/time/timer.c:1768 [inline] run_timer_softirq+0xb3/0x1d0 kernel/time/timer.c:1803 __do_softirq+0x1d3/0x9c6 kernel/softirq.c:571 run_ksoftirqd kernel/softirq.c:934 [inline] run_ksoftirqd+0x2d/0x60 kernel/softirq.c:926 smpboot_thread_fn+0x645/0x9c0 kernel/smpboot.c:164 kthread+0x2e4/0x3a0 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306 Allocated by task 7394: kasan_save_stack+0x1e/0x40 mm/kasan/common.c:38 kasan_set_track mm/kasan/common.c:45 [inline] set_alloc_info mm/kasan/common.c:437 [inline] __kasan_slab_alloc+0x90/0xc0 mm/kasan/common.c:470 kasan_slab_alloc include/linux/kasan.h:224 [inline] slab_post_alloc_hook mm/slab.h:727 [inline] slab_alloc_node mm/slub.c:3243 [inline] slab_alloc mm/slub.c:3251 [inline] __kmem_cache_alloc_lru mm/slub.c:3258 [inline] kmem_cache_alloc+0x267/0x3b0 mm/slub.c:3268 kmem_cache_zalloc include/linux/slab.h:723 [inline] __kernfs_new_node+0xd4/0x8b0 fs/kernfs/dir.c:593 kernfs_new_node+0x93/0x120 fs/kernfs/dir.c:655 __kernfs_create_file+0x51/0x350 fs/kernfs/file.c:1050 sysfs_add_file_mode_ns+0x20f/0x3f0 fs/sysfs/file.c:294 create_files fs/sysfs/group.c:64 [inline] internal_create_group+0x322/0xb10 fs/sysfs/group.c:148 internal_create_groups.part.0+0x90/0x140 fs/sysfs/group.c:188 internal_create_groups fs/sysfs/group.c:184 [inline] sysfs_create_groups+0x25/0x50 fs/sysfs/group.c:214 device_add_groups drivers/base/core.c:2572 [inline] device_add_attrs drivers/base/core.c:2720 [inline] device_add+0x796/0x1e90 drivers/base/core.c:3468 netdev_register_kobject+0x181/0x400 net/core/net-sysfs.c:2015 register_netdevice+0xe01/0x1680 net/core/dev.c:10070 veth_newlink+0x4d6/0x9a0 drivers/net/veth.c:1795 rtnl_newlink_create net/core/rtnetlink.c:3363 [inline] __rtnl_newlink+0x1087/0x17e0 net/core/rtnetlink.c:3580 rtnl_newlink+0x64/0xa0 net/core/rtnetlink.c:3593 rtnetlink_rcv_msg+0x43a/0xca0 net/core/rtnetlink.c:6090 netlink_rcv_skb+0x153/0x420 net/netlink/af_netlink.c:2501 netlink_unicast_kernel net/netlink/af_netlink.c:1319 [inline] netlink_unicast+0x543/0x7f0 net/netlink/af_netlink.c:1345 netlink_sendmsg+0x917/0xe10 net/netlink/af_netlink.c:1921 sock_sendmsg_nosec net/socket.c:714 [inline] sock_sendmsg+0xcf/0x120 net/socket.c:734 ____sys_sendmsg+0x6eb/0x810 net/socket.c:2482 ___sys_sendmsg+0x110/0x1b0 net/socket.c:2536 __sys_sendmsg+0xf3/0x1c0 net/socket.c:2565 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd The buggy address belongs to the object at ffff88801d3ea1d0 which belongs to the cache kernfs_node_cache of size 168 The buggy address is located 53 bytes to the right of 168-byte region [ffff88801d3ea1d0, ffff88801d3ea278) The buggy address belongs to the physical page: page:ffffea000074fa80 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1d3ea flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000200 ffffea0000812700 dead00000000000e ffff888140007b40 raw: 0000000000000000 0000000000110011 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x112cc0(GFP_USER|__GFP_NOWARN|__GFP_NORETRY), pid 7112, tgid 7102 (syz-executor.4), ts 303255559824, free_ts 289287550868 prep_new_page mm/page_alloc.c:2532 [inline] get_page_from_freelist+0x109b/0x2ce0 mm/page_alloc.c:4283 __alloc_pages+0x1c7/0x510 mm/page_alloc.c:5515 alloc_pages+0x1a6/0x270 mm/mempolicy.c:2270 alloc_slab_page mm/slub.c:1824 [inline] allocate_slab+0x27e/0x3d0 mm/slub.c:1969 new_slab mm/slub.c:2029 [inline] ___slab_alloc+0x7f1/0xe10 mm/slub.c:3031 __slab_alloc.constprop.0+0x4d/0xa0 mm/slub.c:3118 slab_alloc_node mm/slub.c:3209 [inline] slab_alloc mm/slub.c:3251 [inline] __kmem_cache_alloc_lru mm/slub.c:3258 [inline] kmem_cache_alloc+0x38c/0x3b0 mm/slub.c:3268 kmem_cache_zalloc include/linux/slab.h:723 [inline] __kernfs_new_node+0xd4/0x8b0 fs/kernfs/dir.c:593 kernfs_new_node+0x93/0x120 fs/kernfs/dir.c:655 __kernfs_create_file+0x51/0x350 fs/kernfs/file.c:1050 sysfs_add_file_mode_ns+0x20f/0x3f0 fs/sysfs/file.c:294 create_files fs/sysfs/group.c:64 [inline] internal_create_group+0x322/0xb10 fs/sysfs/group.c:148 internal_create_groups.part.0+0x90/0x140 fs/sysfs/group.c:188 internal_create_groups fs/sysfs/group.c:184 [inline] sysfs_create_groups+0x25/0x50 fs/sysfs/group.c:214 device_add_groups drivers/base/core.c:2572 [inline] device_add_attrs drivers/base/core.c:2720 [inline] device_add+0x796/0x1e90 drivers/base/core.c:3468 netdev_register_kobject+0x181/0x400 net/core/net-sysfs.c:2015 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1449 [inline] free_pcp_prepare+0x5e4/0xd20 mm/page_alloc.c:1499 free_unref_page_prepare mm/page_alloc.c:3380 [inline] free_unref_page+0x19/0x4d0 mm/page_alloc.c:3476 __vunmap+0x85d/0xd30 mm/vmalloc.c:2696 free_work+0x58/0x70 mm/vmalloc.c:97 process_one_work+0x991/0x1610 kernel/workqueue.c:2289 worker_thread+0x665/0x1080 kernel/workqueue.c:2436 kthread+0x2e4/0x3a0 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306 Memory state around the buggy address: ffff88801d3ea180: 00 00 fc fc fc fc fc fc fc fc 00 00 00 00 00 00 ffff88801d3ea200: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc >ffff88801d3ea280: fc fc fc fc fc fc fc 00 00 00 00 00 00 00 00 00 ^ ffff88801d3ea300: 00 00 00 00 00 00 00 00 00 00 00 00 fc fc fc fc ffff88801d3ea380: fc fc fc fc 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================