==================================================================
BUG: KASAN: double-free in rcu_free_sheaf+0x31/0x200
Free of addr ffff88816f453200 by task kworker/u10:24/15442

CPU: 1 UID: 0 PID: 15442 Comm: kworker/u10:24 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
Workqueue: events_unbound nsim_dev_trap_report_work
Call Trace:
 <IRQ>
 dump_stack_lvl+0xe8/0x150
 print_address_description+0x55/0x1e0
 print_report+0x58/0x70
 kasan_report_invalid_free+0xea/0x110
 __kasan_slab_pre_free+0x104/0x120
 __rcu_free_sheaf_prepare+0x10a/0x2a0
 rcu_free_sheaf+0x31/0x200
 rcu_core+0x926/0x1260
 handle_softirqs+0x226/0x860
 do_softirq+0x77/0xd0
 </IRQ>
 <TASK>
 __local_bh_enable_ip+0x100/0x140
 __alloc_skb+0x1b1/0x7a0
 nsim_dev_trap_report_work+0x25f/0xb40
 process_scheduled_works+0xc3d/0x1630
 worker_thread+0xa47/0xfb0
 kthread+0x38b/0x480
 ret_from_fork+0x514/0xb70
 ret_from_fork_asm+0x1a/0x30
 </TASK>

Allocated by task 12:
 kasan_save_track+0x3e/0x80
 __kasan_kmalloc+0x93/0xb0
 __kmalloc_cache_noprof+0x321/0x600
 hwsim_update_pib+0x88/0x450
 hwsim_set_promiscuous_mode+0x196/0x2e0
 drv_set_promiscuous_mode+0x159/0x2e0
 drv_start+0x4ea/0x1010
 mac802154_scan_worker+0xab8/0xfd0
 process_scheduled_works+0xc3d/0x1630
 worker_thread+0xa47/0xfb0
 kthread+0x38b/0x480
 ret_from_fork+0x514/0xb70
 ret_from_fork_asm+0x1a/0x30

Freed by task 31:
 kasan_save_track+0x3e/0x80
 kasan_save_free_info+0x40/0x50
 __kasan_slab_free+0x5c/0x80
 kmem_cache_free_bulk+0x5ba/0x10d0
 kvfree_rcu_bulk+0xc6/0x190
 kfree_rcu_monitor+0x21a/0x2b0
 process_scheduled_works+0xc3d/0x1630
 worker_thread+0xa47/0xfb0
 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
 kvfree_call_rcu+0x102/0x430
 hwsim_update_pib+0x2d2/0x450
 hwsim_hw_channel+0x178/0x2b0
 drv_set_channel+0x103/0x280
 mac802154_scan_cleanup_locked+0x116/0x280
 mac802154_abort_scan_locked+0xa3/0xe0
 mac802154_slave_close+0xc9/0x2e0
 __dev_close_many+0x366/0x6e0
 netif_close_many+0x249/0x660
 unregister_netdevice_many_notify+0xb76/0x2140
 unregister_netdevice_queue+0x2f5/0x340
 ieee802154_remove_interfaces+0x15c/0x1a0
 ieee802154_unregister_hw+0x62/0xe0
 hwsim_del+0x49c/0x500
 hwsim_del_radio_nl+0x110/0x150
 genl_family_rcv_msg_doit+0x233/0x340
 genl_rcv_msg+0x614/0x7a0
 netlink_rcv_skb+0x226/0x4a0
 genl_rcv+0x28/0x40
 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 ffff88816f453200
 which belongs to the cache kmalloc-64 of size 64
The buggy address is located 0 bytes inside of
 64-byte region [ffff88816f453200, ffff88816f453240)

The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x16f453
flags: 0x57ff00000000000(node=1|zone=2|lastcpupid=0x7ff)
page_type: f5(slab)
raw: 057ff00000000000 ffff8881000418c0 dead000000000100 dead000000000122
raw: 0000000000000000 0000000000200020 00000000f5000000 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 0, migratetype Unmovable, gfp_mask 0xd2c40(GFP_NOFS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 5017, tgid 5017 (ln), ts 16778971046
 post_alloc_hook+0x1f9/0x250
 get_page_from_freelist+0x2209/0x2280
 __alloc_frozen_pages_noprof+0x1fc/0x400
 allocate_slab+0x7d/0x620
 refill_objects+0x2d5/0x350
 __pcs_replace_empty_main+0x2c8/0x6c0
 __kmalloc_noprof+0x47b/0x720
 tomoyo_supervisor+0xc53/0x1560
 tomoyo_path_permission+0x262/0x3b0
 tomoyo_check_open_permission+0x2b2/0x470
 security_file_open+0xa9/0x240
 do_dentry_open+0x4a0/0x1380
 vfs_open+0x3b/0x340
 path_openat+0x1443/0x1d60
 do_file_open+0x23e/0x4a0
 do_sys_openat2+0x115/0x200
page last free pid 39 tgid 39 ts 12541258262 stack trace:
 __free_frozen_pages+0xc93/0xd90
 kasan_depopulate_vmalloc_pte+0x6d/0x90
 __apply_to_page_range+0xbd8/0x1420
 __kasan_release_vmalloc+0xa2/0xd0
 purge_vmap_node+0x220/0x960
 __purge_vmap_area_lazy+0x6c1/0xab0
 drain_vmap_area_work+0x27/0x40
 process_scheduled_works+0xc3d/0x1630
 worker_thread+0xa47/0xfb0
 kthread+0x38b/0x480
 ret_from_fork+0x514/0xb70
 ret_from_fork_asm+0x1a/0x30

Memory state around the buggy address:
 ffff88816f453100: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
 ffff88816f453180: 00 00 00 00 00 00 fc fc fc fc fc fc fc fc fc fc
>ffff88816f453200: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
                   ^
 ffff88816f453280: 00 00 00 00 00 00 05 fc fc fc fc fc fc fc fc fc
 ffff88816f453300: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
==================================================================
