==================================================================
BUG: KASAN: use-after-free in rose_timer_expiry+0x471/0x4b0 net/rose/rose_timer.c:183
Read of size 2 at addr ffff88805ae17c2a by task syz.6.1580/12174
CPU: 1 UID: 0 PID: 12174 Comm: syz.6.1580 Not tainted 6.16.0-rc7-syzkaller-02024-gfa582ca7e187 #0 PREEMPT(full)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025
Call Trace:
dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120
print_address_description mm/kasan/report.c:378 [inline]
print_report+0xca/0x230 mm/kasan/report.c:480
kasan_report+0x118/0x150 mm/kasan/report.c:593
rose_timer_expiry+0x471/0x4b0 net/rose/rose_timer.c:183
call_timer_fn+0x17b/0x5f0 kernel/time/timer.c:1747
expire_timers kernel/time/timer.c:1798 [inline]
__run_timers kernel/time/timer.c:2372 [inline]
__run_timer_base+0x61a/0x860 kernel/time/timer.c:2384
run_timer_base kernel/time/timer.c:2393 [inline]
run_timer_softirq+0xb7/0x180 kernel/time/timer.c:2403
handle_softirqs+0x286/0x870 kernel/softirq.c:579
__do_softirq kernel/softirq.c:613 [inline]
invoke_softirq kernel/softirq.c:453 [inline]
__irq_exit_rcu+0xca/0x1f0 kernel/softirq.c:680
irq_exit_rcu+0x9/0x30 kernel/softirq.c:696
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1050 [inline]
sysvec_apic_timer_interrupt+0xa6/0xc0 arch/x86/kernel/apic/apic.c:1050
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702
RIP: 0010:lockdep_unregister_key+0x2c5/0x310 kernel/locking/lockdep.c:6619
Code: 65 48 8b 05 3d 70 01 11 48 3b 44 24 10 0f 84 26 fe ff ff e8 fd c7 ce 09 e8 28 c9 ce 09 41 f7 c7 00 02 00 00 74 bd fb 40 84 ed <75> bc eb cd 90 0f 0b 90 e9 19 ff ff ff 90 0f 0b 90 e9 2a ff ff ff
RSP: 0018:ffffc9000fc8f998 EFLAGS: 00000246
RAX: 9aeeaa9dfa983c00 RBX: ffff888056f70298 RCX: 9aeeaa9dfa983c00
RDX: ffffffff93638318 RSI: ffffffff8d9ad1f8 RDI: ffffffff8be28d00
RBP: ffff888056f70200 R08: 0000000000000000 R09: ffffffff81ab49a8
R10: dffffc0000000000 R11: fffffbfff1f43edf R12: 0000000000000000
R13: 0000000000001000 R14: 0000000000000000 R15: 0000000000000207
__qdisc_destroy+0x166/0x420 net/sched/sch_generic.c:1083
netdev_for_each_tx_queue include/linux/netdevice.h:2657 [inline]
dev_shutdown+0x93/0x440 net/sched/sch_generic.c:1494
unregister_netdevice_many_notify+0xe0f/0x1ff0 net/core/dev.c:12143
unregister_netdevice_many net/core/dev.c:12218 [inline]
unregister_netdevice_queue+0x33c/0x380 net/core/dev.c:12062
unregister_netdevice include/linux/netdevice.h:3382 [inline]
__tun_detach+0xda4/0x1560 drivers/net/tun.c:621
tun_detach drivers/net/tun.c:637 [inline]
tun_chr_close+0x10a/0x1c0 drivers/net/tun.c:3433
__fput+0x449/0xa70 fs/file_table.c:465
task_work_run+0x1d1/0x260 kernel/task_work.c:227
resume_user_mode_work include/linux/resume_user_mode.h:50 [inline]
exit_to_user_mode_loop+0xec/0x110 kernel/entry/common.c:114
exit_to_user_mode_prepare include/linux/entry-common.h:330 [inline]
syscall_exit_to_user_mode_work include/linux/entry-common.h:414 [inline]
syscall_exit_to_user_mode include/linux/entry-common.h:449 [inline]
do_syscall_64+0x2bd/0x3b0 arch/x86/entry/syscall_64.c:100
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f1e3998e9a9
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:00007ffced335e18 EFLAGS: 00000246 ORIG_RAX: 00000000000001b4
RAX: 0000000000000000 RBX: 00007f1e39bb7ba0 RCX: 00007f1e3998e9a9
RDX: 0000000000000000 RSI: 000000000000001e RDI: 0000000000000003
RBP: 00007f1e39bb7ba0 R08: 0000000000000198 R09: 00000018ed33610f
R10: 00007f1e39bb7ac0 R11: 0000000000000246 R12: 00000000000430c6
R13: 00007ffced335f10 R14: ffffffffffffffff R15: 00007ffced335f30
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x5ae17
flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000000000 0000000000000000 dead000000000122 0000000000000000
raw: 0000000000000000 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 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 5974, tgid 5972 (syz.2.6), ts 82797744985, free_ts 198592525761
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x240/0x2a0 mm/page_alloc.c:1704
prep_new_page mm/page_alloc.c:1712 [inline]
get_page_from_freelist+0x21e4/0x22c0 mm/page_alloc.c:3669
__alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:4959
alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2419
alloc_slab_page mm/slub.c:2451 [inline]
allocate_slab+0x8a/0x3b0 mm/slub.c:2619
new_slab mm/slub.c:2673 [inline]
___slab_alloc+0xbfc/0x1480 mm/slub.c:3859
__slab_alloc mm/slub.c:3949 [inline]
__slab_alloc_node mm/slub.c:4024 [inline]
slab_alloc_node mm/slub.c:4185 [inline]
__kmalloc_cache_noprof+0x296/0x3d0 mm/slub.c:4354
kmalloc_noprof include/linux/slab.h:905 [inline]
kzalloc_noprof include/linux/slab.h:1039 [inline]
mca_alloc net/ipv6/mcast.c:876 [inline]
__ipv6_dev_mc_inc+0x44f/0xa50 net/ipv6/mcast.c:966
ipv6_add_dev+0xe54/0x1370 net/ipv6/addrconf.c:472
addrconf_notify+0x794/0x1010 net/ipv6/addrconf.c:3650
notifier_call_chain+0x1b3/0x3e0 kernel/notifier.c:85
call_netdevice_notifiers_extack net/core/dev.c:2267 [inline]
call_netdevice_notifiers net/core/dev.c:2281 [inline]
register_netdevice+0x1608/0x1ae0 net/core/dev.c:11234
tun_set_iff+0x844/0xef0 drivers/net/tun.c:2804
__tun_chr_ioctl+0x788/0x1df0 drivers/net/tun.c:3085
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:907 [inline]
__se_sys_ioctl+0xfc/0x170 fs/ioctl.c:893
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94
page last free pid 9405 tgid 9405 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
free_pages_prepare mm/page_alloc.c:1248 [inline]
__free_frozen_pages+0xc71/0xe70 mm/page_alloc.c:2706
__slab_free+0x326/0x400 mm/slub.c:4554
qlink_free mm/kasan/quarantine.c:163 [inline]
qlist_free_all+0x97/0x140 mm/kasan/quarantine.c:179
kasan_quarantine_reduce+0x148/0x160 mm/kasan/quarantine.c:286
__kasan_slab_alloc+0x22/0x80 mm/kasan/common.c:329
kasan_slab_alloc include/linux/kasan.h:250 [inline]
slab_post_alloc_hook mm/slub.c:4148 [inline]
slab_alloc_node mm/slub.c:4197 [inline]
kmem_cache_alloc_noprof+0x1c1/0x3c0 mm/slub.c:4204
getname_flags+0xb8/0x540 fs/namei.c:146
user_path_at+0x24/0x60 fs/namei.c:3135
do_utimes_path fs/utimes.c:95 [inline]
do_utimes+0x131/0x2a0 fs/utimes.c:140
__do_sys_utimensat fs/utimes.c:159 [inline]
__se_sys_utimensat fs/utimes.c:143 [inline]
__x64_sys_utimensat+0x14f/0x230 fs/utimes.c:143
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Memory state around the buggy address:
ffff88805ae17b00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ffff88805ae17b80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>ffff88805ae17c00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
^
ffff88805ae17c80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ffff88805ae17d00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
==================================================================
----------------
Code disassembly (best guess):
0: 65 48 8b 05 3d 70 01 mov %gs:0x1101703d(%rip),%rax # 0x11017045
7: 11
8: 48 3b 44 24 10 cmp 0x10(%rsp),%rax
d: 0f 84 26 fe ff ff je 0xfffffe39
13: e8 fd c7 ce 09 call 0x9cec815
18: e8 28 c9 ce 09 call 0x9cec945
1d: 41 f7 c7 00 02 00 00 test $0x200,%r15d
24: 74 bd je 0xffffffe3
26: fb sti
27: 40 84 ed test %bpl,%bpl
* 2a: 75 bc jne 0xffffffe8 <-- trapping instruction
2c: eb cd jmp 0xfffffffb
2e: 90 nop
2f: 0f 0b ud2
31: 90 nop
32: e9 19 ff ff ff jmp 0xffffff50
37: 90 nop
38: 0f 0b ud2
3a: 90 nop
3b: e9 2a ff ff ff jmp 0xffffff6a