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

CPU: 0 UID: 0 PID: 11044 Comm: syz.0.6396 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+0x8ef/0xa80
 netlink_sendmsg+0x7f0/0xb20
 sock_sendmsg_nosec+0x14e/0x190
 ____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:0x7fd29359f559
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:00007fd2944a1028 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 00007fd293826180 RCX: 00007fd29359f559
RDX: 0000000000000000 RSI: 0000200000001b00 RDI: 0000000000000008
RBP: 00007fd293636b20 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fd293826218 R14: 00007fd293826180 R15: 00007ffd07116978
 </TASK>

Allocated by task 31907:
 kasan_save_track+0x3e/0x80
 __kasan_kmalloc+0x93/0xb0
 __kmalloc_node_noprof+0x4b4/0x720
 qdisc_alloc+0x92/0x9d0
 qdisc_create+0x151/0x1450
 tc_modify_qdisc+0x18cc/0x2390
 rtnetlink_rcv_msg+0x7b9/0xc00
 netlink_rcv_skb+0x226/0x4a0
 netlink_unicast+0x8ef/0xa80
 netlink_sendmsg+0x7f0/0xb20
 sock_sendmsg_nosec+0x14e/0x190
 ____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 11045:
 kasan_save_track+0x3e/0x80
 kasan_save_free_info+0x40/0x50
 __kasan_slab_free+0x5c/0x80
 kfree+0x1c5/0x650
 rcu_core+0x92e/0x1230
 handle_softirqs+0x265/0x8d0
 do_softirq+0x77/0xd0
 __local_bh_enable_ip+0x100/0x140
 flush_thread+0x35/0xb0
 begin_new_exec+0x1641/0x2350
 load_elf_binary+0xa0c/0x28d0
 bprm_execve+0x930/0x1590
 do_execveat_common+0x99f/0xbd0
 __x64_sys_execve+0x97/0xc0
 do_syscall_64+0x166/0x520
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

Last potentially related work creation:
 kasan_save_stack+0x3e/0x60
 kasan_record_aux_stack+0xbd/0xd0
 call_rcu+0x86/0x300
 qdisc_graft+0xcdd/0x1810
 tc_modify_qdisc+0x1968/0x2390
 rtnetlink_rcv_msg+0x7b9/0xc00
 netlink_rcv_skb+0x226/0x4a0
 netlink_unicast+0x8ef/0xa80
 netlink_sendmsg+0x7f0/0xb20
 sock_sendmsg_nosec+0x14e/0x190
 ____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 ffff8881b797f800
 which belongs to the cache kmalloc-1k of size 1024
The buggy address is located 712 bytes inside of
 freed 1024-byte region [ffff8881b797f800, ffff8881b797fc00)

The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff8881b797b000 pfn:0x1b7978
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 ffffea0006472010 ffffea0006e94610
raw: ffff8881b797b000 000000000010000e 00000000f5000000 0000000000000000
head: 057ff00000000240 ffff888100041dc0 ffffea0006472010 ffffea0006e94610
head: ffff8881b797b000 000000000010000e 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 0xd2820(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 13077, tgid 13077 (kworker/u8:5), ts 581947528993
 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+0x476/0x710
 ___neigh_create+0x6da/0x21f0
 ip6_finish_output2+0xe06/0x1460
 ip6_output+0x337/0x540
 ndisc_send_skb+0xcb2/0x1650
 ndisc_send_ns+0xd7/0x160
 addrconf_dad_work+0xa8d/0x15c0
 process_scheduled_works+0xc3d/0x1630
 worker_thread+0xa47/0xfb0
 kthread+0x38b/0x480
page last free pid 30799 tgid 30779 ts 581439020851 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
 __kmalloc_cache_noprof+0x29a/0x600
 ____ip_mc_inc_group+0x518/0xdb0
 ip_mc_up+0x115/0x2e0
 inetdev_event+0xe8a/0x1610
 notifier_call_chain+0x1a5/0x3d0
 __dev_notify_flags+0x31e/0x510
 netif_change_flags+0xde/0x1b0
 do_setlink+0xdd6/0x47a0
 rtnl_newlink+0x147c/0x1c30
 rtnetlink_rcv_msg+0x802/0xc00
 netlink_rcv_skb+0x226/0x4a0

Memory state around the buggy address:
 ffff8881b797f980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff8881b797fa00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff8881b797fa80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                                              ^
 ffff8881b797fb00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff8881b797fb80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
