==================================================================
BUG: KASAN: use-after-free in rose_timer_expiry+0x470/0x490 net/rose/rose_timer.c:183
Read of size 2 at addr ffff888020b1bc2a by task sed/7793
CPU: 0 PID: 7793 Comm: sed Not tainted 5.15.189-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/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:finish_lock_switch+0x134/0x280 kernel/sched/core.c:4785
Code: be ff ff ff ff e8 ec be 54 08 85 c0 74 4a 4d 85 ff 75 66 e9 fe 00 00 00 48 89 df e8 36 29 5e 08 e8 21 71 2a 00 fb 48 83 c4 08 <5b> 41 5c 41 5d 41 5e 41 5f 5d c3 48 89 df e8 99 10 fe ff 43 80 3c
RSP: 0018:ffffc90003e3ef08 EFLAGS: 00000282
RAX: e6c60eff5f44ad00 RBX: ffff8880b903a300 RCX: e6c60eff5f44ad00
RDX: dffffc0000000000 RSI: ffffffff8a0b15c0 RDI: ffffffff8a599340
RBP: 1ffff1101720760b R08: dffffc0000000000 R09: fffffbfff1ff6e1f
R10: fffffbfff1ff6e1f R11: 1ffffffff1ff6e1e R12: ffff8880b903b048
R13: dffffc0000000000 R14: ffff8880b903adc8 R15: 0000000000000000
finish_task_switch+0x12f/0x640 kernel/sched/core.c:4902
context_switch kernel/sched/core.c:5033 [inline]
__schedule+0x11c0/0x43b0 kernel/sched/core.c:6376
preempt_schedule_irq+0xb1/0x150 kernel/sched/core.c:6780
irqentry_exit+0x63/0x70 kernel/entry/common.c:432
asm_sysvec_reschedule_ipi+0x16/0x20 arch/x86/include/asm/idtentry.h:681
RIP: 0010:stack_trace_consume_entry+0x9e/0x270 kernel/stacktrace.c:93
Code: cc 41 0f b6 04 17 84 c0 0f 85 73 01 00 00 44 89 23 b0 01 e9 99 00 00 00 31 c0 e9 92 00 00 00 48 89 f8 48 c1 e8 03 80 3c 10 00 <74> 29 49 89 ff 48 89 74 24 08 49 89 d4 4c 89 04 24 4c 89 cb e8 e9
RSP: 0000:ffffc90003e3f2f8 EFLAGS: 00000246
RAX: 1ffff920007c7e80 RBX: ffffc90003e3f40c RCX: 0000000080000001
RDX: dffffc0000000000 RSI: ffffffff89c000ca RDI: ffffc90003e3f400
RBP: 1ffff920007c7e82 R08: ffffc90003e3f410 R09: 000000000000000d
R10: fffff520007c7e75 R11: 1ffff920007c7e73 R12: 0000000000000000
R13: 1ffff920007c7e81 R14: ffffc90003e3f408 R15: 1ffff920007c7e81
arch_stack_walk+0x100/0x140 arch/x86/kernel/stacktrace.c:27
stack_trace_save+0x98/0xe0 kernel/stacktrace.c:122
kasan_save_stack mm/kasan/common.c:38 [inline]
kasan_set_track mm/kasan/common.c:46 [inline]
set_alloc_info mm/kasan/common.c:434 [inline]
__kasan_slab_alloc+0x9c/0xd0 mm/kasan/common.c:467
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:3220 [inline]
slab_alloc mm/slub.c:3228 [inline]
kmem_cache_alloc+0x100/0x290 mm/slub.c:3233
vm_area_alloc+0x20/0xe0 kernel/fork.c:350
__mmap_region mm/mmap.c:1778 [inline]
mmap_region+0x945/0x15e0 mm/mmap.c:2929
do_mmap+0x77a/0xdf0 mm/mmap.c:1582
vm_mmap_pgoff+0x1b2/0x2b0 mm/util.c:551
load_elf_interp+0x5fb/0xdf0 fs/binfmt_elf.c:637
load_elf_binary+0x1caa/0x2890 fs/binfmt_elf.c:1227
search_binary_handler fs/exec.c:1742 [inline]
exec_binprm fs/exec.c:1783 [inline]
bprm_execve+0xa92/0x17d0 fs/exec.c:1852
do_execveat_common+0x51e/0x6d0 fs/exec.c:1957
do_execve fs/exec.c:2027 [inline]
__do_sys_execve fs/exec.c:2103 [inline]
__se_sys_execve fs/exec.c:2098 [inline]
__x64_sys_execve+0x8e/0xa0 fs/exec.c:2098
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:0x7f1bbe24b107
Code: Unable to access opcode bytes at RIP 0x7f1bbe24b0dd.
RSP: 002b:00007ffea478e9a8 EFLAGS: 00000246 ORIG_RAX: 000000000000003b
RAX: ffffffffffffffda RBX: 00005565864b5188 RCX: 00007f1bbe24b107
RDX: 00005565864b51b0 RSI: 00005565864b5188 RDI: 00005565864b5268
RBP: 00005565864b5268 R08: 00007ffea4794d65 R09: 0000000000000000
R10: 0000000000000008 R11: 0000000000000246 R12: 00005565864b51b0
R13: 00007f1bbe410e8b R14: 00005565864b51b0 R15: 0000000000000000
Allocated by task 4306:
kasan_save_stack mm/kasan/common.c:38 [inline]
kasan_set_track mm/kasan/common.c:46 [inline]
set_alloc_info mm/kasan/common.c:434 [inline]
____kasan_kmalloc mm/kasan/common.c:513 [inline]
__kasan_kmalloc+0xb5/0xf0 mm/kasan/common.c:522
kmalloc include/linux/slab.h:604 [inline]
rose_add_node+0x227/0xdb0 net/rose/rose_route.c:85
rose_rt_ioctl+0x9db/0xe20 net/rose/rose_route.c:738
rose_ioctl+0x27a/0x790 net/rose/af_rose.c:1372
sock_do_ioctl+0xd3/0x2f0 net/socket.c:1140
sock_ioctl+0x4ed/0x6e0 net/socket.c:1257
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
Freed by task 7760:
kasan_save_stack mm/kasan/common.c:38 [inline]
kasan_set_track+0x4b/0x70 mm/kasan/common.c:46
kasan_set_free_info+0x1f/0x40 mm/kasan/generic.c:360
____kasan_slab_free+0xd5/0x110 mm/kasan/common.c:366
kasan_slab_free include/linux/kasan.h:230 [inline]
slab_free_hook mm/slub.c:1705 [inline]
slab_free_freelist_hook+0xea/0x170 mm/slub.c:1731
slab_free mm/slub.c:3499 [inline]
kfree+0xef/0x2a0 mm/slub.c:4559
rose_rt_device_down+0x4e2/0x530 net/rose/rose_route.c:515
rose_device_event+0x5ec/0x680 net/rose/af_rose.c:247
notifier_call_chain kernel/notifier.c:83 [inline]
raw_notifier_call_chain+0xcb/0x160 kernel/notifier.c:391
call_netdevice_notifiers_extack net/core/dev.c:2061 [inline]
call_netdevice_notifiers net/core/dev.c:2075 [inline]
dev_close_many+0x28d/0x400 net/core/dev.c:1650
dev_close+0x14c/0x200 net/core/dev.c:1672
bpq_device_event+0x2f4/0x9c0 drivers/net/hamradio/bpqether.c:548
notifier_call_chain kernel/notifier.c:83 [inline]
raw_notifier_call_chain+0xcb/0x160 kernel/notifier.c:391
call_netdevice_notifiers_extack net/core/dev.c:2061 [inline]
call_netdevice_notifiers net/core/dev.c:2075 [inline]
dev_close_many+0x28d/0x400 net/core/dev.c:1650
dev_close+0x14c/0x200 net/core/dev.c:1672
bond_setup_by_slave+0x61/0x3a0 drivers/net/bonding/bond_main.c:1471
bond_enslave+0x77c/0x3a40 drivers/net/bonding/bond_main.c:1855
bond_do_ioctl+0x2a2/0x8c0 drivers/net/bonding/bond_main.c:4238
dev_ifsioc+0xc01/0xe70 net/core/dev_ioctl.c:417
dev_ioctl+0x55f/0xe50 net/core/dev_ioctl.c:587
sock_do_ioctl+0x222/0x2f0 net/socket.c:1154
sock_ioctl+0x4ed/0x6e0 net/socket.c:1257
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
The buggy address belongs to the object at ffff888020b1bc00
which belongs to the cache kmalloc-512 of size 512
The buggy address is located 42 bytes inside of
512-byte region [ffff888020b1bc00, ffff888020b1be00)
The buggy address belongs to the page:
page:ffffea000082c600 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff888020b18800 pfn:0x20b18
head:ffffea000082c600 order:2 compound_mapcount:0 compound_pincount:0
flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000010200 ffffea000171b508 ffffea00018a6e08 ffff888016841c80
raw: ffff888020b18800 000000000010000a 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 2, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 1, ts 6868353566, free_ts 0
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:5474
alloc_page_interleave+0x24/0x1e0 mm/mempolicy.c:2031
alloc_slab_page mm/slub.c:1775 [inline]
allocate_slab mm/slub.c:1912 [inline]
new_slab+0xc0/0x4b0 mm/slub.c:1975
___slab_alloc+0x81e/0xdf0 mm/slub.c:3008
__slab_alloc mm/slub.c:3095 [inline]
slab_alloc_node mm/slub.c:3186 [inline]
slab_alloc mm/slub.c:3228 [inline]
kmem_cache_alloc_trace+0x1a5/0x2a0 mm/slub.c:3245
kmalloc include/linux/slab.h:604 [inline]
kzalloc include/linux/slab.h:735 [inline]
device_private_init drivers/base/core.c:3256 [inline]
device_add+0xba/0xfb0 drivers/base/core.c:3306
device_create_groups_vargs drivers/base/core.c:4096 [inline]
device_create+0x258/0x2e0 drivers/base/core.c:4138
dma_heap_add+0x36a/0x720 drivers/dma-buf/dma-heap.c:264
system_heap_create+0x91/0xe0 drivers/dma-buf/heaps/system_heap.c:432
do_one_initcall+0x1ee/0x680 init/main.c:1302
do_initcall_level+0x137/0x1f0 init/main.c:1375
do_initcalls+0x4b/0x90 init/main.c:1391
kernel_init_freeable+0x3ce/0x560 init/main.c:1615
kernel_init+0x19/0x1b0 init/main.c:1506
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287
page_owner free stack trace missing
Memory state around the buggy address:
ffff888020b1bb00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff888020b1bb80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff888020b1bc00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff888020b1bc80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff888020b1bd00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
----------------
Code disassembly (best guess):
0: be ff ff ff ff mov $0xffffffff,%esi
5: e8 ec be 54 08 call 0x854bef6
a: 85 c0 test %eax,%eax
c: 74 4a je 0x58
e: 4d 85 ff test %r15,%r15
11: 75 66 jne 0x79
13: e9 fe 00 00 00 jmp 0x116
18: 48 89 df mov %rbx,%rdi
1b: e8 36 29 5e 08 call 0x85e2956
20: e8 21 71 2a 00 call 0x2a7146
25: fb sti
26: 48 83 c4 08 add $0x8,%rsp
* 2a: 5b pop %rbx <-- trapping instruction
2b: 41 5c pop %r12
2d: 41 5d pop %r13
2f: 41 5e pop %r14
31: 41 5f pop %r15
33: 5d pop %rbp
34: c3 ret
35: 48 89 df mov %rbx,%rdi
38: e8 99 10 fe ff call 0xfffe10d6
3d: 43 rex.XB
3e: 80 .byte 0x80
3f: 3c .byte 0x3c