netlink: 'syz-executor428': attribute type 2 has an invalid length. netlink: 'syz-executor428': attribute type 2 has an invalid length. ================================================================== BUG: KASAN: slab-out-of-bounds in tcf_exts_destroy+0xb3/0xd0 net/sched/cls_api.c:2897 Read of size 8 at addr ffff8880a9816290 by task syz-executor428/8706 CPU: 0 PID: 8706 Comm: syz-executor428 Not tainted 5.4.0-rc1+ #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x172/0x1f0 lib/dump_stack.c:113 print_address_description.constprop.0.cold+0xd4/0x30b mm/kasan/report.c:374 __kasan_report.cold+0x1b/0x41 mm/kasan/report.c:506 kasan_report+0x12/0x20 mm/kasan/common.c:634 __asan_report_load8_noabort+0x14/0x20 mm/kasan/generic_report.c:132 tcf_exts_destroy+0xb3/0xd0 net/sched/cls_api.c:2897 tcindex_free_perfect_hash.isra.0+0xb3/0x150 net/sched/cls_tcindex.c:273 tcindex_set_parms+0x1107/0x1e50 net/sched/cls_tcindex.c:484 tcindex_change+0x230/0x320 net/sched/cls_tcindex.c:519 tc_new_tfilter+0xa4b/0x1c70 net/sched/cls_api.c:2019 rtnetlink_rcv_msg+0x838/0xb00 net/core/rtnetlink.c:5214 netlink_rcv_skb+0x177/0x450 net/netlink/af_netlink.c:2477 rtnetlink_rcv+0x1d/0x30 net/core/rtnetlink.c:5241 netlink_unicast_kernel net/netlink/af_netlink.c:1302 [inline] netlink_unicast+0x531/0x710 net/netlink/af_netlink.c:1328 netlink_sendmsg+0x8a5/0xd60 net/netlink/af_netlink.c:1917 sock_sendmsg_nosec net/socket.c:637 [inline] sock_sendmsg+0xd7/0x130 net/socket.c:657 ___sys_sendmsg+0x3e2/0x920 net/socket.c:2311 __sys_sendmmsg+0x2db/0x4d0 net/socket.c:2406 __compat_sys_sendmmsg net/compat.c:656 [inline] __do_compat_sys_sendmmsg net/compat.c:663 [inline] __se_compat_sys_sendmmsg net/compat.c:660 [inline] __ia32_compat_sys_sendmmsg+0x9f/0x100 net/compat.c:660 do_syscall_32_irqs_on arch/x86/entry/common.c:333 [inline] do_fast_syscall_32+0x27b/0xdb3 arch/x86/entry/common.c:404 entry_SYSENTER_compat+0x70/0x7f arch/x86/entry/entry_64_compat.S:139 RIP: 0023:0xf7f58a29 Code: b8 80 96 98 00 eb cc 8b 04 24 c3 8b 1c 24 c3 8b 34 24 c3 8b 3c 24 c3 90 90 90 90 90 90 90 90 90 90 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 90 90 90 90 eb 0d 90 90 90 90 90 90 90 90 90 90 90 90 RSP: 002b:00000000fff2eacc EFLAGS: 00000292 ORIG_RAX: 0000000000000159 RAX: ffffffffffffffda RBX: 0000000000000008 RCX: 0000000020000140 RDX: 0000000000000332 RSI: 0000000000000000 RDI: 00000000ffffffff RBP: 0000000020000140 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 Allocated by task 8706: save_stack+0x23/0x90 mm/kasan/common.c:69 set_track mm/kasan/common.c:77 [inline] __kasan_kmalloc mm/kasan/common.c:510 [inline] __kasan_kmalloc.constprop.0+0xcf/0xe0 mm/kasan/common.c:483 kasan_kmalloc+0x9/0x10 mm/kasan/common.c:524 __do_kmalloc mm/slab.c:3655 [inline] __kmalloc+0x163/0x770 mm/slab.c:3664 kmalloc_array include/linux/slab.h:614 [inline] kcalloc include/linux/slab.h:625 [inline] tcindex_alloc_perfect_hash+0x5a/0x320 net/sched/cls_tcindex.c:281 tcindex_set_parms+0x454/0x1e50 net/sched/cls_tcindex.c:339 tcindex_change+0x230/0x320 net/sched/cls_tcindex.c:519 tc_new_tfilter+0xa4b/0x1c70 net/sched/cls_api.c:2019 rtnetlink_rcv_msg+0x838/0xb00 net/core/rtnetlink.c:5214 netlink_rcv_skb+0x177/0x450 net/netlink/af_netlink.c:2477 rtnetlink_rcv+0x1d/0x30 net/core/rtnetlink.c:5241 netlink_unicast_kernel net/netlink/af_netlink.c:1302 [inline] netlink_unicast+0x531/0x710 net/netlink/af_netlink.c:1328 netlink_sendmsg+0x8a5/0xd60 net/netlink/af_netlink.c:1917 sock_sendmsg_nosec net/socket.c:637 [inline] sock_sendmsg+0xd7/0x130 net/socket.c:657 ___sys_sendmsg+0x3e2/0x920 net/socket.c:2311 __sys_sendmmsg+0x2db/0x4d0 net/socket.c:2406 __compat_sys_sendmmsg net/compat.c:656 [inline] __do_compat_sys_sendmmsg net/compat.c:663 [inline] __se_compat_sys_sendmmsg net/compat.c:660 [inline] __ia32_compat_sys_sendmmsg+0x9f/0x100 net/compat.c:660 do_syscall_32_irqs_on arch/x86/entry/common.c:333 [inline] do_fast_syscall_32+0x27b/0xdb3 arch/x86/entry/common.c:404 entry_SYSENTER_compat+0x70/0x7f arch/x86/entry/entry_64_compat.S:139 Freed by task 1: save_stack+0x23/0x90 mm/kasan/common.c:69 set_track mm/kasan/common.c:77 [inline] kasan_set_free_info mm/kasan/common.c:332 [inline] __kasan_slab_free+0x102/0x150 mm/kasan/common.c:471 kasan_slab_free+0xe/0x10 mm/kasan/common.c:480 __cache_free mm/slab.c:3425 [inline] kfree+0x10a/0x2c0 mm/slab.c:3756 free_alien_cache.part.0+0x3f/0x80 mm/slab.c:680 free_alien_cache mm/slab.c:677 [inline] setup_kmem_cache_node+0xe6/0x410 mm/slab.c:933 cpuup_prepare mm/slab.c:1027 [inline] slab_prepare_cpu+0x95/0xd0 mm/slab.c:1043 cpuhp_invoke_callback+0x21a/0x1c60 kernel/cpu.c:172 cpuhp_up_callbacks kernel/cpu.c:600 [inline] _cpu_up+0x289/0x550 kernel/cpu.c:1160 do_cpu_up+0x171/0x190 kernel/cpu.c:1195 cpu_up+0x1b/0x20 kernel/cpu.c:1203 smp_init+0x248/0x261 kernel/smp.c:593 kernel_init_freeable+0x339/0x5be init/main.c:1184 kernel_init+0x12/0x1c5 init/main.c:1109 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:352 The buggy address belongs to the object at ffff8880a9816200 which belongs to the cache kmalloc-192 of size 192 The buggy address is located 144 bytes inside of 192-byte region [ffff8880a9816200, ffff8880a98162c0) The buggy address belongs to the page: page:ffffea0002a60580 refcount:1 mapcount:0 mapping:ffff8880aa400000 index:0x0 flags: 0x1fffc0000000200(slab) raw: 01fffc0000000200 ffffea0002537988 ffffea00028588c8 ffff8880aa400000 raw: 0000000000000000 ffff8880a9816000 0000000100000010 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880a9816180: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff8880a9816200: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff8880a9816280: 00 fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff8880a9816300: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8880a9816380: 00 fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================