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

CPU: 1 UID: 0 PID: 5844 Comm: kworker/u8:2 Not tainted 6.16.0-rc5-syzkaller-00159-g47c84997c686 #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+0xd2/0x2b0
 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:unwind_next_frame+0x17e7/0x2390
Code: 89 da e8 4c 0e 00 00 84 c0 0f 84 47 01 00 00 48 bd 00 00 00 00 00 fc ff df 48 8b 44 24 20 0f b6 04 28 84 c0 0f 85 f4 08 00 00 <b3> 01 8b 84 24 84 00 00 00 41 39 06 4c 8b 7c 24 48 48 8b 7c 24 70
RSP: 0018:ffffc9000358ef38 EFLAGS: 00000246
RAX: 0000000000000000 RBX: ffffffff9032ee8c RCX: 0000000000000001
RDX: ffffc9000358f048 RSI: dffffc0000000000 RDI: ffffc9000358fe70
RBP: dffffc0000000000 R08: ffffc9000358fe70 R09: 0000000000000000
R10: ffffc9000358f058 R11: fffff520006b1e0d R12: ffffc9000358fe70
R13: ffffc9000358f058 R14: ffffc9000358f008 R15: 1ffffffff2065dd1
 arch_stack_walk+0x11c/0x150
 stack_trace_save+0x9c/0xe0
 kasan_save_track+0x3e/0x80
 __kasan_slab_alloc+0x6c/0x80
 kmem_cache_alloc_noprof+0x1c1/0x3c0
 fill_pool+0x100/0x570
 debug_object_activate+0x383/0x420
 call_rcu+0xaa/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+0xc5/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 11587:
 kasan_save_track+0x3e/0x80
 __kasan_kmalloc+0x93/0xb0
 __kmalloc_cache_noprof+0x230/0x3d0
 rose_add_node+0x23a/0xde0
 rose_rt_ioctl+0xa48/0xfb0
 rose_ioctl+0x3ce/0x8b0
 sock_do_ioctl+0xdc/0x300
 sock_ioctl+0x576/0x790
 __se_sys_ioctl+0xfc/0x170
 do_syscall_64+0xfa/0x3b0
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

Freed by task 21493:
 kasan_save_track+0x3e/0x80
 kasan_save_free_info+0x46/0x50
 __kasan_slab_free+0x62/0x70
 kfree+0x18e/0x440
 rose_rt_device_down+0x473/0x4c0
 rose_device_event+0x603/0x6a0
 notifier_call_chain+0x1b6/0x3e0
 __dev_notify_flags+0x18d/0x2e0
 netif_change_flags+0xe8/0x1a0
 dev_change_flags+0x130/0x260
 dev_ioctl+0x7b4/0x1150
 sock_do_ioctl+0x22c/0x300
 sock_ioctl+0x576/0x790
 __se_sys_ioctl+0xfc/0x170
 do_syscall_64+0xfa/0x3b0
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

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

The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff888115609000 pfn:0x115608
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 ffffea00045a2b10 ffffea0004201910
raw: ffff888115609000 000000000010000f 00000000f5000000 0000000000000000
head: 057ff00000000240 ffff88801a441c80 ffffea00045a2b10 ffffea0004201910
head: ffff888115609000 000000000010000f 00000000f5000000 0000000000000000
head: 057ff00000000002 ffffea0004558201 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 0x252800(GFP_NOWAIT|__GFP_NORETRY|__GFP_COMP|__GFP_THISNODE), pid 5903, tgid 5903 (syz.0.6), ts 56181307377, free_ts 56128010161
 post_alloc_hook+0x240/0x2a0
 get_page_from_freelist+0x21e4/0x22c0
 __alloc_frozen_pages_noprof+0x181/0x370
 allocate_slab+0x65/0x3b0
 ___slab_alloc+0xbfc/0x1480
 __kmalloc_node_noprof+0x2fd/0x4e0
 alloc_slab_obj_exts+0x39/0xa0
 __memcg_slab_post_alloc_hook+0x31e/0x7f0
 kmem_cache_alloc_noprof+0x2bf/0x3c0
 __anon_vma_prepare+0xcb/0x4a0
 __handle_mm_fault+0x4d02/0x5620
 handle_mm_fault+0x40a/0x8e0
 do_user_addr_fault+0xa81/0x1390
 exc_page_fault+0x76/0xf0
 asm_exc_page_fault+0x26/0x30
page last free pid 5826 tgid 5826 stack trace:
 __free_frozen_pages+0xc71/0xe70
 __slab_free+0x326/0x400
 qlist_free_all+0x97/0x140
 kasan_quarantine_reduce+0x148/0x160
 __kasan_slab_alloc+0x22/0x80
 kmem_cache_alloc_noprof+0x1c1/0x3c0
 getname_flags+0xb8/0x540
 vfs_fstatat+0x43/0x170
 __x64_sys_newfstatat+0x116/0x190
 do_syscall_64+0xfa/0x3b0
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

Memory state around the buggy address:
 ffff888115608f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff888115608f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff888115609000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                                  ^
 ffff888115609080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff888115609100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
