==================================================================
BUG: KASAN: slab-use-after-free in rose_timer_expiry+0x471/0x4b0
Read of size 2 at addr ffff88811384f82a by task kworker/0:3/5878

CPU: 0 UID: 0 PID: 5878 Comm: kworker/0:3 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
Workqueue: events __set_printk_clr_event
Call Trace:
 <IRQ>
 dump_stack_lvl+0x189/0x250
 print_report+0xca/0x240
 kasan_report+0x118/0x150
 rose_timer_expiry+0x471/0x4b0
 call_timer_fn+0x17e/0x5f0
 __run_timer_base+0x61a/0x860
 run_timer_softirq+0xb7/0x180
 handle_softirqs+0x286/0x870
 __irq_exit_rcu+0xca/0x1f0
 irq_exit_rcu+0x9/0x30
 sysvec_apic_timer_interrupt+0xa6/0xc0
 </IRQ>
 <TASK>
 asm_sysvec_apic_timer_interrupt+0x1a/0x20
RIP: 0010:__ftrace_set_clr_event_nolock+0x3e6/0xad0
Code: 50 37 f7 ff eb 05 e8 49 37 f7 ff 48 b9 00 00 00 00 00 fc ff df 4c 8b 7c 24 38 4d 85 ff 74 48 4c 89 f0 48 c1 e8 03 80 3c 08 00 <74> 08 4c 89 f7 e8 70 a0 5a 00 49 8b 36 4c 89 ff e8 05 08 ad 09 89
RSP: 0018:ffffc9000331f9c0 EFLAGS: 00000246
RAX: 1ffffffff1f18e62 RBX: 0000000000000000 RCX: dffffc0000000000
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: ffffffff81c81b30 R08: ffff88801b2cdf4f R09: 1ffff11003659be9
R10: dffffc0000000000 R11: ffffed1003659bea R12: ffff88801aae5800
R13: ffffffff8dcc0e61 R14: ffffffff8f8c7310 R15: ffffffff8b906b40
 trace_set_clr_event+0xdc/0x140
 __set_printk_clr_event+0x22/0x80
 process_scheduled_works+0xae1/0x17b0
 worker_thread+0x8a0/0xda0
 kthread+0x711/0x8a0
 ret_from_fork+0x3fc/0x770
 ret_from_fork_asm+0x1a/0x30
 </TASK>

Allocated by task 1046:
 kasan_save_track+0x3e/0x80
 __kasan_kmalloc+0x93/0xb0
 __kmalloc_cache_noprof+0x230/0x3d0
 crypto_larval_alloc+0x59/0x290
 crypto_alg_mod_lookup+0x1a4/0x5f0
 crypto_alloc_tfm_node+0x13e/0x3f0
 alg_bind+0x2fa/0x570
 __sys_bind+0x2c6/0x3e0
 __x64_sys_bind+0x7a/0x90
 do_syscall_64+0xfa/0x3b0
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

Freed by task 1046:
 kasan_save_track+0x3e/0x80
 kasan_save_free_info+0x46/0x50
 __kasan_slab_free+0x5b/0x80
 kfree+0x18e/0x440
 crypto_alg_mod_lookup+0x542/0x5f0
 crypto_alloc_tfm_node+0x13e/0x3f0
 alg_bind+0x2fa/0x570
 __sys_bind+0x2c6/0x3e0
 __x64_sys_bind+0x7a/0x90
 do_syscall_64+0xfa/0x3b0
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

The buggy address belongs to the object at ffff88811384f800
 which belongs to the cache kmalloc-512 of size 512
The buggy address is located 42 bytes inside of
 freed 512-byte region [ffff88811384f800, ffff88811384fa00)

The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff88811384c400 pfn:0x11384c
head: order:2 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 ffff88801a441c80 ffffea0004288c10 ffffea0004c30410
raw: ffff88811384c400 0000000000100008 00000000f5000000 0000000000000000
head: 057ff00000000240 ffff88801a441c80 ffffea0004288c10 ffffea0004c30410
head: ffff88811384c400 0000000000100008 00000000f5000000 0000000000000000
head: 057ff00000000002 ffffea00044e1301 00000000ffffffff 00000000ffffffff
head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000004
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 2, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 5842, tgid 5842 (syz-executor), ts 48957710004, free_ts 48956942061
 post_alloc_hook+0x240/0x2a0
 get_page_from_freelist+0x21e4/0x22c0
 __alloc_frozen_pages_noprof+0x181/0x370
 alloc_pages_mpol+0x232/0x4a0
 allocate_slab+0x8a/0x370
 ___slab_alloc+0xbeb/0x1410
 __kmalloc_cache_noprof+0x296/0x3d0
 device_add+0xbe/0xb50
 rfkill_register+0x17a/0x8e0
 wiphy_register+0x214c/0x28d0
 ieee80211_register_hw+0x3425/0x4080
 mac80211_hwsim_new_radio+0x2f0e/0x5340
 hwsim_new_radio_nl+0xea4/0x1b10
 genl_family_rcv_msg_doit+0x215/0x300
 genl_rcv_msg+0x60e/0x790
 netlink_rcv_skb+0x208/0x470
page last free pid 5842 tgid 5842 stack trace:
 __free_frozen_pages+0xbc4/0xd30
 stack_depot_save_flags+0x436/0x860
 kasan_save_track+0x4f/0x80
 __kasan_slab_alloc+0x6c/0x80
 kmem_cache_alloc_lru_noprof+0x1c6/0x3d0
 alloc_inode+0x6a/0x1b0
 new_inode+0x22/0x170
 __debugfs_create_file+0x14d/0x4f0
 debugfs_create_file_full+0x3f/0x60
 cfg80211_debugfs_rdev_add+0x60/0xf0
 wiphy_register+0x1d27/0x28d0
 ieee80211_register_hw+0x3425/0x4080
 mac80211_hwsim_new_radio+0x2f0e/0x5340
 hwsim_new_radio_nl+0xea4/0x1b10
 genl_family_rcv_msg_doit+0x215/0x300
 genl_rcv_msg+0x60e/0x790

Memory state around the buggy address:
 ffff88811384f700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff88811384f780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff88811384f800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                                  ^
 ffff88811384f880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff88811384f900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
