==================================================================
BUG: KASAN: slab-use-after-free in rose_timer_expiry+0x471/0x4b0
Read of size 2 at addr ffff888109c9d82a by task modprobe/22463

CPU: 0 UID: 0 PID: 22463 Comm: modprobe 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
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:debug_lockdep_rcu_enabled+0x18/0x40
Code: cc cc 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 f3 0f 1e fa 31 c0 83 3d 57 89 2a 04 00 74 1e 83 3d 7a b9 2a 04 00 74 15 <65> 48 8b 0c 25 08 f0 9f 92 31 c0 83 b9 ec 0a 00 00 00 0f 94 c0 e9
RSP: 0018:ffffc900088176f8 EFLAGS: 00000202
RAX: 0000000000000000 RBX: ffffc90008817b40 RCX: dffffc0000000000
RDX: 0000000000000000 RSI: ffffffff8f8a1e70 RDI: 0000000000000003
RBP: ffff88801a47a080 R08: ffff888105e51cc0 R09: 0000000000000004
R10: 0000000000000003 R11: 0000000000000000 R12: ffff88810c75f400
R13: ffff88810c75f450 R14: ffff88810c75f460 R15: 0000000000000003
 mas_next_node+0x49b/0xd60
 mas_next_slot+0x407/0xcf0
 mas_find+0xb0e/0xd30
 free_pgtables+0x5ff/0x9c0
 exit_mmap+0x444/0xb50
 __mmput+0x118/0x430
 exit_mm+0x1da/0x2c0
 do_exit+0x648/0x2300
 do_group_exit+0x21c/0x2d0
 __x64_sys_exit_group+0x3f/0x40
 x64_sys_call+0x21f7/0x2200
 do_syscall_64+0xfa/0x3b0
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f0863b7aa90
Code: Unable to access opcode bytes at 0x7f0863b7aa66.
RSP: 002b:00007fff569f5fd8 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7
RAX: ffffffffffffffda RBX: 00007f0863c6b860 RCX: 00007f0863b7aa90
RDX: 00000000000000e7 RSI: 000000000000003c RDI: 0000000000000001
RBP: 00007f0863c6b860 R08: 00007fff569f5e50 R09: 00007fff569f5f30
R10: 00007fff569f5e90 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000001 R14: 00007f0863c6f658 R15: 0000000000000001
 </TASK>

Allocated by task 8392:
 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 22444:
 kasan_save_track+0x3e/0x80
 kasan_save_free_info+0x46/0x50
 __kasan_slab_free+0x5b/0x80
 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 ffff888109c9d800
 which belongs to the cache kmalloc-512 of size 512
The buggy address is located 42 bytes inside of
 freed 512-byte region [ffff888109c9d800, ffff888109c9da00)

The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x109c9c
head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
anon flags: 0x57ff00000000040(head|node=1|zone=2|lastcpupid=0x7ff)
page_type: f5(slab)
raw: 057ff00000000040 ffff88801a441c80 0000000000000000 dead000000000001
raw: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000
head: 057ff00000000040 ffff88801a441c80 0000000000000000 dead000000000001
head: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000
head: 057ff00000000002 ffffea0004272701 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 0x52820(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP), pid 7913, tgid 7912 (syz.1.859), ts 98211032463, free_ts 58610497552
 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_noprof+0x305/0x4f0
 hash_ip4_add+0x18ba/0x1ec0
 hash_ip4_uadt+0x640/0x850
 call_ad+0x383/0xb00
 ip_set_ad+0x791/0x930
 nfnetlink_rcv_msg+0xb4d/0x1130
 netlink_rcv_skb+0x208/0x470
 nfnetlink_rcv+0x26a/0x2520
 netlink_unicast+0x82f/0x9e0
 netlink_sendmsg+0x805/0xb30
page last free pid 1170 tgid 1170 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
 kmem_cache_alloc_node_noprof+0x1bb/0x3c0
 __alloc_skb+0x112/0x2d0
 rtmsg_ifinfo_build_skb+0x84/0x260
 rtmsg_ifinfo+0x8c/0x1a0
 netif_state_change+0x29e/0x3a0
 linkwatch_do_dev+0x117/0x170
 __linkwatch_run_queue+0x56a/0x7e0
 linkwatch_event+0x4c/0x60
 process_scheduled_works+0xae1/0x17b0
 worker_thread+0x8a0/0xda0
 kthread+0x711/0x8a0

Memory state around the buggy address:
 ffff888109c9d700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff888109c9d780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff888109c9d800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                                  ^
 ffff888109c9d880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff888109c9d900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
