==================================================================
BUG: KASAN: use-after-free in rose_timer_expiry+0x470/0x490 net/rose/rose_timer.c:183
Read of size 2 at addr ffff888060eef82a by task syz.4.1060/8213
CPU: 1 PID: 8213 Comm: syz.4.1060 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/02/2025
Call Trace:
dump_stack_lvl+0x168/0x230 lib/dump_stack.c:106
print_address_description+0x60/0x2d0 mm/kasan/report.c:248
__kasan_report mm/kasan/report.c:434 [inline]
kasan_report+0xdf/0x130 mm/kasan/report.c:451
rose_timer_expiry+0x470/0x490 net/rose/rose_timer.c:183
call_timer_fn+0x16c/0x530 kernel/time/timer.c:1451
expire_timers kernel/time/timer.c:1496 [inline]
__run_timers+0x525/0x7c0 kernel/time/timer.c:1767
run_timer_softirq+0x63/0xf0 kernel/time/timer.c:1780
handle_softirqs+0x328/0x820 kernel/softirq.c:576
__do_softirq kernel/softirq.c:610 [inline]
invoke_softirq kernel/softirq.c:450 [inline]
__irq_exit_rcu+0x12f/0x220 kernel/softirq.c:659
irq_exit_rcu+0x5/0x20 kernel/softirq.c:671
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1108 [inline]
sysvec_apic_timer_interrupt+0xa0/0xc0 arch/x86/kernel/apic/apic.c:1108
asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:676
RIP: 0010:copy_user_enhanced_fast_string+0xe/0x40 arch/x86/lib/copy_user_64.S:206
Code: 89 d1 c1 e9 03 83 e2 07 f3 48 a5 89 d1 f3 a4 31 c0 0f 01 ca c3 90 90 90 90 90 90 90 0f 01 cb 83 fa 40 0f 82 70 ff ff ff 89 d1 a4 31 c0 0f 01 ca c3 90 90 90 90 90 90 90 90 90 90 89 d1 83 f8
RSP: 0018:ffffc9000424f958 EFLAGS: 00050206
RAX: ffffffff83d92501 RBX: 0000000000001000 RCX: 0000000000000c00
RDX: 0000000000001000 RSI: 00007f7acadbf400 RDI: ffff88805b6b8400
RBP: ffffc9000424fad0 R08: dffffc0000000000 R09: ffffed100b6d7200
R10: 0000000000000000 R11: 0000000000000200 R12: 00007f7acadbf000
R13: 0000000000159000 R14: ffff88805b6b8000 R15: ffffc9000424fdff
copy_user_generic arch/x86/include/asm/uaccess_64.h:37 [inline]
raw_copy_from_user arch/x86/include/asm/uaccess_64.h:52 [inline]
copyin lib/iov_iter.c:168 [inline]
copy_page_from_iter_atomic+0x51a/0x1520 lib/iov_iter.c:978
generic_perform_write+0x2ff/0x530 mm/filemap.c:3793
__generic_file_write_iter+0x25f/0x4e0 mm/filemap.c:3912
generic_file_write_iter+0xa6/0x1b0 mm/filemap.c:3944
call_write_iter include/linux/fs.h:2172 [inline]
new_sync_write fs/read_write.c:507 [inline]
vfs_write+0x712/0xd00 fs/read_write.c:594
ksys_write+0x14d/0x250 fs/read_write.c:647
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x66/0xd0
RIP: 0033:0x7f7ad4e1da7f
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:00007f7ad3085df0 EFLAGS: 00000293 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 0000000001000000 RCX: 00007f7ad4e1da7f
RDX: 0000000001000000 RSI: 00007f7acac66000 RDI: 0000000000000004
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000037fb2
R10: 0000000000000002 R11: 0000000000000293 R12: 0000000000000004
R13: 00007f7ad3085ef0 R14: 00007f7ad3085eb0 R15: 00007f7acac66000
The buggy address belongs to the page:
page:ffffea000183bbc0 refcount:0 mapcount:0 mapping:0000000000000000 index:0x100 pfn:0x60eef
flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000000000 0000000000000000 ffffea000183bb88 0000000000000000
raw: 0000000000000100 0000000000000000 00000000ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as freed
page last allocated via order 2, migratetype Unmovable, gfp_mask 0x152cc0(GFP_USER|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP), pid 7753, ts 254755868773, free_ts 266958735327
prep_new_page mm/page_alloc.c:2426 [inline]
get_page_from_freelist+0x1b77/0x1c60 mm/page_alloc.c:4192
__alloc_pages+0x1e1/0x470 mm/page_alloc.c:5487
alloc_slab_page mm/slub.c:1780 [inline]
allocate_slab mm/slub.c:1917 [inline]
new_slab+0xc0/0x4b0 mm/slub.c:1980
___slab_alloc+0x81e/0xdf0 mm/slub.c:3013
__slab_alloc mm/slub.c:3100 [inline]
slab_alloc_node mm/slub.c:3191 [inline]
slab_alloc mm/slub.c:3233 [inline]
kmem_cache_alloc+0x195/0x290 mm/slub.c:3238
kmem_cache_zalloc include/linux/slab.h:728 [inline]
kvm_vm_ioctl_create_vcpu+0x100/0x880 virt/kvm/kvm_main.c:3709
kvm_vm_ioctl+0x5fa/0xa80 virt/kvm/kvm_main.c:4474
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:874 [inline]
__se_sys_ioctl+0xfa/0x170 fs/ioctl.c:860
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x66/0xd0
page last free stack trace:
reset_page_owner include/linux/page_owner.h:24 [inline]
free_pages_prepare mm/page_alloc.c:1340 [inline]
free_pcp_prepare mm/page_alloc.c:1391 [inline]
free_unref_page_prepare+0x637/0x6c0 mm/page_alloc.c:3317
free_unref_page+0x94/0x280 mm/page_alloc.c:3396
free_slab mm/slub.c:2020 [inline]
discard_slab mm/slub.c:2026 [inline]
__unfreeze_partials+0x1a5/0x200 mm/slub.c:2512
put_cpu_partial+0x12d/0x190 mm/slub.c:2592
qlist_free_all+0x35/0x90 mm/kasan/quarantine.c:176
kasan_quarantine_reduce+0x150/0x160 mm/kasan/quarantine.c:283
__kasan_slab_alloc+0x2f/0xd0 mm/kasan/common.c:444
kasan_slab_alloc include/linux/kasan.h:254 [inline]
slab_post_alloc_hook+0x4c/0x380 mm/slab.h:519
slab_alloc_node mm/slub.c:3225 [inline]
slab_alloc mm/slub.c:3233 [inline]
kmem_cache_alloc+0x100/0x290 mm/slub.c:3238
getname_flags+0xb5/0x500 fs/namei.c:138
getname fs/namei.c:217 [inline]
__do_sys_rename fs/namei.c:5039 [inline]
__se_sys_rename fs/namei.c:5037 [inline]
__x64_sys_rename+0x5b/0x90 fs/namei.c:5037
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x66/0xd0
Memory state around the buggy address:
ffff888060eef700: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ffff888060eef780: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>ffff888060eef800: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
^
ffff888060eef880: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ffff888060eef900: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
==================================================================
----------------
Code disassembly (best guess):
0: 89 d1 mov %edx,%ecx
2: c1 e9 03 shr $0x3,%ecx
5: 83 e2 07 and $0x7,%edx
8: f3 48 a5 rep movsq %ds:(%rsi),%es:(%rdi)
b: 89 d1 mov %edx,%ecx
d: f3 a4 rep movsb %ds:(%rsi),%es:(%rdi)
f: 31 c0 xor %eax,%eax
11: 0f 01 ca clac
14: c3 ret
15: 90 nop
16: 90 nop
17: 90 nop
18: 90 nop
19: 90 nop
1a: 90 nop
1b: 90 nop
1c: 0f 01 cb stac
1f: 83 fa 40 cmp $0x40,%edx
22: 0f 82 70 ff ff ff jb 0xffffff98
28: 89 d1 mov %edx,%ecx
* 2a: f3 a4 rep movsb %ds:(%rsi),%es:(%rdi) <-- trapping instruction
2c: 31 c0 xor %eax,%eax
2e: 0f 01 ca clac
31: c3 ret
32: 90 nop
33: 90 nop
34: 90 nop
35: 90 nop
36: 90 nop
37: 90 nop
38: 90 nop
39: 90 nop
3a: 90 nop
3b: 90 nop
3c: 89 d1 mov %edx,%ecx
3e: 83 .byte 0x83
3f: f8 clc