================================================================== BUG: KASAN: slab-out-of-bounds in decode_session6 net/xfrm/xfrm_policy.c:3415 [inline] BUG: KASAN: slab-out-of-bounds in __xfrm_decode_session+0x1857/0x2010 net/xfrm/xfrm_policy.c:3521 Read of size 1 at addr ffff8880729a15f4 by task syz.3.55/4553 CPU: 1 PID: 4553 Comm: syz.3.55 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/02/2025 Call Trace: dump_stack_lvl+0x168/0x22e lib/dump_stack.c:106 print_address_description mm/kasan/report.c:316 [inline] print_report+0xa8/0x210 mm/kasan/report.c:420 kasan_report+0x10b/0x140 mm/kasan/report.c:524 decode_session6 net/xfrm/xfrm_policy.c:3415 [inline] __xfrm_decode_session+0x1857/0x2010 net/xfrm/xfrm_policy.c:3521 xfrm_decode_session_reverse include/net/xfrm.h:1183 [inline] icmpv6_route_lookup+0x33e/0x530 net/ipv6/icmp.c:394 icmp6_send+0xf4c/0x18d0 net/ipv6/icmp.c:603 __icmpv6_send include/linux/icmpv6.h:28 [inline] icmpv6_send include/linux/icmpv6.h:49 [inline] ip6_link_failure+0x37/0x4c0 net/ipv6/route.c:2827 dst_link_failure include/net/dst.h:423 [inline] ip6_tnl_xmit+0x1073/0x2ab0 net/ipv6/ip6_tunnel.c:1283 ipxip6_tnl_xmit net/ipv6/ip6_tunnel.c:1399 [inline] ip6_tnl_start_xmit+0xc2b/0x1150 net/ipv6/ip6_tunnel.c:1448 __netdev_start_xmit include/linux/netdevice.h:4896 [inline] netdev_start_xmit include/linux/netdevice.h:4910 [inline] xmit_one net/core/dev.c:3670 [inline] dev_hard_start_xmit+0x262/0x870 net/core/dev.c:3686 sch_direct_xmit+0x24e/0x4a0 net/sched/sch_generic.c:342 qdisc_restart net/sched/sch_generic.c:407 [inline] __qdisc_run+0xadf/0x15f0 net/sched/sch_generic.c:415 __dev_xmit_skb net/core/dev.c:3970 [inline] __dev_queue_xmit+0x107e/0x3760 net/core/dev.c:4312 neigh_output include/net/neighbour.h:545 [inline] ip6_finish_output2+0xda2/0x1590 net/ipv6/ip6_output.c:138 ip6_fragment+0x1440/0x2180 net/ipv6/ip6_output.c:1021 dst_output include/net/dst.h:453 [inline] NF_HOOK include/linux/netfilter.h:302 [inline] ip6_xmit+0x10a9/0x1840 net/ipv6/ip6_output.c:357 sctp_v6_xmit+0x9af/0x11d0 net/sctp/ipv6.c:250 sctp_packet_transmit+0x2406/0x29c0 net/sctp/output.c:653 sctp_packet_singleton+0x230/0x330 net/sctp/outqueue.c:783 sctp_outq_flush_ctrl net/sctp/outqueue.c:914 [inline] sctp_outq_flush+0x48f/0x3100 net/sctp/outqueue.c:1212 sctp_cmd_interpreter net/sctp/sm_sideeffect.c:-1 [inline] sctp_side_effects net/sctp/sm_sideeffect.c:1199 [inline] sctp_do_sm+0x4e61/0x5500 net/sctp/sm_sideeffect.c:1170 sctp_primitive_ASSOCIATE+0x91/0xc0 net/sctp/primitive.c:73 __sctp_connect+0x92b/0xd20 net/sctp/socket.c:1233 __sctp_setsockopt_connectx net/sctp/socket.c:1335 [inline] sctp_getsockopt_connectx3+0x2c0/0x440 net/sctp/socket.c:1420 sctp_getsockopt+0x3ab/0x8a0 net/sctp/socket.c:8126 __sys_getsockopt+0x1b0/0x230 net/socket.c:2332 __do_sys_getsockopt net/socket.c:2347 [inline] __se_sys_getsockopt net/socket.c:2344 [inline] __x64_sys_getsockopt+0xb1/0xc0 net/socket.c:2344 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 RIP: 0033:0x7f63c5f8f749 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f63c6e05038 EFLAGS: 00000246 ORIG_RAX: 0000000000000037 RAX: ffffffffffffffda RBX: 00007f63c61e5fa0 RCX: 00007f63c5f8f749 RDX: 000000000000006f RSI: 0000000000000084 RDI: 0000000000000003 RBP: 00007f63c6013f91 R08: 0000200000000040 R09: 0000000000000000 R10: 0000200000000280 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f63c61e6038 R14: 00007f63c61e5fa0 R15: 00007fff4cdce038 Allocated by task 4272: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4b/0x70 mm/kasan/common.c:52 ____kasan_kmalloc mm/kasan/common.c:374 [inline] __kasan_kmalloc+0x8e/0xa0 mm/kasan/common.c:383 kasan_kmalloc include/linux/kasan.h:211 [inline] __do_kmalloc_node mm/slab_common.c:936 [inline] __kmalloc+0xb0/0x240 mm/slab_common.c:949 kmalloc include/linux/slab.h:568 [inline] tomoyo_realpath_from_path+0xdf/0x5d0 security/tomoyo/realpath.c:251 tomoyo_get_realpath security/tomoyo/file.c:151 [inline] tomoyo_path_perm+0x1fd/0x550 security/tomoyo/file.c:822 security_inode_getattr+0xcf/0x120 security/security.c:1361 vfs_getattr+0x26/0x3a0 fs/stat.c:158 vfs_statx+0x16e/0x650 fs/stat.c:233 vfs_fstatat fs/stat.c:267 [inline] __do_sys_newfstatat fs/stat.c:437 [inline] __se_sys_newfstatat fs/stat.c:431 [inline] __x64_sys_newfstatat+0x155/0x1e0 fs/stat.c:431 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 Freed by task 4272: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4b/0x70 mm/kasan/common.c:52 kasan_save_free_info+0x2d/0x50 mm/kasan/generic.c:516 ____kasan_slab_free+0x126/0x1e0 mm/kasan/common.c:236 kasan_slab_free include/linux/kasan.h:177 [inline] slab_free_hook mm/slub.c:1729 [inline] slab_free_freelist_hook+0x131/0x1a0 mm/slub.c:1755 slab_free mm/slub.c:3687 [inline] __kmem_cache_free+0xb6/0x1f0 mm/slub.c:3700 tomoyo_realpath_from_path+0x599/0x5d0 security/tomoyo/realpath.c:286 tomoyo_get_realpath security/tomoyo/file.c:151 [inline] tomoyo_path_perm+0x1fd/0x550 security/tomoyo/file.c:822 security_inode_getattr+0xcf/0x120 security/security.c:1361 vfs_getattr+0x26/0x3a0 fs/stat.c:158 vfs_statx+0x16e/0x650 fs/stat.c:233 vfs_fstatat fs/stat.c:267 [inline] __do_sys_newfstatat fs/stat.c:437 [inline] __se_sys_newfstatat fs/stat.c:431 [inline] __x64_sys_newfstatat+0x155/0x1e0 fs/stat.c:431 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 The buggy address belongs to the object at ffff8880729a0000 which belongs to the cache kmalloc-4k of size 4096 The buggy address is located 1524 bytes to the right of 4096-byte region [ffff8880729a0000, ffff8880729a1000) The buggy address belongs to the physical page: page:ffffea0001ca6800 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x729a0 head:ffffea0001ca6800 order:3 compound_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 0000000000000000 dead000000000001 ffff888017442140 raw: 0000000000000000 0000000000040004 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 3, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 46, tgid 46 (kworker/u4:3), ts 80187691275, free_ts 72266706805 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x173/0x1a0 mm/page_alloc.c:2532 prep_new_page mm/page_alloc.c:2539 [inline] get_page_from_freelist+0x1a26/0x1ac0 mm/page_alloc.c:4328 __alloc_pages+0x1df/0x4e0 mm/page_alloc.c:5614 alloc_slab_page+0x5d/0x160 mm/slub.c:1799 allocate_slab mm/slub.c:1944 [inline] new_slab+0x87/0x2c0 mm/slub.c:1997 ___slab_alloc+0xbc6/0x1230 mm/slub.c:3154 __slab_alloc mm/slub.c:3240 [inline] slab_alloc_node mm/slub.c:3325 [inline] __kmem_cache_alloc_node+0x1a0/0x260 mm/slub.c:3398 __do_kmalloc_node mm/slab_common.c:935 [inline] __kmalloc_node_track_caller+0x9e/0x230 mm/slab_common.c:956 kmalloc_reserve net/core/skbuff.c:446 [inline] __alloc_skb+0x22a/0x7e0 net/core/skbuff.c:515 alloc_skb include/linux/skbuff.h:1271 [inline] nlmsg_new include/net/netlink.h:991 [inline] rtmsg_ifinfo_build_skb+0x80/0x180 net/core/rtnetlink.c:3966 rtmsg_ifinfo_event net/core/rtnetlink.c:4002 [inline] rtmsg_ifinfo+0x71/0x120 net/core/rtnetlink.c:4011 netdev_state_change+0xe6/0x140 net/core/dev.c:1392 linkwatch_do_dev+0x10d/0x160 net/core/link_watch.c:168 __linkwatch_run_queue+0x408/0x660 net/core/link_watch.c:221 linkwatch_event+0x48/0x50 net/core/link_watch.c:264 process_one_work+0x898/0x1160 kernel/workqueue.c:2292 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1459 [inline] free_pcp_prepare mm/page_alloc.c:1509 [inline] free_unref_page_prepare+0x8b4/0x9a0 mm/page_alloc.c:3384 free_unref_page_list+0xbb/0x8e0 mm/page_alloc.c:3525 release_pages+0x1f92/0x2200 mm/swap.c:1035 tlb_batch_pages_flush mm/mmu_gather.c:59 [inline] tlb_flush_mmu_free mm/mmu_gather.c:254 [inline] tlb_flush_mmu+0xff/0x210 mm/mmu_gather.c:261 tlb_finish_mmu+0xbd/0x1c0 mm/mmu_gather.c:361 unmap_region+0x272/0x2c0 mm/mmap.c:2343 do_mas_align_munmap+0xc57/0x1220 mm/mmap.c:2592 do_mas_munmap+0x240/0x2b0 mm/mmap.c:2650 __vm_munmap+0x18d/0x290 mm/mmap.c:2936 __do_sys_munmap mm/mmap.c:2961 [inline] __se_sys_munmap mm/mmap.c:2958 [inline] __x64_sys_munmap+0x5c/0x70 mm/mmap.c:2958 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 Memory state around the buggy address: ffff8880729a1480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880729a1500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff8880729a1580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff8880729a1600: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880729a1680: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================