==================================================================
BUG: KASAN: slab-use-after-free in rose_send_frame+0x29a/0x2c0 net/rose/rose_link.c:101
Read of size 8 at addr ffff888059300420 by task kworker/u8:8/16948
CPU: 0 UID: 0 PID: 16948 Comm: kworker/u8:8 Tainted: G L syzkaller #0 PREEMPT(full)
Tainted: [L]=SOFTLOCKUP
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/25/2025
Workqueue: events_unbound nsim_dev_trap_report_work
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_send_frame+0x29a/0x2c0 net/rose/rose_link.c:101
rose_transmit_restart_request+0x1b8/0x240 net/rose/rose_link.c:198
rose_t0timer_expiry+0x1d/0x150 net/rose/rose_link.c:83
call_timer_fn+0x19a/0x5a0 kernel/time/timer.c:1748
expire_timers kernel/time/timer.c:1799 [inline]
__run_timers+0x74a/0xae0 kernel/time/timer.c:2373
__run_timer_base kernel/time/timer.c:2385 [inline]
__run_timer_base kernel/time/timer.c:2377 [inline]
run_timer_base+0x114/0x190 kernel/time/timer.c:2394
run_timer_softirq+0x1a/0x40 kernel/time/timer.c:2404
handle_softirqs+0x219/0x950 kernel/softirq.c:622
__do_softirq kernel/softirq.c:656 [inline]
invoke_softirq kernel/softirq.c:496 [inline]
__irq_exit_rcu+0x109/0x170 kernel/softirq.c:723
irq_exit_rcu+0x9/0x30 kernel/softirq.c:739
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1056 [inline]
sysvec_apic_timer_interrupt+0xa4/0xc0 arch/x86/kernel/apic/apic.c:1056
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:697
RIP: 0010:in_aton+0xa4/0x150 net/core/utils.c:61
Code: 44 89 f8 5b 5d 0f c8 41 5c 41 5d 41 5e 41 5f c3 cc cc cc cc 45 31 e4 eb 53 e8 28 f0 6e f8 89 de bf 0a 00 00 00 e8 5c ea 6e f8 <80> fb 0a 74 53 e8 12 f0 6e f8 48 83 c5 01 43 8d 04 a4 44 8d 64 43
RSP: 0018:ffffc9000c937ae8 EFLAGS: 00000293
RAX: 0000000000000000 RBX: 0000000000000032 RCX: ffffffff894ff654
RDX: ffff8880280a4980 RSI: 000000000000000a RDI: 0000000000000001
RBP: ffffffff8c50ab86 R08: 0000000000000001 R09: 000000000000000a
R10: 0000000000000032 R11: ff3cc5d23e5bf983 R12: 0000000000000000
R13: 0000000000000002 R14: dffffc0000000000 R15: 0000000000c00000
nsim_dev_trap_skb_build drivers/net/netdevsim/dev.c:833 [inline]
nsim_dev_trap_report drivers/net/netdevsim/dev.c:875 [inline]
nsim_dev_trap_report_work+0x549/0xcf0 drivers/net/netdevsim/dev.c:921
process_one_work+0x9ba/0x1b20 kernel/workqueue.c:3257
process_scheduled_works kernel/workqueue.c:3340 [inline]
worker_thread+0x6c8/0xf10 kernel/workqueue.c:3421
kthread+0x3c5/0x780 kernel/kthread.c:463
ret_from_fork+0x983/0xb10 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:246
Allocated by task 16105:
kasan_save_stack+0x33/0x60 mm/kasan/common.c:56
kasan_save_track+0x14/0x30 mm/kasan/common.c:77
poison_kmalloc_redzone mm/kasan/common.c:397 [inline]
__kasan_kmalloc+0xaa/0xb0 mm/kasan/common.c:414
kmalloc_noprof include/linux/slab.h:957 [inline]
rose_add_node net/rose/rose_route.c:85 [inline]
rose_rt_ioctl+0x880/0x2580 net/rose/rose_route.c:748
rose_ioctl+0x64d/0x7c0 net/rose/af_rose.c:1382
sock_do_ioctl+0x118/0x280 net/socket.c:1254
sock_ioctl+0x227/0x6b0 net/socket.c:1375
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:597 [inline]
__se_sys_ioctl fs/ioctl.c:583 [inline]
__x64_sys_ioctl+0x18e/0x210 fs/ioctl.c:583
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xcd/0xf80 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Freed by task 18358:
kasan_save_stack+0x33/0x60 mm/kasan/common.c:56
kasan_save_track+0x14/0x30 mm/kasan/common.c:77
kasan_save_free_info+0x3b/0x60 mm/kasan/generic.c:584
poison_slab_object mm/kasan/common.c:252 [inline]
__kasan_slab_free+0x5f/0x80 mm/kasan/common.c:284
kasan_slab_free include/linux/kasan.h:234 [inline]
slab_free_hook mm/slub.c:2540 [inline]
slab_free mm/slub.c:6670 [inline]
kfree+0x2f8/0x6e0 mm/slub.c:6878
rose_neigh_put include/net/rose.h:166 [inline]
rose_timer_expiry+0x53f/0x630 net/rose/rose_timer.c:183
call_timer_fn+0x19a/0x5a0 kernel/time/timer.c:1748
expire_timers kernel/time/timer.c:1799 [inline]
__run_timers+0x74a/0xae0 kernel/time/timer.c:2373
__run_timer_base kernel/time/timer.c:2385 [inline]
__run_timer_base kernel/time/timer.c:2377 [inline]
run_timer_base+0x114/0x190 kernel/time/timer.c:2394
run_timer_softirq+0x1a/0x40 kernel/time/timer.c:2404
handle_softirqs+0x219/0x950 kernel/softirq.c:622
__do_softirq kernel/softirq.c:656 [inline]
invoke_softirq kernel/softirq.c:496 [inline]
__irq_exit_rcu+0x109/0x170 kernel/softirq.c:723
irq_exit_rcu+0x9/0x30 kernel/softirq.c:739
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1056 [inline]
sysvec_apic_timer_interrupt+0xa4/0xc0 arch/x86/kernel/apic/apic.c:1056
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:697
The buggy address belongs to the object at ffff888059300400
which belongs to the cache kmalloc-512 of size 512
The buggy address is located 32 bytes inside of
freed 512-byte region [ffff888059300400, ffff888059300600)
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x59300
head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
flags: 0xfff00000000040(head|node=0|zone=1|lastcpupid=0x7ff)
page_type: f5(slab)
raw: 00fff00000000040 ffff88813ff26c80 ffffea000100bd00 dead000000000002
raw: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000
head: 00fff00000000040 ffff88813ff26c80 ffffea000100bd00 dead000000000002
head: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000
head: 00fff00000000002 ffffea000164c001 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 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 5818, tgid 5818 (syz-executor), ts 70103746940, free_ts 16504034817
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x1af/0x220 mm/page_alloc.c:1846
prep_new_page mm/page_alloc.c:1854 [inline]
get_page_from_freelist+0xd0b/0x31a0 mm/page_alloc.c:3915
__alloc_frozen_pages_noprof+0x25f/0x2430 mm/page_alloc.c:5210
alloc_pages_mpol+0x1fb/0x550 mm/mempolicy.c:2486
alloc_slab_page mm/slub.c:3075 [inline]
allocate_slab mm/slub.c:3248 [inline]
new_slab+0x2c3/0x430 mm/slub.c:3302
___slab_alloc+0xe18/0x1c90 mm/slub.c:4656
__slab_alloc.constprop.0+0x63/0x110 mm/slub.c:4779
__slab_alloc_node mm/slub.c:4855 [inline]
slab_alloc_node mm/slub.c:5251 [inline]
__kmalloc_cache_noprof+0x485/0x800 mm/slub.c:5771
kmalloc_noprof include/linux/slab.h:957 [inline]
kzalloc_noprof include/linux/slab.h:1094 [inline]
device_private_init drivers/base/core.c:3534 [inline]
device_add+0xcf2/0x1980 drivers/base/core.c:3585
netdev_register_kobject+0x1a9/0x3d0 net/core/net-sysfs.c:2358
register_netdevice+0x13ac/0x21d0 net/core/dev.c:11391
virt_wifi_newlink+0x43e/0xa10 drivers/net/wireless/virtual/virt_wifi.c:571
rtnl_newlink_create net/core/rtnetlink.c:3840 [inline]
__rtnl_newlink net/core/rtnetlink.c:3957 [inline]
rtnl_newlink+0xc19/0x1f50 net/core/rtnetlink.c:4072
rtnetlink_rcv_msg+0x95e/0xe90 net/core/rtnetlink.c:6958
netlink_rcv_skb+0x158/0x420 net/netlink/af_netlink.c:2550
netlink_unicast_kernel net/netlink/af_netlink.c:1318 [inline]
netlink_unicast+0x5aa/0x870 net/netlink/af_netlink.c:1344
page last free pid 1 tgid 1 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
free_pages_prepare mm/page_alloc.c:1395 [inline]
__free_frozen_pages+0x7df/0x1170 mm/page_alloc.c:2943
__free_pages mm/page_alloc.c:5329 [inline]
free_contig_range+0x183/0x4a0 mm/page_alloc.c:7197
destroy_args+0xb95/0x14e0 mm/debug_vm_pgtable.c:983
debug_vm_pgtable+0x2220/0x38d0 mm/debug_vm_pgtable.c:1372
do_one_initcall+0x123/0x680 init/main.c:1378
do_initcall_level init/main.c:1440 [inline]
do_initcalls init/main.c:1456 [inline]
do_basic_setup init/main.c:1475 [inline]
kernel_init_freeable+0x5c8/0x920 init/main.c:1688
kernel_init+0x1c/0x2b0 init/main.c:1578
ret_from_fork+0x983/0xb10 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:246
Memory state around the buggy address:
ffff888059300300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff888059300380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff888059300400: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff888059300480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff888059300500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
----------------
Code disassembly (best guess):
0: 44 89 f8 mov %r15d,%eax
3: 5b pop %rbx
4: 5d pop %rbp
5: 0f c8 bswap %eax
7: 41 5c pop %r12
9: 41 5d pop %r13
b: 41 5e pop %r14
d: 41 5f pop %r15
f: c3 ret
10: cc int3
11: cc int3
12: cc int3
13: cc int3
14: 45 31 e4 xor %r12d,%r12d
17: eb 53 jmp 0x6c
19: e8 28 f0 6e f8 call 0xf86ef046
1e: 89 de mov %ebx,%esi
20: bf 0a 00 00 00 mov $0xa,%edi
25: e8 5c ea 6e f8 call 0xf86eea86
* 2a: 80 fb 0a cmp $0xa,%bl <-- trapping instruction
2d: 74 53 je 0x82
2f: e8 12 f0 6e f8 call 0xf86ef046
34: 48 83 c5 01 add $0x1,%rbp
38: 43 8d 04 a4 lea (%r12,%r12,4),%eax
3c: 44 rex.R
3d: 8d .byte 0x8d
3e: 64 fs
3f: 43 rex.XB