==================================================================
BUG: KASAN: slab-use-after-free in rose_timer_expiry+0x45a/0x4d0 net/rose/rose_timer.c:183
Read of size 2 at addr ffff888029b7c82a by task syz.8.15790/26783
CPU: 1 UID: 0 PID: 26783 Comm: syz.8.15790 Not tainted syzkaller #0 PREEMPT(full)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025
Call Trace:
__dump_stack lib/dump_stack.c:94 [inline]
dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:120
print_address_description mm/kasan/report.c:378 [inline]
print_report+0xcd/0x630 mm/kasan/report.c:482
kasan_report+0xe0/0x110 mm/kasan/report.c:595
rose_timer_expiry+0x45a/0x4d0 net/rose/rose_timer.c:183
call_timer_fn+0x197/0x620 kernel/time/timer.c:1747
expire_timers kernel/time/timer.c:1798 [inline]
__run_timers+0x6ef/0x960 kernel/time/timer.c:2372
__run_timer_base kernel/time/timer.c:2384 [inline]
__run_timer_base kernel/time/timer.c:2376 [inline]
run_timer_base+0x114/0x190 kernel/time/timer.c:2393
run_timer_softirq+0x1a/0x40 kernel/time/timer.c:2403
handle_softirqs+0x216/0x8e0 kernel/softirq.c:579
__do_softirq kernel/softirq.c:613 [inline]
invoke_softirq kernel/softirq.c:453 [inline]
__irq_exit_rcu+0x109/0x170 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:finish_task_switch.isra.0+0x22a/0xc10 kernel/sched/core.c:5225
Code: fb 09 00 00 44 8b 05 e9 73 22 0f 45 85 c0 0f 85 be 01 00 00 4c 89 e7 e8 a4 f6 ff ff e8 9f 68 3a 00 fb 65 48 8b 1d 8e 65 4d 12 <48> 8d bb 18 16 00 00 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1
RSP: 0000:ffffc9001d1af4b8 EFLAGS: 00000206
RAX: 0000000000009c17 RBX: ffff88802579c880 RCX: ffffffff81c3721f
RDX: 0000000000000000 RSI: ffffffff8de50330 RDI: ffffffff8c162900
RBP: ffffc9001d1af500 R08: 0000000000000001 R09: 0000000000000001
R10: ffffffff90ab4c97 R11: 0000000000000000 R12: ffff8880b853a300
R13: ffff888062ed2440 R14: 0000000000000000 R15: dffffc0000000000
context_switch kernel/sched/core.c:5360 [inline]
__schedule+0x1198/0x5de0 kernel/sched/core.c:6961
__schedule_loop kernel/sched/core.c:7043 [inline]
schedule+0xe7/0x3a0 kernel/sched/core.c:7058
schedule_timeout+0x257/0x290 kernel/time/sleep_timeout.c:75
unix_wait_for_peer+0x245/0x280 net/unix/af_unix.c:1639
unix_dgram_sendmsg+0x1410/0x17f0 net/unix/af_unix.c:2273
sock_sendmsg_nosec net/socket.c:714 [inline]
__sock_sendmsg net/socket.c:729 [inline]
____sys_sendmsg+0xa98/0xc70 net/socket.c:2614
___sys_sendmsg+0x134/0x1d0 net/socket.c:2668
__sys_sendmmsg+0x200/0x420 net/socket.c:2757
__do_sys_sendmmsg net/socket.c:2784 [inline]
__se_sys_sendmmsg net/socket.c:2781 [inline]
__x64_sys_sendmmsg+0x9c/0x100 net/socket.c:2781
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xcd/0x4c0 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f2d67b8ebe9
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:00007f2d68a8f038 EFLAGS: 00000246 ORIG_RAX: 0000000000000133
RAX: ffffffffffffffda RBX: 00007f2d67db5fa0 RCX: 00007f2d67b8ebe9
RDX: 0000000000000651 RSI: 0000200000000000 RDI: 0000000000000007
RBP: 00007f2d67c11e19 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f2d67db6038 R14: 00007f2d67db5fa0 R15: 00007fff5d734c28
Allocated by task 24646:
kasan_save_stack+0x33/0x60 mm/kasan/common.c:47
kasan_save_track+0x14/0x30 mm/kasan/common.c:68
poison_kmalloc_redzone mm/kasan/common.c:388 [inline]
__kasan_kmalloc+0xaa/0xb0 mm/kasan/common.c:405
kmalloc_noprof include/linux/slab.h:905 [inline]
rose_add_node net/rose/rose_route.c:85 [inline]
rose_rt_ioctl+0x87e/0x1d40 net/rose/rose_route.c:740
rose_ioctl+0x64d/0x7d0 net/rose/af_rose.c:1380
sock_do_ioctl+0x118/0x280 net/socket.c:1238
sock_ioctl+0x227/0x6b0 net/socket.c:1359
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:598 [inline]
__se_sys_ioctl fs/ioctl.c:584 [inline]
__x64_sys_ioctl+0x18b/0x210 fs/ioctl.c:584
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xcd/0x4c0 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Freed by task 26569:
kasan_save_stack+0x33/0x60 mm/kasan/common.c:47
kasan_save_track+0x14/0x30 mm/kasan/common.c:68
kasan_save_free_info+0x3b/0x60 mm/kasan/generic.c:576
poison_slab_object mm/kasan/common.c:243 [inline]
__kasan_slab_free+0x60/0x70 mm/kasan/common.c:275
kasan_slab_free include/linux/kasan.h:233 [inline]
slab_free_hook mm/slub.c:2417 [inline]
slab_free mm/slub.c:4680 [inline]
kfree+0x2b4/0x4d0 mm/slub.c:4879
rose_remove_neigh+0x25e/0x370 net/rose/rose_route.c:240
rose_rt_device_down+0x2dc/0x430 net/rose/rose_route.c:515
rose_device_event+0xfc/0x120 net/rose/af_rose.c:248
notifier_call_chain+0xbc/0x410 kernel/notifier.c:85
call_netdevice_notifiers_info+0xbe/0x140 net/core/dev.c:2229
call_netdevice_notifiers_extack net/core/dev.c:2267 [inline]
call_netdevice_notifiers net/core/dev.c:2281 [inline]
netif_close_many+0x319/0x630 net/core/dev.c:1784
netif_close net/core/dev.c:1797 [inline]
netif_close+0x17f/0x230 net/core/dev.c:1791
dev_close+0xaa/0x240 net/core/dev_api.c:220
bpq_device_event+0x6a9/0x910 drivers/net/hamradio/bpqether.c:528
notifier_call_chain+0xbc/0x410 kernel/notifier.c:85
call_netdevice_notifiers_info+0xbe/0x140 net/core/dev.c:2229
call_netdevice_notifiers_extack net/core/dev.c:2267 [inline]
call_netdevice_notifiers net/core/dev.c:2281 [inline]
netif_close_many+0x319/0x630 net/core/dev.c:1784
netif_close net/core/dev.c:1797 [inline]
netif_close+0x17f/0x230 net/core/dev.c:1791
dev_close+0xaa/0x240 net/core/dev_api.c:220
bond_setup_by_slave drivers/net/bonding/bond_main.c:1639 [inline]
bond_enslave+0x1f4c/0x60b0 drivers/net/bonding/bond_main.c:2051
bond_do_ioctl+0x601/0x6c0 drivers/net/bonding/bond_main.c:4714
bond_siocdevprivate+0x167/0x200 drivers/net/bonding/bond_main.c:4745
dev_siocdevprivate net/core/dev_ioctl.c:521 [inline]
dev_ifsioc+0x8ee/0x1f70 net/core/dev_ioctl.c:633
dev_ioctl+0x1b2/0x10e0 net/core/dev_ioctl.c:851
sock_ioctl+0x5b3/0x6b0 net/socket.c:1284
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:598 [inline]
__se_sys_ioctl fs/ioctl.c:584 [inline]
__x64_sys_ioctl+0x18b/0x210 fs/ioctl.c:584
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xcd/0x4c0 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
The buggy address belongs to the object at ffff888029b7c800
which belongs to the cache kmalloc-512 of size 512
The buggy address is located 42 bytes inside of
freed 512-byte region [ffff888029b7c800, ffff888029b7ca00)
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff888029b7f000 pfn:0x29b7c
head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
flags: 0xfff00000000240(workingset|head|node=0|zone=1|lastcpupid=0x7ff)
page_type: f5(slab)
raw: 00fff00000000240 ffff88801b841c80 ffffea0001385710 ffff88801b8407c8
raw: ffff888029b7f000 000000000010000f 00000000f5000000 0000000000000000
head: 00fff00000000240 ffff88801b841c80 ffffea0001385710 ffff88801b8407c8
head: ffff888029b7f000 000000000010000f 00000000f5000000 0000000000000000
head: 00fff00000000002 ffffea0000a6df01 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 0xd2000(__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 1, tgid 1 (swapper/0), ts 9376012952, free_ts 0
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x1c0/0x230 mm/page_alloc.c:1851
prep_new_page mm/page_alloc.c:1859 [inline]
get_page_from_freelist+0x132b/0x38e0 mm/page_alloc.c:3858
__alloc_frozen_pages_noprof+0x261/0x23f0 mm/page_alloc.c:5148
alloc_pages_mpol+0x1fb/0x550 mm/mempolicy.c:2416
alloc_slab_page mm/slub.c:2487 [inline]
allocate_slab mm/slub.c:2655 [inline]
new_slab+0x247/0x330 mm/slub.c:2709
___slab_alloc+0xcf2/0x1740 mm/slub.c:3891
__slab_alloc.constprop.0+0x56/0xb0 mm/slub.c:3981
__slab_alloc_node mm/slub.c:4056 [inline]
slab_alloc_node mm/slub.c:4217 [inline]
__kmalloc_cache_noprof+0xfb/0x3e0 mm/slub.c:4391
kmalloc_noprof include/linux/slab.h:905 [inline]
usb_cache_string+0x5d/0x150 drivers/usb/core/message.c:1028
usb_enumerate_device drivers/usb/core/hub.c:2536 [inline]
usb_new_device+0x169/0x1a60 drivers/usb/core/hub.c:2664
register_root_hub+0x299/0x730 drivers/usb/core/hcd.c:994
usb_add_hcd+0xaf2/0x1730 drivers/usb/core/hcd.c:2993
dummy_hcd_probe+0x15c/0x380 drivers/usb/gadget/udc/dummy_hcd.c:2694
platform_probe+0x103/0x1d0 drivers/base/platform.c:1405
call_driver_probe drivers/base/dd.c:581 [inline]
really_probe+0x241/0xa90 drivers/base/dd.c:659
__driver_probe_device+0x1de/0x440 drivers/base/dd.c:801
page_owner free stack trace missing
Memory state around the buggy address:
ffff888029b7c700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff888029b7c780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff888029b7c800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff888029b7c880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff888029b7c900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
----------------
Code disassembly (best guess):
0: fb sti
1: 09 00 or %eax,(%rax)
3: 00 44 8b 05 add %al,0x5(%rbx,%rcx,4)
7: e9 73 22 0f 45 jmp 0x450f227f
c: 85 c0 test %eax,%eax
e: 0f 85 be 01 00 00 jne 0x1d2
14: 4c 89 e7 mov %r12,%rdi
17: e8 a4 f6 ff ff call 0xfffff6c0
1c: e8 9f 68 3a 00 call 0x3a68c0
21: fb sti
22: 65 48 8b 1d 8e 65 4d mov %gs:0x124d658e(%rip),%rbx # 0x124d65b8
29: 12
* 2a: 48 8d bb 18 16 00 00 lea 0x1618(%rbx),%rdi <-- trapping instruction
31: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax
38: fc ff df
3b: 48 89 fa mov %rdi,%rdx
3e: 48 rex.W
3f: c1 .byte 0xc1