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

CPU: 0 UID: 0 PID: 19853 Comm: syz.0.5965 Not tainted 6.16.0-syzkaller-11895-gcca7a0aae895-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:do_raw_spin_lock+0x15/0x290
Code: eb 86 0f 1f 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 f3 0f 1e fa 55 48 89 e5 41 57 41 56 41 55 41 54 53 48 83 e4 e0 <48> 81 ec 80 00 00 00 48 89 fb 65 48 8b 05 d9 c0 01 11 48 89 44 24
RSP: 0018:ffffc9000482f640 EFLAGS: 00000282
RAX: 58c9601e8b539400 RBX: ffff888028f72480 RCX: 58c9601e8b539400
RDX: 0000000000000000 RSI: ffffffff8dba33cb RDI: ffff888027ca3400
RBP: ffffc9000482f670 R08: 0000000000000000 R09: ffffffff8a26915f
R10: dffffc0000000000 R11: fffff52000905ec0 R12: dffffc0000000000
R13: 1ffff110051ee498 R14: 1ffff110051ee49e R15: 0000000000000001
 unix_stream_read_generic+0xc2f/0x2480
 unix_stream_recvmsg+0x15d/0x1b0
 sock_recvmsg+0x22c/0x270
 ____sys_recvmsg+0x1c9/0x460
 ___sys_recvmsg+0x1b5/0x510
 __x64_sys_recvmsg+0x198/0x260
 do_syscall_64+0xfa/0x3b0
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fc1fef8ebe9
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fc1fd1f6038 EFLAGS: 00000246 ORIG_RAX: 000000000000002f
RAX: ffffffffffffffda RBX: 00007fc1ff1b5fa0 RCX: 00007fc1fef8ebe9
RDX: 0000000040002002 RSI: 0000200000000000 RDI: 0000000000000008
RBP: 00007fc1ff011e19 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fc1ff1b6038 R14: 00007fc1ff1b5fa0 R15: 00007ffcc5964738
 </TASK>

Allocated by task 19820:
 kasan_save_track+0x3e/0x80
 __kasan_kmalloc+0x93/0xb0
 __kmalloc_cache_noprof+0x230/0x3d0
 inetdev_init+0x7d/0x500
 inetdev_event+0x301/0x15b0
 notifier_call_chain+0x1b6/0x3e0
 register_netdevice+0x1608/0x1ae0
 __ip_tunnel_create+0x3e7/0x560
 ip_tunnel_init_net+0x2ba/0x800
 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 23:
 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
 run_ksoftirqd+0x9b/0x100
 smpboot_thread_fn+0x542/0xa60
 kthread+0x711/0x8a0
 ret_from_fork+0x3fc/0x770
 ret_from_fork_asm+0x1a/0x30

Last potentially related work creation:
 kasan_save_stack+0x3e/0x60
 kasan_record_aux_stack+0xbd/0xd0
 call_rcu+0x157/0x9c0
 inetdev_event+0x81c/0x15b0
 notifier_call_chain+0x1b6/0x3e0
 unregister_netdevice_many_notify+0x14d7/0x1ff0
 ops_undo_list+0x3dc/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 ffff888038d97400
 which belongs to the cache kmalloc-512 of size 512
The buggy address is located 42 bytes inside of
 freed 512-byte region [ffff888038d97400, ffff888038d97600)

The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x38d94
head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
flags: 0xfff00000000040(head|node=0|zone=1|lastcpupid=0x7ff)
page_type: f5(slab)
raw: 00fff00000000040 ffff88801a441c80 dead000000000100 dead000000000122
raw: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000
head: 00fff00000000040 ffff88801a441c80 dead000000000100 dead000000000122
head: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000
head: 00fff00000000002 ffffea0000e36501 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 10175, tgid 10174 (syz.2.1816), ts 149015509581, free_ts 139483702703
 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
 cfcnfg_create+0x68/0x380
 caif_init_net+0x81/0xc0
 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
page last free pid 5854 tgid 5854 stack trace:
 __free_frozen_pages+0xbc4/0xd30
 __put_partials+0x156/0x1a0
 put_cpu_partial+0x17c/0x250
 __slab_free+0x2d5/0x3c0
 qlist_free_all+0x97/0x140
 kasan_quarantine_reduce+0x148/0x160
 __kasan_slab_alloc+0x22/0x80
 __kmalloc_noprof+0x224/0x4f0
 tomoyo_realpath_from_path+0xe3/0x5d0
 tomoyo_path_perm+0x213/0x4b0
 security_inode_getattr+0x12f/0x330
 vfs_fstatat+0xb1/0x170
 __x64_sys_newfstatat+0x116/0x190
 do_syscall_64+0xfa/0x3b0
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

Memory state around the buggy address:
 ffff888038d97300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff888038d97380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff888038d97400: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                                  ^
 ffff888038d97480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff888038d97500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
