netlink: 68 bytes leftover after parsing attributes in process `syz.5.3512'. ================================================================== 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+0x14c4/0x1b8c net/xfrm/xfrm_policy.c:3521 Read of size 1 at addr ffff0000fa49d99d by task syz.5.3512/16473 CPU: 0 PID: 16473 Comm: syz.5.3512 Not tainted 6.1.142-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025 Call trace: dump_backtrace+0x1c8/0x1f4 arch/arm64/kernel/stacktrace.c:158 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:165 __dump_stack+0x30/0x40 lib/dump_stack.c:88 dump_stack_lvl+0xf8/0x160 lib/dump_stack.c:106 print_address_description+0x88/0x220 mm/kasan/report.c:316 print_report+0x50/0x68 mm/kasan/report.c:427 kasan_report+0xa8/0x100 mm/kasan/report.c:531 __asan_report_load1_noabort+0x2c/0x38 mm/kasan/report_generic.c:348 decode_session6 net/xfrm/xfrm_policy.c:3415 [inline] __xfrm_decode_session+0x14c4/0x1b8c net/xfrm/xfrm_policy.c:3521 xfrm_decode_session_reverse include/net/xfrm.h:1183 [inline] icmpv6_route_lookup+0x310/0x470 net/ipv6/icmp.c:394 icmp6_send+0xb98/0x13e4 net/ipv6/icmp.c:603 __icmpv6_send include/linux/icmpv6.h:28 [inline] icmpv6_send include/linux/icmpv6.h:49 [inline] ip6_link_failure+0x44/0x4a8 net/ipv6/route.c:2827 dst_link_failure include/net/dst.h:423 [inline] ip6_tnl_xmit+0xed8/0x2448 net/ipv6/ip6_tunnel.c:1284 ipxip6_tnl_xmit net/ipv6/ip6_tunnel.c:1400 [inline] ip6_tnl_start_xmit+0xb88/0x1088 net/ipv6/ip6_tunnel.c:1449 __netdev_start_xmit include/linux/netdevice.h:4896 [inline] netdev_start_xmit include/linux/netdevice.h:4910 [inline] xmit_one net/core/dev.c:3658 [inline] dev_hard_start_xmit+0x244/0x8e0 net/core/dev.c:3674 sch_direct_xmit+0x204/0x480 net/sched/sch_generic.c:342 qdisc_restart net/sched/sch_generic.c:407 [inline] __qdisc_run+0x8c0/0x1368 net/sched/sch_generic.c:415 __dev_xmit_skb net/core/dev.c:3958 [inline] __dev_queue_xmit+0xc18/0x309c net/core/dev.c:4300 dev_queue_xmit include/linux/netdevice.h:3051 [inline] neigh_connected_output+0x358/0x3e8 net/core/neighbour.c:1592 neigh_output include/net/neighbour.h:544 [inline] ip6_finish_output2+0xd60/0x1844 net/ipv6/ip6_output.c:138 ip6_fragment+0x1558/0x247c net/ipv6/ip6_output.c:1021 __ip6_finish_output net/ipv6/ip6_output.c:203 [inline] ip6_finish_output+0x444/0x930 net/ipv6/ip6_output.c:216 NF_HOOK_COND include/linux/netfilter.h:291 [inline] ip6_output+0x274/0x500 net/ipv6/ip6_output.c:237 dst_output include/net/dst.h:453 [inline] NF_HOOK include/linux/netfilter.h:302 [inline] ip6_xmit+0x111c/0x19c4 net/ipv6/ip6_output.c:357 sctp_v6_xmit+0x83c/0xf70 net/sctp/ipv6.c:250 sctp_packet_transmit+0x1df4/0x22e4 net/sctp/output.c:653 sctp_packet_singleton+0x1d0/0x2bc net/sctp/outqueue.c:783 sctp_outq_flush_ctrl net/sctp/outqueue.c:914 [inline] sctp_outq_flush+0x404/0x27bc net/sctp/outqueue.c:1212 sctp_outq_uncork+0x84/0xc0 net/sctp/outqueue.c:764 sctp_cmd_interpreter net/sctp/sm_sideeffect.c:-1 [inline] sctp_side_effects net/sctp/sm_sideeffect.c:1199 [inline] sctp_do_sm+0x427c/0x4894 net/sctp/sm_sideeffect.c:1170 sctp_primitive_ASSOCIATE+0x98/0xc8 net/sctp/primitive.c:73 sctp_sendmsg_to_asoc+0xfc8/0x1344 net/sctp/socket.c:1840 sctp_sendmsg+0x14dc/0x20cc net/sctp/socket.c:2030 inet_sendmsg+0x154/0x284 net/ipv4/af_inet.c:841 sock_sendmsg_nosec net/socket.c:718 [inline] __sock_sendmsg net/socket.c:730 [inline] __sys_sendto+0x304/0x3fc net/socket.c:2153 __do_sys_sendto net/socket.c:2165 [inline] __se_sys_sendto net/socket.c:2161 [inline] __arm64_sys_sendto+0xd8/0xf8 net/socket.c:2161 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2bc arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:140 do_el0_svc+0x58/0x13c arch/arm64/kernel/syscall.c:204 el0_svc+0x58/0x138 arch/arm64/kernel/entry-common.c:637 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585 Allocated by task 16473: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4c/0x80 mm/kasan/common.c:52 kasan_save_alloc_info+0x28/0x34 mm/kasan/generic.c:505 ____kasan_kmalloc mm/kasan/common.c:374 [inline] __kasan_kmalloc+0xa0/0xb8 mm/kasan/common.c:383 kasan_kmalloc include/linux/kasan.h:211 [inline] __do_kmalloc_node mm/slab_common.c:936 [inline] __kmalloc_node_track_caller+0xe0/0x16c mm/slab_common.c:956 kmalloc_reserve net/core/skbuff.c:446 [inline] __alloc_skb+0x264/0x718 net/core/skbuff.c:515 alloc_skb include/linux/skbuff.h:1271 [inline] alloc_skb_with_frags+0xa0/0x54c net/core/skbuff.c:6162 sock_alloc_send_pskb+0x758/0x874 net/core/sock.c:2750 sock_alloc_send_skb include/net/sock.h:1926 [inline] __ip6_append_data+0x20d4/0x3130 net/ipv6/ip6_output.c:1708 ip6_append_data+0x198/0x38c net/ipv6/ip6_output.c:1886 icmp6_send+0xd8c/0x13e4 net/ipv6/icmp.c:624 __icmpv6_send include/linux/icmpv6.h:28 [inline] icmpv6_send include/linux/icmpv6.h:49 [inline] ip6_link_failure+0x44/0x4a8 net/ipv6/route.c:2827 dst_link_failure include/net/dst.h:423 [inline] ip6_tnl_xmit+0xed8/0x2448 net/ipv6/ip6_tunnel.c:1284 ipxip6_tnl_xmit net/ipv6/ip6_tunnel.c:1400 [inline] ip6_tnl_start_xmit+0xb88/0x1088 net/ipv6/ip6_tunnel.c:1449 __netdev_start_xmit include/linux/netdevice.h:4896 [inline] netdev_start_xmit include/linux/netdevice.h:4910 [inline] xmit_one net/core/dev.c:3658 [inline] dev_hard_start_xmit+0x244/0x8e0 net/core/dev.c:3674 sch_direct_xmit+0x204/0x480 net/sched/sch_generic.c:342 qdisc_restart net/sched/sch_generic.c:407 [inline] __qdisc_run+0x8c0/0x1368 net/sched/sch_generic.c:415 __dev_xmit_skb net/core/dev.c:3958 [inline] __dev_queue_xmit+0xc18/0x309c net/core/dev.c:4300 dev_queue_xmit include/linux/netdevice.h:3051 [inline] neigh_connected_output+0x358/0x3e8 net/core/neighbour.c:1592 neigh_output include/net/neighbour.h:544 [inline] ip6_finish_output2+0xd60/0x1844 net/ipv6/ip6_output.c:138 ip6_fragment+0x1558/0x247c net/ipv6/ip6_output.c:1021 __ip6_finish_output net/ipv6/ip6_output.c:203 [inline] ip6_finish_output+0x444/0x930 net/ipv6/ip6_output.c:216 NF_HOOK_COND include/linux/netfilter.h:291 [inline] ip6_output+0x274/0x500 net/ipv6/ip6_output.c:237 dst_output include/net/dst.h:453 [inline] NF_HOOK include/linux/netfilter.h:302 [inline] ip6_xmit+0x111c/0x19c4 net/ipv6/ip6_output.c:357 sctp_v6_xmit+0x83c/0xf70 net/sctp/ipv6.c:250 sctp_packet_transmit+0x1df4/0x22e4 net/sctp/output.c:653 sctp_packet_singleton+0x1d0/0x2bc net/sctp/outqueue.c:783 sctp_outq_flush_ctrl net/sctp/outqueue.c:914 [inline] sctp_outq_flush+0x404/0x27bc net/sctp/outqueue.c:1212 sctp_outq_uncork+0x84/0xc0 net/sctp/outqueue.c:764 sctp_cmd_interpreter net/sctp/sm_sideeffect.c:-1 [inline] sctp_side_effects net/sctp/sm_sideeffect.c:1199 [inline] sctp_do_sm+0x427c/0x4894 net/sctp/sm_sideeffect.c:1170 sctp_primitive_ASSOCIATE+0x98/0xc8 net/sctp/primitive.c:73 sctp_sendmsg_to_asoc+0xfc8/0x1344 net/sctp/socket.c:1840 sctp_sendmsg+0x14dc/0x20cc net/sctp/socket.c:2030 inet_sendmsg+0x154/0x284 net/ipv4/af_inet.c:841 sock_sendmsg_nosec net/socket.c:718 [inline] __sock_sendmsg net/socket.c:730 [inline] __sys_sendto+0x304/0x3fc net/socket.c:2153 __do_sys_sendto net/socket.c:2165 [inline] __se_sys_sendto net/socket.c:2161 [inline] __arm64_sys_sendto+0xd8/0xf8 net/socket.c:2161 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2bc arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:140 do_el0_svc+0x58/0x13c arch/arm64/kernel/syscall.c:204 el0_svc+0x58/0x138 arch/arm64/kernel/entry-common.c:637 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585 Last potentially related work creation: kasan_save_stack+0x40/0x70 mm/kasan/common.c:45 __kasan_record_aux_stack+0xc0/0xdc mm/kasan/generic.c:486 kasan_record_aux_stack_noalloc+0x14/0x20 mm/kasan/generic.c:496 insert_work+0x64/0x37c kernel/workqueue.c:1361 __queue_work+0xcbc/0x123c kernel/workqueue.c:1520 queue_work_on+0xc0/0x16c kernel/workqueue.c:1548 queue_work include/linux/workqueue.h:512 [inline] io_ring_ctx_wait_and_kill+0x254/0x2b0 io_uring/io_uring.c:2965 io_uring_release+0x44/0x58 io_uring/io_uring.c:2973 __fput+0x1bc/0x7c0 fs/file_table.c:320 ____fput+0x20/0x30 fs/file_table.c:348 task_work_run+0x1ec/0x270 kernel/task_work.c:203 exit_task_work include/linux/task_work.h:39 [inline] do_exit+0x54c/0x19a8 kernel/exit.c:880 do_group_exit+0x194/0x22c kernel/exit.c:1022 get_signal+0x11d0/0x1310 kernel/signal.c:2871 do_signal arch/arm64/kernel/signal.c:1081 [inline] do_notify_resume+0x340/0x2b0c arch/arm64/kernel/signal.c:1134 prepare_exit_to_user_mode arch/arm64/kernel/entry-common.c:137 [inline] exit_to_user_mode arch/arm64/kernel/entry-common.c:142 [inline] el0_svc+0x98/0x138 arch/arm64/kernel/entry-common.c:638 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585 Second to last potentially related work creation: kasan_save_stack+0x40/0x70 mm/kasan/common.c:45 __kasan_record_aux_stack+0xc0/0xdc mm/kasan/generic.c:486 kasan_record_aux_stack_noalloc+0x14/0x20 mm/kasan/generic.c:496 call_rcu+0xfc/0x948 kernel/rcu/tree.c:2845 netlink_release+0x1260/0x1710 net/netlink/af_netlink.c:800 __sock_release net/socket.c:654 [inline] sock_close+0xb4/0x1f8 net/socket.c:1400 __fput+0x1bc/0x7c0 fs/file_table.c:320 ____fput+0x20/0x30 fs/file_table.c:348 task_work_run+0x1ec/0x270 kernel/task_work.c:203 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline] do_notify_resume+0x1f70/0x2b0c arch/arm64/kernel/signal.c:1137 prepare_exit_to_user_mode arch/arm64/kernel/entry-common.c:137 [inline] exit_to_user_mode arch/arm64/kernel/entry-common.c:142 [inline] el0_svc+0x98/0x138 arch/arm64/kernel/entry-common.c:638 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585 The buggy address belongs to the object at ffff0000fa49d000 which belongs to the cache kmalloc-2k of size 2048 The buggy address is located 413 bytes to the right of 2048-byte region [ffff0000fa49d000, ffff0000fa49d800) The buggy address belongs to the physical page: page:0000000051e4eba1 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x13a498 head:0000000051e4eba1 order:3 compound_mapcount:0 compound_pincount:0 flags: 0x5ffc00000010200(slab|head|node=0|zone=2|lastcpupid=0x7ff) raw: 05ffc00000010200 dead000000000100 dead000000000122 ffff0000c0002900 raw: 0000000000000000 0000000080080008 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff0000fa49d880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff0000fa49d900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff0000fa49d980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff0000fa49da00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff0000fa49da80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================