netlink: 'syz-executor.0': attribute type 8 has an invalid length. ================================================================== BUG: KASAN: stack-out-of-bounds in __nla_validate_parse+0x13c/0x2c90 lib/nlattr.c:588 Write of size 32 at addr ffffc90001df6d00 by task syz-executor.0/3351 CPU: 0 PID: 3351 Comm: syz-executor.0 Not tainted 6.4.0-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x214/0x300 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:364 [inline] print_report+0x163/0x540 mm/kasan/report.c:475 kasan_report+0x175/0x1b0 mm/kasan/report.c:588 kasan_check_range+0x27e/0x290 mm/kasan/generic.c:187 __asan_memset+0x23/0x40 mm/kasan/shadow.c:84 __nla_validate_parse+0x13c/0x2c90 lib/nlattr.c:588 __nla_parse+0x40/0x50 lib/nlattr.c:700 nla_parse_nested include/net/netlink.h:1262 [inline] fl_set_key_cfm+0x1e3/0x440 net/sched/cls_flower.c:1708 fl_set_key+0x21de/0x6790 net/sched/cls_flower.c:1874 fl_tmplt_create+0x1fe/0x510 net/sched/cls_flower.c:2661 tc_chain_tmplt_add net/sched/cls_api.c:2959 [inline] tc_ctl_chain+0x130e/0x19d0 net/sched/cls_api.c:3068 rtnetlink_rcv_msg+0xbdc/0xe00 net/core/rtnetlink.c:6424 netlink_rcv_skb+0x1df/0x430 net/netlink/af_netlink.c:2549 netlink_unicast_kernel net/netlink/af_netlink.c:1339 [inline] netlink_unicast+0x79d/0x960 net/netlink/af_netlink.c:1365 netlink_sendmsg+0x93a/0xcf0 net/netlink/af_netlink.c:1914 sock_sendmsg_nosec net/socket.c:725 [inline] sock_sendmsg net/socket.c:748 [inline] ____sys_sendmsg+0x592/0x890 net/socket.c:2494 ___sys_sendmsg+0x27a/0x300 net/socket.c:2548 __sys_sendmsg net/socket.c:2577 [inline] __do_sys_sendmsg net/socket.c:2586 [inline] __se_sys_sendmsg+0x1b3/0x290 net/socket.c:2584 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f424516db29 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 00 00 90 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 b0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f4244cf00c8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00007f424528cf80 RCX: 00007f424516db29 RDX: 0000000000000000 RSI: 0000000020000280 RDI: 0000000000000003 RBP: 00007f42451b947a R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000006 R14: 00007f424528cf80 R15: 00007ffd0e008618 The buggy address belongs to stack of task syz-executor.0/3351 and is located at offset 32 in frame: fl_set_key_cfm+0x0/0x440 This frame has 1 object: [32, 56) 'nla_cfm_opt' The buggy address belongs to the virtual mapping at [ffffc90001df0000, ffffc90001df9000) created by: copy_process+0x5bc/0x3a00 kernel/fork.c:2335 The buggy address belongs to the physical page: page:ffffea0004119cc0 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x104673 memcg:ffff88810ead8c82 flags: 0x200000000000000(node=0|zone=2) page_type: 0xffffffff() raw: 0200000000000000 0000000000000000 dead000000000122 0000000000000000 raw: 0000000000000000 0000000000000000 00000001ffffffff ffff88810ead8c82 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x102dc2(GFP_HIGHUSER|__GFP_NOWARN|__GFP_ZERO), pid 3350, tgid 3350 (syz-executor.0), ts 65038340943, free_ts 64847026574 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x26e/0x290 mm/page_alloc.c:1570 prep_new_page mm/page_alloc.c:1577 [inline] get_page_from_freelist+0x2dbd/0x2f40 mm/page_alloc.c:3221 __alloc_pages+0x255/0x650 mm/page_alloc.c:4477 vm_area_alloc_pages mm/vmalloc.c:3059 [inline] __vmalloc_area_node mm/vmalloc.c:3135 [inline] __vmalloc_node_range+0x992/0x1460 mm/vmalloc.c:3316 alloc_thread_stack_node kernel/fork.c:309 [inline] dup_task_struct+0x67d/0xa80 kernel/fork.c:1118 copy_process+0x5bc/0x3a00 kernel/fork.c:2335 kernel_clone+0x21a/0x830 kernel/fork.c:2917 __do_sys_clone3 kernel/fork.c:3218 [inline] __se_sys_clone3+0x2cb/0x340 kernel/fork.c:3202 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1161 [inline] free_unref_page_prepare+0x800/0x920 mm/page_alloc.c:2348 free_unref_page_list+0x54b/0x7e0 mm/page_alloc.c:2489 release_pages+0x2015/0x2300 mm/swap.c:1042 tlb_batch_pages_flush mm/mmu_gather.c:97 [inline] tlb_flush_mmu_free mm/mmu_gather.c:292 [inline] tlb_flush_mmu+0x100/0x200 mm/mmu_gather.c:299 tlb_finish_mmu+0xd4/0x1f0 mm/mmu_gather.c:391 exit_mmap+0x3d3/0x900 mm/mmap.c:3211 __mmput+0xc9/0x360 kernel/fork.c:1353 exit_mm+0x131/0x200 kernel/exit.c:567 do_exit+0x91c/0x29c0 kernel/exit.c:861 do_group_exit+0x206/0x2c0 kernel/exit.c:1024 __do_sys_exit_group kernel/exit.c:1035 [inline] __se_sys_exit_group kernel/exit.c:1033 [inline] __x64_sys_exit_group+0x3f/0x40 kernel/exit.c:1033 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Memory state around the buggy address: ffffc90001df6c00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffffc90001df6c80: 00 00 00 00 00 00 00 00 00 00 00 00 f1 f1 f1 f1 >ffffc90001df6d00: 00 00 00 f3 f3 f3 f3 f3 00 00 00 00 00 00 00 00 ^ ffffc90001df6d80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffffc90001df6e00: 00 00 00 00 f1 f1 f1 f1 00 00 f3 f3 00 00 00 00 ==================================================================