netlink: 'syz.3.578': attribute type 4 has an invalid length.
==================================================================
BUG: KASAN: slab-use-after-free in mini_qdisc_pair_swap+0x174/0x190
Write of size 8 at addr ffff88816a42dac8 by task syz.3.578/8694

CPU: 0 UID: 0 PID: 8694 Comm: syz.3.578 Not tainted syzkaller #0 PREEMPT(full) 
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.2-debian-1.16.2-1 04/01/2014
Call Trace:
 <TASK>
 dump_stack_lvl+0xe8/0x150
 print_address_description+0x55/0x1e0
 print_report+0x58/0x70
 kasan_report+0x117/0x150
 mini_qdisc_pair_swap+0x174/0x190
 tcf_chain_tp_insert_unique+0x76a/0x970
 tc_new_tfilter+0x14bf/0x1900
 rtnetlink_rcv_msg+0x802/0xc00
 netlink_rcv_skb+0x226/0x4a0
 netlink_unicast+0x7bd/0x940
 netlink_sendmsg+0x813/0xb40
 sock_sendmsg_nosec+0x13a/0x180
 ____sys_sendmsg+0x54e/0x850
 ___sys_sendmsg+0x2a5/0x360
 __x64_sys_sendmsg+0x1b1/0x290
 do_syscall_64+0x166/0x520
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f52e4b9e1d9
Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 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 e8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f52e5ac9028 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 00007f52e4e26090 RCX: 00007f52e4b9e1d9
RDX: 0000000000000000 RSI: 0000200000004b80 RDI: 000000000000000d
RBP: 00007f52e4c35888 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f52e4e26128 R14: 00007f52e4e26090 R15: 00007fff987527c8
 </TASK>

Allocated by task 6648:
 kasan_save_track+0x3e/0x80
 __kasan_kmalloc+0x93/0xb0
 __kmalloc_node_noprof+0x4b9/0x720
 qdisc_alloc+0x92/0x9d0
 qdisc_create+0x12c/0xf00
 tc_modify_qdisc+0x18cc/0x2390
 rtnetlink_rcv_msg+0x7b9/0xc00
 netlink_rcv_skb+0x226/0x4a0
 netlink_unicast+0x7bd/0x940
 netlink_sendmsg+0x813/0xb40
 sock_sendmsg_nosec+0x13a/0x180
 ____sys_sendmsg+0x54e/0x850
 ___sys_sendmsg+0x2a5/0x360
 __x64_sys_sendmsg+0x1b1/0x290
 do_syscall_64+0x166/0x520
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

Freed by task 8621:
 kasan_save_track+0x3e/0x80
 kasan_save_free_info+0x40/0x50
 __kasan_slab_free+0x5c/0x80
 kfree+0x1c5/0x650
 rcu_core+0x926/0x1260
 handle_softirqs+0x226/0x860
 __irq_exit_rcu+0xcb/0x220
 irq_exit_rcu+0x9/0x30
 sysvec_apic_timer_interrupt+0xa6/0xc0
 asm_sysvec_apic_timer_interrupt+0x1a/0x20

Last potentially related work creation:
 kasan_save_stack+0x3e/0x60
 kasan_record_aux_stack+0xbd/0xd0
 call_rcu+0xee/0x8b0
 qdisc_graft+0xcdd/0x1810
 tc_modify_qdisc+0x1968/0x2390
 rtnetlink_rcv_msg+0x7b9/0xc00
 netlink_rcv_skb+0x226/0x4a0
 netlink_unicast+0x7bd/0x940
 netlink_sendmsg+0x813/0xb40
 sock_sendmsg_nosec+0x13a/0x180
 ____sys_sendmsg+0x54e/0x850
 ___sys_sendmsg+0x2a5/0x360
 __x64_sys_sendmsg+0x1b1/0x290
 do_syscall_64+0x166/0x520
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

The buggy address belongs to the object at ffff88816a42d800
 which belongs to the cache kmalloc-1k of size 1024
The buggy address is located 712 bytes inside of
 freed 1024-byte region [ffff88816a42d800, ffff88816a42dc00)

The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff88816a42e000 pfn:0x16a428
head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
flags: 0x57ff00000000240(workingset|head|node=1|zone=2|lastcpupid=0x7ff)
page_type: f5(slab)
raw: 057ff00000000240 ffff888100041dc0 ffffea0005d21810 ffffea0005d2e210
raw: ffff88816a42e000 000000000010000d 00000000f5000000 0000000000000000
head: 057ff00000000240 ffff888100041dc0 ffffea0005d21810 ffffea0005d2e210
head: ffff88816a42e000 000000000010000d 00000000f5000000 0000000000000000
head: 057ff00000000003 fffffffffffffe01 00000000ffffffff 00000000ffffffff
head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000008
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 5679, tgid 5679 (kworker/u9:4), ts 62300915674
 post_alloc_hook+0x1f9/0x250
 get_page_from_freelist+0x2209/0x2280
 __alloc_frozen_pages_noprof+0x217/0x5a0
 allocate_slab+0x7d/0x620
 refill_objects+0x2d5/0x350
 __pcs_replace_empty_main+0x2c8/0x6c0
 __kmalloc_noprof+0x47b/0x720
 load_elf_phdrs+0x13e/0x240
 load_elf_binary+0x9e1/0x28d0
 bprm_execve+0x930/0x1590
 kernel_execve+0x8c3/0x9c0
 call_usermodehelper_exec_async+0x20f/0x360
 ret_from_fork+0x514/0xb70
 ret_from_fork_asm+0x1a/0x30
page last free pid 5537 tgid 5537 ts 44000531259 stack trace:
 __free_frozen_pages+0xc93/0xd90
 __slab_free+0x274/0x2c0
 qlist_free_all+0x99/0x100
 kasan_quarantine_reduce+0x148/0x160
 __kasan_slab_alloc+0x22/0x80
 kmem_cache_alloc_lru_noprof+0x2a3/0x5f0
 shmem_alloc_inode+0x28/0x40
 alloc_inode+0x6a/0x1b0
 new_inode+0x1f/0x170
 shmem_get_inode+0x3a4/0xfe0
 shmem_mknod+0x17d/0x340
 lookup_open+0xc0d/0x1a40
 path_openat+0x677/0x1d60
 do_file_open+0x23e/0x4a0
 do_sys_openat2+0x115/0x200
 __x64_sys_openat+0x138/0x170

Memory state around the buggy address:
 ffff88816a42d980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff88816a42da00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff88816a42da80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                                              ^
 ffff88816a42db00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff88816a42db80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
