==================================================================
BUG: KASAN: double-free in rcu_free_sheaf+0x31/0x200
Free of addr ffff88812049b580 by task syz.2.6253/22381

CPU: 0 UID: 0 PID: 22381 Comm: syz.2.6253 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:
 <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
 __irq_exit_rcu+0xcb/0x220
 irq_exit_rcu+0x9/0x30
 sysvec_apic_timer_interrupt+0xa6/0xc0
 </IRQ>
 <TASK>
 asm_sysvec_apic_timer_interrupt+0x1a/0x20
RIP: 0010:__sanitizer_cov_trace_cmp1+0x9e/0xb0
Code: 8d 51 28 4d 39 ca 77 22 89 ff 89 f6 49 ff c0 4c 89 02 48 c7 44 0a 08 00 00 00 00 48 89 7c 0a 10 48 89 74 0a 18 48 89 44 0a 20 <c3> cc cc cc cc cc 66 66 66 2e 0f 1f 84 00 00 00 00 00 90 90 90 90
RSP: 0018:ffffc90004adf708 EFLAGS: 00000293
RAX: ffffffff8492056d RBX: dffffc0000000000 RCX: ffff88810fdd0000
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: ffff8881779e8110 R08: ffff88810fdd0000 R09: 0000000000000002
R10: 000000000000005c R11: ffffffff84925000 R12: 0000000000000000
R13: 0000000000000000 R14: ffff88816e2b3480 R15: 0000000000000000
 tomoyo_check_acl+0x12d/0x400
 tomoyo_path_permission+0x1a6/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
 __x64_sys_openat+0x138/0x170
 do_syscall_64+0x166/0x520
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fb63215e98e
Code: 08 0f 85 a5 a8 ff ff 49 89 fb 48 89 f0 48 89 d7 48 89 ce 4c 89 c2 4d 89 ca 4c 8b 44 24 08 4c 8b 4c 24 10 4c 89 5c 24 08 0f 05 <c3> 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 80 00 00 00 00 48 83 ec 08
RSP: 002b:00007fb633114f18 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 00007fb6331156c0 RCX: 00007fb63215e98e
RDX: 0000000000000000 RSI: 00007fb6322347a6 RDI: ffffffffffffff9c
RBP: 00007fb63223506b R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fb632426038 R14: 00007fb632425fa0 R15: 00007fff9ca39e18
 </TASK>

Allocated by task 12560:
 kasan_save_track+0x3e/0x80
 __kasan_kmalloc+0x93/0xb0
 __kmalloc_cache_noprof+0x321/0x600
 hwsim_update_pib+0x7e/0x400
 hwsim_set_promiscuous_mode+0x196/0x2e0
 drv_set_promiscuous_mode+0x159/0x2e0
 drv_start+0x4ea/0x1010
 mac802154_scan_worker+0x8e6/0xe60
 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 22381:
 kasan_save_track+0x3e/0x80
 kasan_save_free_info+0x40/0x50
 __kasan_slab_free+0x5c/0x80
 __rcu_free_sheaf_prepare+0x12d/0x2a0
 rcu_free_sheaf+0x31/0x200
 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

The buggy address belongs to the object at ffff88812049b580
 which belongs to the cache kmalloc-64 of size 64
The buggy address is located 0 bytes inside of
 64-byte region [ffff88812049b580, ffff88812049b5c0)

The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff88812049b400 pfn:0x12049b
flags: 0x17ff00000000200(workingset|node=0|zone=2|lastcpupid=0x7ff)
page_type: f5(slab)
raw: 017ff00000000200 ffff8881000418c0 ffffea00040ec990 ffffea0004356cd0
raw: ffff88812049b400 0000000000200008 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 5591, tgid 5591 (syz-executor), ts 183020994098
 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
 tomoyo_encode+0x2ad/0x570
 tomoyo_realpath_from_path+0x5fa/0x640
 tomoyo_path_perm+0x283/0x560
 tomoyo_path_unlink+0xaa/0xf0
 security_path_unlink+0x15f/0x330
 filename_unlinkat+0x349/0x610
 __se_sys_unlink+0x2e/0x140
 do_syscall_64+0x166/0x520
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
page last free pid 11561 tgid 11560 ts 183019524099 stack trace:
 __free_frozen_pages+0xc93/0xd90
 tlb_finish_mmu+0x13e/0x220
 exit_mmap+0x4b2/0x9f0
 __mmput+0x118/0x420
 exit_mm+0x221/0x2d0
 do_exit+0x6cd/0x2360
 do_group_exit+0x22d/0x2f0
 get_signal+0x121b/0x12c0
 arch_do_signal_or_restart+0xbb/0x860
 exit_to_user_mode_loop+0x10e/0x770
 do_syscall_64+0x328/0x520
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

Memory state around the buggy address:
 ffff88812049b480: 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc fc
 ffff88812049b500: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
>ffff88812049b580: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
                   ^
 ffff88812049b600: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
 ffff88812049b680: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
==================================================================
