==================================================================
BUG: KASAN: slab-use-after-free in rose_timer_expiry+0x46f/0x4b0 net/rose/rose_timer.c:183
Read of size 2 at addr ffff88814d8d3c2a by task syz-executor201/12566
CPU: 1 UID: 0 PID: 12566 Comm: syz-executor201 Not tainted 6.16.0-rc7-syzkaller-00120-g5f33ebd2018c #0 PREEMPT(full)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/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/0x240 mm/kasan/report.c:482
kasan_report+0x118/0x150 mm/kasan/report.c:595
rose_timer_expiry+0x46f/0x4b0 net/rose/rose_timer.c:183
call_timer_fn+0x17b/0x5e0 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/0x860 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+0xa4/0xc0 arch/x86/kernel/apic/apic.c:1050
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702
RIP: 0010:__prepend_path fs/d_path.c:110 [inline]
RIP: 0010:prepend_path+0x33e/0x970 fs/d_path.c:172
Code: 3b 23 0f 84 5d 01 00 00 e8 ff eb 7d ff 4d 8d 77 50 4c 89 f0 48 c1 e8 03 42 80 3c 28 00 74 08 4c 89 f7 e8 45 0d e0 ff 49 8b 1e <4c> 89 e0 48 c1 e8 03 42 80 3c 28 00 74 08 4c 89 e7 e8 2c 0d e0 ff
RSP: 0018:ffffc9000decf498 EFLAGS: 00000246
RAX: 1ffff1100b5e9a6d RBX: ffff88805ad70a48 RCX: ffff88807eae0000
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: ffffc9000decf568 R08: ffffffff8f3675f7 R09: 1ffffffff1e6cebe
R10: dffffc0000000000 R11: fffffbfff1e6cebf R12: ffff888032dd0c60
R13: dffffc0000000000 R14: ffff88805af4d368 R15: ffff88805af4d318
d_absolute_path+0xa1/0x140 fs/d_path.c:234
tomoyo_get_absolute_path security/tomoyo/realpath.c:101 [inline]
tomoyo_realpath_from_path+0x2c8/0x5d0 security/tomoyo/realpath.c:271
tomoyo_get_realpath security/tomoyo/file.c:151 [inline]
tomoyo_check_open_permission+0x1c1/0x3b0 security/tomoyo/file.c:771
security_file_open+0xb1/0x270 security/security.c:3114
do_dentry_open+0x360/0x1940 fs/open.c:941
vfs_open+0x3b/0x340 fs/open.c:1094
do_open fs/namei.c:3896 [inline]
path_openat+0x2ee1/0x3830 fs/namei.c:4055
do_filp_open+0x1fa/0x410 fs/namei.c:4082
do_sys_openat2+0x121/0x1c0 fs/open.c:1437
do_sys_open fs/open.c:1452 [inline]
__do_sys_openat fs/open.c:1468 [inline]
__se_sys_openat fs/open.c:1463 [inline]
__x64_sys_openat+0x138/0x170 fs/open.c:1463
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0x8a/0x300 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x76/0x7e
RIP: 0033:0x7f60d37a9199
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 c1 1a 00 00 90 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 b0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f60d375a218 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 00007f60d3831428 RCX: 00007f60d37a9199
RDX: 0000000000000000 RSI: 0000200000000300 RDI: ffffffffffffff9c
RBP: 00007f60d3831420 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f60d37fd654
R13: 000020000000010b R14: 0000200000000106 R15: 0000200000000100
Allocated by task 6878:
kasan_save_stack mm/kasan/common.c:47 [inline]
kasan_save_track+0x3e/0x80 mm/kasan/common.c:68
poison_kmalloc_redzone mm/kasan/common.c:377 [inline]
__kasan_kmalloc+0x93/0xb0 mm/kasan/common.c:394
kasan_kmalloc include/linux/kasan.h:260 [inline]
__kmalloc_cache_noprof+0x230/0x3d0 mm/slub.c:4359
kmalloc_noprof include/linux/slab.h:905 [inline]
rose_add_node+0x23a/0xde0 net/rose/rose_route.c:85
rose_rt_ioctl+0xa48/0xfb0 net/rose/rose_route.c:740
rose_ioctl+0x3ce/0x8b0 net/rose/af_rose.c:1380
sock_do_ioctl+0xd9/0x300 net/socket.c:1190
sock_ioctl+0x576/0x790 net/socket.c:1311
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+0x8a/0x300 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x76/0x7e
Freed by task 12535:
kasan_save_stack mm/kasan/common.c:47 [inline]
kasan_save_track+0x3e/0x80 mm/kasan/common.c:68
kasan_save_free_info+0x46/0x50 mm/kasan/generic.c:576
poison_slab_object mm/kasan/common.c:247 [inline]
__kasan_slab_free+0x62/0x70 mm/kasan/common.c:264
kasan_slab_free include/linux/kasan.h:233 [inline]
slab_free_hook mm/slub.c:2381 [inline]
slab_free mm/slub.c:4643 [inline]
kfree+0x18e/0x440 mm/slub.c:4842
rose_rt_device_down+0x473/0x4c0 net/rose/rose_route.c:515
rose_device_event+0x603/0x6a0 net/rose/af_rose.c:248
notifier_call_chain+0x1b3/0x3d0 kernel/notifier.c:85
call_netdevice_notifiers_extack net/core/dev.c:2268 [inline]
call_netdevice_notifiers net/core/dev.c:2282 [inline]
__dev_notify_flags+0x18d/0x2e0 net/core/dev.c:-1
netif_change_flags+0xe8/0x1a0 net/core/dev.c:9526
dev_change_flags+0x130/0x260 net/core/dev_api.c:68
dev_ioctl+0x7b4/0x1150 net/core/dev_ioctl.c:823
sock_do_ioctl+0x22c/0x300 net/socket.c:1204
sock_ioctl+0x576/0x790 net/socket.c:1311
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+0x8a/0x300 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x76/0x7e
The buggy address belongs to the object at ffff88814d8d3c00
which belongs to the cache kmalloc-512 of size 512
The buggy address is located 42 bytes inside of
freed 512-byte region [ffff88814d8d3c00, ffff88814d8d3e00)
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff88814d8d2400 pfn:0x14d8d0
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 ffff888019c41c80 ffffea000512c110 ffffea0005329910
raw: ffff88814d8d2400 000000000010000d 00000000f5000000 0000000000000000
head: 057ff00000000240 ffff888019c41c80 ffffea000512c110 ffffea0005329910
head: ffff88814d8d2400 000000000010000d 00000000f5000000 0000000000000000
head: 057ff00000000002 ffffea0005363401 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 0xd2040(__GFP_IO|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 1, tgid 1 (swapper/0), ts 27530082507, free_ts 0
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+0x2b37/0x2ce0 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/0x3a0 mm/slub.c:2619
new_slab mm/slub.c:2673 [inline]
___slab_alloc+0xc48/0x14d0 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]
__do_kmalloc_node mm/slub.c:4327 [inline]
__kmalloc_noprof+0x305/0x4f0 mm/slub.c:4340
kmalloc_noprof include/linux/slab.h:909 [inline]
kzalloc_noprof include/linux/slab.h:1039 [inline]
tomoyo_init_log+0x1a6e/0x1f70 security/tomoyo/audit.c:275
tomoyo_write_log2+0x3e0/0x910 security/tomoyo/audit.c:376
tomoyo_supervisor+0x178/0x1480 security/tomoyo/common.c:2174
tomoyo_audit_path_log security/tomoyo/file.c:168 [inline]
tomoyo_path_permission+0x25a/0x380 security/tomoyo/file.c:587
tomoyo_path_perm+0x347/0x4b0 security/tomoyo/file.c:838
security_path_chroot+0x89/0x270 security/security.c:2093
init_chroot+0x17e/0x230 fs/init.c:73
kernel_init_freeable+0x41a/0x570 init/main.c:1597
kernel_init+0x1d/0x1d0 init/main.c:1474
page_owner free stack trace missing
Memory state around the buggy address:
ffff88814d8d3b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff88814d8d3b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff88814d8d3c00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff88814d8d3c80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff88814d8d3d00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
----------------
Code disassembly (best guess):
0: 3b 23 cmp (%rbx),%esp
2: 0f 84 5d 01 00 00 je 0x165
8: e8 ff eb 7d ff call 0xff7dec0c
d: 4d 8d 77 50 lea 0x50(%r15),%r14
11: 4c 89 f0 mov %r14,%rax
14: 48 c1 e8 03 shr $0x3,%rax
18: 42 80 3c 28 00 cmpb $0x0,(%rax,%r13,1)
1d: 74 08 je 0x27
1f: 4c 89 f7 mov %r14,%rdi
22: e8 45 0d e0 ff call 0xffe00d6c
27: 49 8b 1e mov (%r14),%rbx
* 2a: 4c 89 e0 mov %r12,%rax <-- trapping instruction
2d: 48 c1 e8 03 shr $0x3,%rax
31: 42 80 3c 28 00 cmpb $0x0,(%rax,%r13,1)
36: 74 08 je 0x40
38: 4c 89 e7 mov %r12,%rdi
3b: e8 2c 0d e0 ff call 0xffe00d6c