==================================================================
BUG: KASAN: slab-use-after-free in rose_send_frame+0xad/0x220 net/rose/rose_link.c:105
Read of size 8 at addr ffff888052cc2418 by task syz.2.10509/10202
CPU: 0 UID: 0 PID: 10202 Comm: syz.2.10509 Not tainted syzkaller #0 PREEMPT(full)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/18/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_send_frame+0xad/0x220 net/rose/rose_link.c:105
rose_transmit_restart_request net/rose/rose_link.c:198 [inline]
rose_t0timer_expiry+0x143/0x350 net/rose/rose_link.c:83
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+0x283/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:unwind_next_frame+0x34e/0x2390 arch/x86/kernel/unwind_orc.c:495
Code: 8f 0f 83 48 11 00 00 48 c7 c0 bc 05 b1 8f 49 29 c5 48 c7 c6 04 d1 29 90 49 c1 fd 02 4a 8d 14 6d 00 00 00 00 4c 01 ea 48 01 d2 <48> 01 f2 48 bd 00 00 00 00 00 fc ff df 0f 84 37 01 00 00 4c 8d 62
RSP: 0018:ffffc9000ada6f38 EFLAGS: 00000246
RAX: ffffffff9010e61c RBX: ffffffff9010e620 RCX: ffffffff9010e624
RDX: 0000000000000000 RSI: ffffffff90b9a19a RDI: ffffffff8be33f20
RBP: ffffffff9010e624 R08: 0000000000000004 R09: ffffffff8172c195
R10: ffffc9000ada7058 R11: ffffffff81ac3c30 R12: ffffffff8960731a
R13: 0000000000000000 R14: ffffc9000ada7008 R15: ffffffff9010e620
arch_stack_walk+0x11c/0x150 arch/x86/kernel/stacktrace.c:25
stack_trace_save+0x9c/0xe0 kernel/stacktrace.c:122
kasan_save_stack mm/kasan/common.c:47 [inline]
kasan_save_track+0x3e/0x80 mm/kasan/common.c:68
unpoison_slab_object mm/kasan/common.c:330 [inline]
__kasan_slab_alloc+0x6c/0x80 mm/kasan/common.c:356
kasan_slab_alloc include/linux/kasan.h:250 [inline]
slab_post_alloc_hook mm/slub.c:4191 [inline]
slab_alloc_node mm/slub.c:4240 [inline]
kmem_cache_alloc_noprof+0x1c1/0x3c0 mm/slub.c:4247
__kernfs_new_node+0xd7/0x7e0 fs/kernfs/dir.c:637
kernfs_new_node+0x102/0x210 fs/kernfs/dir.c:713
__kernfs_create_file+0x4b/0x2e0 fs/kernfs/file.c:1057
sysfs_add_file_mode_ns+0x238/0x300 fs/sysfs/file.c:319
create_files fs/sysfs/group.c:76 [inline]
internal_create_group+0x66d/0x1110 fs/sysfs/group.c:183
internal_create_groups fs/sysfs/group.c:223 [inline]
sysfs_create_groups+0x59/0x120 fs/sysfs/group.c:249
setup_port drivers/infiniband/core/sysfs.c:1247 [inline]
ib_setup_port_attrs+0xd96/0x2070 drivers/infiniband/core/sysfs.c:1433
add_one_compat_dev+0x3d6/0x5c0 drivers/infiniband/core/device.c:1005
rdma_dev_init_net+0x1dd/0x270 drivers/infiniband/core/device.c:1221
ops_init+0x359/0x5c0 net/core/net_namespace.c:136
setup_net+0x10c/0x320 net/core/net_namespace.c:438
copy_net_ns+0x31b/0x4d0 net/core/net_namespace.c:570
create_new_namespaces+0x3f3/0x720 kernel/nsproxy.c:110
unshare_nsproxy_namespaces+0x11c/0x170 kernel/nsproxy.c:218
ksys_unshare+0x4c8/0x8c0 kernel/fork.c:3127
__do_sys_unshare kernel/fork.c:3198 [inline]
__se_sys_unshare kernel/fork.c:3196 [inline]
__x64_sys_unshare+0x38/0x50 kernel/fork.c:3196
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
RIP: 0033:0x7fc4af78eec9
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:00007fc4b062a038 EFLAGS: 00000246 ORIG_RAX: 0000000000000110
RAX: ffffffffffffffda RBX: 00007fc4af9e5fa0 RCX: 00007fc4af78eec9
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 000000006a040000
RBP: 00007fc4af811f91 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fc4af9e6038 R14: 00007fc4af9e5fa0 R15: 00007fff62f40228
Allocated by task 6358:
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:388 [inline]
__kasan_kmalloc+0x93/0xb0 mm/kasan/common.c:405
kasan_kmalloc include/linux/kasan.h:260 [inline]
__kmalloc_cache_noprof+0x230/0x3d0 mm/slub.c:4407
kmalloc_noprof include/linux/slab.h:905 [inline]
rose_add_node+0x23a/0xeb0 net/rose/rose_route.c:85
rose_rt_ioctl+0xce2/0x1240 net/rose/rose_route.c:748
rose_ioctl+0x3ce/0x8b0 net/rose/af_rose.c:1381
sock_do_ioctl+0xdc/0x300 net/socket.c:1251
sock_ioctl+0x576/0x790 net/socket.c:1372
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:598 [inline]
__se_sys_ioctl+0xf9/0x170 fs/ioctl.c:584
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
Freed by task 10208:
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:243 [inline]
__kasan_slab_free+0x5b/0x80 mm/kasan/common.c:275
kasan_slab_free include/linux/kasan.h:233 [inline]
slab_free_hook mm/slub.c:2422 [inline]
slab_free mm/slub.c:4695 [inline]
kfree+0x18e/0x440 mm/slub.c:4894
rose_neigh_put include/net/rose.h:166 [inline]
rose_timer_expiry+0x4cb/0x600 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+0x283/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
The buggy address belongs to the object at ffff888052cc2400
which belongs to the cache kmalloc-512 of size 512
The buggy address is located 24 bytes inside of
freed 512-byte region [ffff888052cc2400, ffff888052cc2600)
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff888052cc1800 pfn:0x52cc0
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 ffff88801a441c80 ffffea0001549910 ffffea0001e3f510
raw: ffff888052cc1800 0000000000100001 00000000f5000000 0000000000000000
head: 00fff00000000240 ffff88801a441c80 ffffea0001549910 ffffea0001e3f510
head: ffff888052cc1800 0000000000100001 00000000f5000000 0000000000000000
head: 00fff00000000002 ffffea00014b3001 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 6325, tgid 6323 (syz.2.9585), ts 1515888640353, free_ts 1512010335841
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x240/0x2a0 mm/page_alloc.c:1851
prep_new_page mm/page_alloc.c:1859 [inline]
get_page_from_freelist+0x21e4/0x22c0 mm/page_alloc.c:3858
__alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:5148
alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2416
alloc_slab_page mm/slub.c:2492 [inline]
allocate_slab+0x8a/0x370 mm/slub.c:2660
new_slab mm/slub.c:2714 [inline]
___slab_alloc+0xbeb/0x1420 mm/slub.c:3901
__slab_alloc mm/slub.c:3992 [inline]
__slab_alloc_node mm/slub.c:4067 [inline]
slab_alloc_node mm/slub.c:4228 [inline]
__kmalloc_cache_noprof+0x296/0x3d0 mm/slub.c:4402
kmalloc_noprof include/linux/slab.h:905 [inline]
kzalloc_noprof include/linux/slab.h:1039 [inline]
device_private_init drivers/base/core.c:3534 [inline]
device_add+0xbe/0xb50 drivers/base/core.c:3585
netdev_register_kobject+0x178/0x310 net/core/net-sysfs.c:2358
register_netdevice+0x126c/0x1ae0 net/core/dev.c:11293
__ip_tunnel_create+0x3e7/0x560 net/ipv4/ip_tunnel.c:268
ip_tunnel_init_net+0x2ba/0x800 net/ipv4/ip_tunnel.c:1161
ops_init+0x359/0x5c0 net/core/net_namespace.c:136
setup_net+0x10c/0x320 net/core/net_namespace.c:438
copy_net_ns+0x31b/0x4d0 net/core/net_namespace.c:570
create_new_namespaces+0x3f3/0x720 kernel/nsproxy.c:110
page last free pid 6253 tgid 6252 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
free_pages_prepare mm/page_alloc.c:1395 [inline]
__free_frozen_pages+0xbc4/0xd30 mm/page_alloc.c:2895
discard_slab mm/slub.c:2758 [inline]
__put_partials+0x156/0x1a0 mm/slub.c:3223
put_cpu_partial+0x17c/0x250 mm/slub.c:3298
__slab_free+0x2d5/0x3c0 mm/slub.c:4565
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:340
kasan_slab_alloc include/linux/kasan.h:250 [inline]
slab_post_alloc_hook mm/slub.c:4191 [inline]
slab_alloc_node mm/slub.c:4240 [inline]
__kmalloc_cache_noprof+0x1be/0x3d0 mm/slub.c:4402
kmalloc_noprof include/linux/slab.h:905 [inline]
kzalloc_noprof include/linux/slab.h:1039 [inline]
kobject_uevent_env+0x27c/0x8c0 lib/kobject_uevent.c:540
device_del+0x73a/0x8e0 drivers/base/core.c:3896
unregister_netdevice_many_notify+0x1a6b/0x1ff0 net/core/dev.c:12288
ops_exit_rtnl_list net/core/net_namespace.c:186 [inline]
ops_undo_list+0x3dc/0x990 net/core/net_namespace.c:247
setup_net+0x2d3/0x320 net/core/net_namespace.c:453
copy_net_ns+0x31b/0x4d0 net/core/net_namespace.c:570
create_new_namespaces+0x3f3/0x720 kernel/nsproxy.c:110
unshare_nsproxy_namespaces+0x11c/0x170 kernel/nsproxy.c:218
Memory state around the buggy address:
ffff888052cc2300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff888052cc2380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff888052cc2400: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff888052cc2480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff888052cc2500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
----------------
Code disassembly (best guess), 1 bytes skipped:
0: 0f 83 48 11 00 00 jae 0x114e
6: 48 c7 c0 bc 05 b1 8f mov $0xffffffff8fb105bc,%rax
d: 49 29 c5 sub %rax,%r13
10: 48 c7 c6 04 d1 29 90 mov $0xffffffff9029d104,%rsi
17: 49 c1 fd 02 sar $0x2,%r13
1b: 4a 8d 14 6d 00 00 00 lea 0x0(,%r13,2),%rdx
22: 00
23: 4c 01 ea add %r13,%rdx
26: 48 01 d2 add %rdx,%rdx
* 29: 48 01 f2 add %rsi,%rdx <-- trapping instruction
2c: 48 bd 00 00 00 00 00 movabs $0xdffffc0000000000,%rbp
33: fc ff df
36: 0f 84 37 01 00 00 je 0x173
3c: 4c rex.WR
3d: 8d .byte 0x8d
3e: 62 .byte 0x62