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

CPU: 0 UID: 0 PID: 5878 Comm: kworker/u8:3 Not tainted 6.16.0-syzkaller-12063-g37816488247d-dirty #0 PREEMPT(full) 
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.2-debian-1.16.2-1 04/01/2014
Workqueue: netns cleanup_net
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:preempt_count_sub+0x0/0x170
Code: c7 c7 74 78 a3 8f e8 8f 19 93 00 e9 5c ff ff ff 66 2e 0f 1f 84 00 00 00 00 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 <f3> 0f 1e fa 55 53 48 bb 00 00 00 00 00 fc ff df 48 c7 c0 20 43 ab
RSP: 0018:ffffc9000446f4f0 EFLAGS: 00000286
RAX: c3eea7059c0a4000 RBX: 0000000000000001 RCX: c3eea7059c0a4000
RDX: 0000000000000004 RSI: ffffffff8dba3987 RDI: 0000000000000001
RBP: 0000000000000001 R08: 0000000000000000 R09: ffffffff81748958
R10: dffffc0000000000 R11: fffffbfff1f468e7 R12: 0000000000000008
R13: dffffc0000000000 R14: ffffffff81748958 R15: ffff88805fffa8c0
 __virt_addr_valid+0x47f/0x5c0
 kasan_addr_to_slab+0xf/0x90
 kasan_record_aux_stack+0xf/0xd0
 call_rcu+0x157/0x9c0
 kernfs_put+0x19e/0x480
 kernfs_remove_by_name_ns+0xb7/0x130
 sysfs_remove_group+0xfc/0x2c0
 sysfs_remove_groups+0x54/0xb0
 ib_free_port_attrs+0x281/0x3b0
 rdma_dev_exit_net+0x1d8/0x340
 ops_undo_list+0x49a/0x990
 cleanup_net+0x4c5/0x800
 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 30412:
 kasan_save_track+0x3e/0x80
 __kasan_kmalloc+0x93/0xb0
 __kmalloc_cache_noprof+0x230/0x3d0
 sctp_endpoint_new+0x86/0xa20
 sctp_init_sock+0x960/0x11f0
 sctp_v6_init_sock+0x16/0x70
 inet6_create+0xef4/0x1260
 __sock_create+0x4b3/0x9f0
 inet_ctl_sock_create+0x9a/0x220
 sctp_ctrlsock_init+0x47/0xd0
 ops_init+0x35c/0x5c0
 setup_net+0x10c/0x320
 copy_net_ns+0x31b/0x4d0
 create_new_namespaces+0x3f3/0x720
 unshare_nsproxy_namespaces+0x11c/0x170
 ksys_unshare+0x4c8/0x8c0
 __x64_sys_unshare+0x38/0x50
 do_syscall_64+0xfa/0x3b0
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

Freed by task 0:
 kasan_save_track+0x3e/0x80
 kasan_save_free_info+0x46/0x50
 __kasan_slab_free+0x5b/0x80
 kfree+0x18e/0x440
 rcu_core+0xcab/0x1770
 handle_softirqs+0x286/0x870
 __irq_exit_rcu+0xca/0x1f0
 irq_exit_rcu+0x9/0x30
 sysvec_apic_timer_interrupt+0xa6/0xc0
 asm_sysvec_apic_timer_interrupt+0x1a/0x20

Last potentially related work creation:
 kasan_save_stack+0x3e/0x60
 kasan_record_aux_stack+0xbd/0xd0
 call_rcu+0x157/0x9c0
 sctp_destroy_sock+0x1ec/0x370
 sk_common_release+0x75/0x2e0
 sctp_close+0x783/0x900
 inet_release+0x144/0x190
 sock_release+0x85/0x150
 ops_undo_list+0x49a/0x990
 cleanup_net+0x4c5/0x800
 process_scheduled_works+0xae1/0x17b0
 worker_thread+0x8a0/0xda0
 kthread+0x711/0x8a0
 ret_from_fork+0x3fc/0x770
 ret_from_fork_asm+0x1a/0x30

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

The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff88801f52d000 pfn:0x1f52c
head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
flags: 0xfff00000000240(workingset|head|node=0|zone=1|lastcpupid=0x7ff)
page_type: f5(slab)
raw: 00fff00000000240 ffff88801a441c80 ffffea0000ec1610 ffffea000105c610
raw: ffff88801f52d000 000000000010000f 00000000f5000000 0000000000000000
head: 00fff00000000240 ffff88801a441c80 ffffea0000ec1610 ffffea000105c610
head: ffff88801f52d000 000000000010000f 00000000f5000000 0000000000000000
head: 00fff00000000002 ffffea00007d4b01 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 1, tgid 1 (swapper/0), ts 13379469182, free_ts 5353866202
 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
 usb_create_ep_devs+0x12c/0x230
 usb_new_device+0xb4c/0x16f0
 register_root_hub+0x275/0x590
 usb_add_hcd+0xba1/0x1050
 vhci_hcd_probe+0x1c1/0x380
 platform_probe+0xf9/0x190
 really_probe+0x26d/0x9e0
 __driver_probe_device+0x18c/0x2f0
page last free pid 24 tgid 24 stack trace:
 __free_frozen_pages+0xbc4/0xd30
 vfree+0x25a/0x400
 delayed_vfree_work+0x55/0x80
 process_scheduled_works+0xae1/0x17b0
 worker_thread+0x8a0/0xda0
 kthread+0x711/0x8a0
 ret_from_fork+0x3fc/0x770
 ret_from_fork_asm+0x1a/0x30

Memory state around the buggy address:
 ffff88801f52cf00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff88801f52cf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff88801f52d000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                                  ^
 ffff88801f52d080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff88801f52d100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
