==================================================================
BUG: KASAN: slab-use-after-free in mini_qdisc_pair_swap+0x174/0x190
Write of size 8 at addr ffff88810eaf62c8 by task syz.1.6338/21638

CPU: 0 UID: 0 PID: 21638 Comm: syz.1.6338 Tainted: G             L      syzkaller #0 PREEMPT(full) 
Tainted: [L]=SOFTLOCKUP
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+0x13d1/0x1810
 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:0x7f115e19e159
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:00007f115f093028 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 00007f115e426090 RCX: 00007f115e19e159
RDX: 0000000000000000 RSI: 0000200000001300 RDI: 0000000000000003
RBP: 00007f115e23506b R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f115e426128 R14: 00007f115e426090 R15: 00007ffdd5b2de88
 </TASK>

Allocated by task 21160:
 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 15:
 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
 run_ksoftirqd+0x36/0x60
 smpboot_thread_fn+0x565/0xa70
 kthread+0x38b/0x480
 ret_from_fork+0x514/0xb70
 ret_from_fork_asm+0x1a/0x30

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 ffff88810eaf6000
 which belongs to the cache kmalloc-1k of size 1024
The buggy address is located 712 bytes inside of
 freed 1024-byte region [ffff88810eaf6000, ffff88810eaf6400)

The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff88810eaf5000 pfn:0x10eaf0
head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
flags: 0x17ff00000000240(workingset|head|node=0|zone=2|lastcpupid=0x7ff)
page_type: f5(slab)
raw: 017ff00000000240 ffff888100041dc0 ffffea0000773210 ffffea00044dda10
raw: ffff88810eaf5000 000000000010000c 00000000f5000000 0000000000000000
head: 017ff00000000240 ffff888100041dc0 ffffea0000773210 ffffea00044dda10
head: ffff88810eaf5000 000000000010000c 00000000f5000000 0000000000000000
head: 017ff00000000003 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 0xd2820(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 9, tgid 9 (kworker/0:0), ts 65210347671
 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
 ___neigh_create+0x6d2/0x22b0
 ip6_finish_output2+0xe0f/0x1460
 ip6_output+0x337/0x540
 NF_HOOK+0x177/0x4f0
 mld_sendpack+0x890/0xe10
 mld_ifc_work+0x842/0xd60
 process_scheduled_works+0xc3d/0x1630
 worker_thread+0xa47/0xfb0
 kthread+0x38b/0x480
page last free pid 5340 tgid 5340 ts 63652447461 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_node_noprof+0x354/0x610
 __alloc_skb+0x1db/0x7a0
 netlink_sendmsg+0x5d4/0xb40
 sock_sendmsg_nosec+0x13a/0x180
 __sys_sendto+0x408/0x5a0
 __x64_sys_sendto+0xde/0x100
 do_syscall_64+0x166/0x520
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

Memory state around the buggy address:
 ffff88810eaf6180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff88810eaf6200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff88810eaf6280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                                              ^
 ffff88810eaf6300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff88810eaf6380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
