==================================================================
BUG: KASAN: slab-use-after-free in rose_timer_expiry+0x471/0x4b0
Read of size 2 at addr ffff888112adc82a by task syz.4.3199/19356

CPU: 0 UID: 0 PID: 19356 Comm: syz.4.3199 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+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:lock_is_held_type+0x137/0x190
Code: 01 75 44 48 c7 04 24 00 00 00 00 9c 8f 04 24 f7 04 24 00 02 00 00 75 4c 41 f7 c4 00 02 00 00 74 01 fb 65 48 8b 05 f9 f3 26 07 <48> 3b 44 24 08 75 43 89 d8 48 83 c4 10 5b 41 5c 41 5d 41 5e 41 5f
RSP: 0018:ffffc900063af668 EFLAGS: 00000206
RAX: 96e2b07db7145200 RBX: 0000000000000000 RCX: 96e2b07db7145200
RDX: ffff888108023980 RSI: ffffffff8dba5bba RDI: ffffffff8be33300
RBP: 00000000ffffffff R08: 0000000000000000 R09: ffffffff84b124fd
R10: dffffc0000000000 R11: fffff94000153c2f R12: 0000000000000246
R13: ffff888108023980 R14: ffffffff8e171398 R15: 0000000000000003
 blkcg_css+0xcc/0x1d0
 blk_cgroup_congested+0xbc/0x210
 __folio_throttle_swaprate+0x80/0x1c0
 shmem_add_to_page_cache+0x6f1/0xba0
 shmem_alloc_and_add_folio+0x846/0xf60
 shmem_get_folio_gfp+0x59d/0x1660
 shmem_write_begin+0xf7/0x2b0
 generic_perform_write+0x2c5/0x900
 shmem_file_write_iter+0xf8/0x120
 vfs_write+0x5c9/0xb30
 ksys_write+0x145/0x250
 do_syscall_64+0xfa/0x3b0
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7efffad8d69f
Code: 89 54 24 18 48 89 74 24 10 89 7c 24 08 e8 f9 92 02 00 48 8b 54 24 18 48 8b 74 24 10 41 89 c0 8b 7c 24 08 b8 01 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 31 44 89 c7 48 89 44 24 08 e8 4c 93 02 00 48
RSP: 002b:00007efffbb1cdf0 EFLAGS: 00000293 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 0000000001000000 RCX: 00007efffad8d69f
RDX: 0000000001000000 RSI: 00007efff0a00000 RDI: 0000000000000003
RBP: 0000000000000000 R08: 0000000000000000 R09: 00000000000061b0
R10: 0000000000000794 R11: 0000000000000293 R12: 0000000000000003
R13: 00007efffbb1cef0 R14: 00007efffbb1ceb0 R15: 00007efff0a00000
 </TASK>

Allocated by task 19307:
 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_grab_spawn+0x7d/0x390
 lskcipher_alloc_instance_simple+0x1ae/0xba0
 crypto_cbc_create+0x22/0x1c0
 cryptomgr_probe+0x86/0x220
 kthread+0x711/0x8a0
 ret_from_fork+0x3fc/0x770
 ret_from_fork_asm+0x1a/0x30

Freed by task 19307:
 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_grab_spawn+0x7d/0x390
 lskcipher_alloc_instance_simple+0x1ae/0xba0
 crypto_cbc_create+0x22/0x1c0
 cryptomgr_probe+0x86/0x220
 kthread+0x711/0x8a0
 ret_from_fork+0x3fc/0x770
 ret_from_fork_asm+0x1a/0x30

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

The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x112adc
head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
flags: 0x57ff00000000040(head|node=1|zone=2|lastcpupid=0x7ff)
page_type: f5(slab)
raw: 057ff00000000040 ffff88801a441c80 dead000000000100 dead000000000122
raw: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000
head: 057ff00000000040 ffff88801a441c80 dead000000000100 dead000000000122
head: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000
head: 057ff00000000002 ffffea00044ab701 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 5856, tgid 5856 (syz-executor), ts 65057560626, free_ts 64990914476
 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
 netdev_register_kobject+0x178/0x310
 register_netdevice+0x126c/0x1ae0
 nsim_create+0xae8/0xf10
 __nsim_dev_port_add+0x6b6/0xb10
 nsim_dev_port_add_all+0x37/0xf0
 nsim_drv_probe+0x88e/0xba0
 really_probe+0x26d/0x9e0
 __driver_probe_device+0x18c/0x2f0
page last free pid 5861 tgid 5861 stack trace:
 __free_frozen_pages+0xbc4/0xd30
 __slab_free+0x303/0x3c0
 qlist_free_all+0x97/0x140
 kasan_quarantine_reduce+0x148/0x160
 __kasan_slab_alloc+0x22/0x80
 __kmalloc_cache_noprof+0x1be/0x3d0
 netdevice_event+0x3a1/0x8a0
 notifier_call_chain+0x1b6/0x3e0
 __netdev_upper_dev_link+0x3c3/0x590
 netdev_upper_dev_link+0x9d/0xf0
 hsr_add_port+0x5e2/0x890
 hsr_dev_finalize+0x685/0xaa0
 hsr_newlink+0x7d7/0x940
 rtnl_newlink_create+0x310/0xb00
 rtnl_newlink+0x16d6/0x1c70
 rtnetlink_rcv_msg+0x7cf/0xb70

Memory state around the buggy address:
 ffff888112adc700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff888112adc780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff888112adc800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                                  ^
 ffff888112adc880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff888112adc900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
