==================================================================
BUG: KASAN: slab-use-after-free in rose_timer_expiry+0x45a/0x4d0 net/rose/rose_timer.c:183
Read of size 2 at addr ffff888025af442a by task swapper/2/0
CPU: 2 UID: 0 PID: 0 Comm: swapper/2 Not tainted 6.15.0-rc5-syzkaller-00032-g0d8d44db295c #0 PREEMPT(full)
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014
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:408 [inline]
print_report+0xc3/0x670 mm/kasan/report.c:521
kasan_report+0xe0/0x110 mm/kasan/report.c:634
rose_timer_expiry+0x45a/0x4d0 net/rose/rose_timer.c:183
call_timer_fn+0x197/0x620 kernel/time/timer.c:1789
expire_timers kernel/time/timer.c:1840 [inline]
__run_timers+0x6ef/0x960 kernel/time/timer.c:2414
__run_timer_base kernel/time/timer.c:2426 [inline]
__run_timer_base kernel/time/timer.c:2418 [inline]
run_timer_base+0x114/0x190 kernel/time/timer.c:2435
run_timer_softirq+0x1a/0x40 kernel/time/timer.c:2445
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:1049 [inline]
sysvec_apic_timer_interrupt+0xa4/0xc0 arch/x86/kernel/apic/apic.c:1049
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702
RIP: 0010:pv_native_safe_halt+0xf/0x20 arch/x86/kernel/paravirt.c:81
Code: 15 62 02 c3 cc cc cc cc 0f 1f 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 f3 0f 1e fa eb 07 0f 00 2d 73 1a 1d 00 fb f4 cc cc cc cc 66 2e 0f 1f 84 00 00 00 00 00 66 90 90 90 90 90 90
RSP: 0018:ffffc90000187df8 EFLAGS: 00000286
RAX: 0000000000211fcb RBX: 0000000000000002 RCX: ffffffff8b6cd419
RDX: 0000000000000000 RSI: ffffffff8dbe123f RDI: ffffffff8bf482a0
RBP: ffffed1003ad0910 R08: 0000000000000001 R09: ffffed100d4c65bd
R10: ffff88806a632deb R11: 0000000000000000 R12: 0000000000000002
R13: ffff88801d684880 R14: ffffffff90850410 R15: 0000000000000000
arch_safe_halt arch/x86/include/asm/paravirt.h:107 [inline]
default_idle+0x13/0x20 arch/x86/kernel/process.c:748
default_idle_call+0x6d/0xb0 kernel/sched/idle.c:117
cpuidle_idle_call kernel/sched/idle.c:185 [inline]
do_idle+0x391/0x510 kernel/sched/idle.c:325
cpu_startup_entry+0x4f/0x60 kernel/sched/idle.c:423
start_secondary+0x21d/0x2b0 arch/x86/kernel/smpboot.c:315
common_startup_64+0x13e/0x148
Allocated by task 1142:
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:377 [inline]
__kasan_kmalloc+0xaa/0xb0 mm/kasan/common.c:394
kmalloc_noprof include/linux/slab.h:905 [inline]
kzalloc_noprof include/linux/slab.h:1039 [inline]
mld_add_delrec net/ipv6/mcast.c:746 [inline]
igmp6_leave_group net/ipv6/mcast.c:2676 [inline]
igmp6_group_dropped+0x4a7/0xe40 net/ipv6/mcast.c:726
__ipv6_dev_mc_dec+0x283/0x3b0 net/ipv6/mcast.c:1018
addrconf_leave_solict net/ipv6/addrconf.c:2254 [inline]
__ipv6_ifa_notify+0x3d8/0xd60 net/ipv6/addrconf.c:6299
addrconf_ifdown.isra.0+0xe8b/0x1a90 net/ipv6/addrconf.c:3978
addrconf_notify+0x220/0x19e0 net/ipv6/addrconf.c:3777
notifier_call_chain+0xb9/0x410 kernel/notifier.c:85
call_netdevice_notifiers_info+0xbe/0x140 net/core/dev.c:2176
call_netdevice_notifiers_extack net/core/dev.c:2214 [inline]
call_netdevice_notifiers net/core/dev.c:2228 [inline]
dev_close_many+0x319/0x630 net/core/dev.c:1731
unregister_netdevice_many_notify+0x578/0x26f0 net/core/dev.c:11952
unregister_netdevice_many net/core/dev.c:12046 [inline]
default_device_exit_batch+0x853/0xaf0 net/core/dev.c:12538
ops_exit_list+0x128/0x180 net/core/net_namespace.c:177
cleanup_net+0x5c1/0xb30 net/core/net_namespace.c:654
process_one_work+0x9cc/0x1b70 kernel/workqueue.c:3238
process_scheduled_works kernel/workqueue.c:3319 [inline]
worker_thread+0x6c8/0xf10 kernel/workqueue.c:3400
kthread+0x3c2/0x780 kernel/kthread.c:464
ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:153
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
Freed by task 1149:
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:247 [inline]
__kasan_slab_free+0x51/0x70 mm/kasan/common.c:264
kasan_slab_free include/linux/kasan.h:233 [inline]
slab_free_hook mm/slub.c:2380 [inline]
slab_free_freelist_hook mm/slub.c:2409 [inline]
slab_free_bulk mm/slub.c:4666 [inline]
kmem_cache_free_bulk.part.0+0x38d/0x7f0 mm/slub.c:5243
kfree_bulk include/linux/slab.h:794 [inline]
kvfree_rcu_bulk+0x1bb/0x1f0 mm/slab_common.c:1516
kvfree_rcu_drain_ready mm/slab_common.c:1699 [inline]
kfree_rcu_monitor+0x1d0/0x2f0 mm/slab_common.c:1772
process_one_work+0x9cc/0x1b70 kernel/workqueue.c:3238
process_scheduled_works kernel/workqueue.c:3319 [inline]
worker_thread+0x6c8/0xf10 kernel/workqueue.c:3400
kthread+0x3c2/0x780 kernel/kthread.c:464
ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:153
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
Last potentially related work creation:
kasan_save_stack+0x33/0x60 mm/kasan/common.c:47
kasan_record_aux_stack+0xb8/0xd0 mm/kasan/generic.c:548
kvfree_call_rcu+0x76/0x470 mm/slab_common.c:1962
mld_clear_delrec+0xab/0x640 net/ipv6/mcast.c:828
ipv6_mc_destroy_dev+0x49/0x690 net/ipv6/mcast.c:2842
addrconf_ifdown.isra.0+0x13ef/0x1a90 net/ipv6/addrconf.c:3997
addrconf_notify+0x220/0x19e0 net/ipv6/addrconf.c:3777
notifier_call_chain+0xb9/0x410 kernel/notifier.c:85
call_netdevice_notifiers_info+0xbe/0x140 net/core/dev.c:2176
call_netdevice_notifiers_extack net/core/dev.c:2214 [inline]
call_netdevice_notifiers net/core/dev.c:2228 [inline]
unregister_netdevice_many_notify+0xf9a/0x26f0 net/core/dev.c:11982
unregister_netdevice_many net/core/dev.c:12046 [inline]
default_device_exit_batch+0x853/0xaf0 net/core/dev.c:12538
ops_exit_list+0x128/0x180 net/core/net_namespace.c:177
cleanup_net+0x5c1/0xb30 net/core/net_namespace.c:654
process_one_work+0x9cc/0x1b70 kernel/workqueue.c:3238
process_scheduled_works kernel/workqueue.c:3319 [inline]
worker_thread+0x6c8/0xf10 kernel/workqueue.c:3400
kthread+0x3c2/0x780 kernel/kthread.c:464
ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:153
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
The buggy address belongs to the object at ffff888025af4400
which belongs to the cache kmalloc-512 of size 512
The buggy address is located 42 bytes inside of
freed 512-byte region [ffff888025af4400, ffff888025af4600)
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff888025af4800 pfn:0x25af4
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 ffff88801b442c80 ffffea00010c2810 ffffea0001037b10
raw: ffff888025af4800 000000000010000c 00000000f5000000 0000000000000000
head: 00fff00000000240 ffff88801b442c80 ffffea00010c2810 ffffea0001037b10
head: ffff888025af4800 000000000010000c 00000000f5000000 0000000000000000
head: 00fff00000000002 ffffea000096bd01 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 0x252800(GFP_NOWAIT|__GFP_NORETRY|__GFP_COMP|__GFP_THISNODE), pid 6001, tgid 5999 (syz.0.1), ts 48970207176, free_ts 48953842355
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x181/0x1b0 mm/page_alloc.c:1718
prep_new_page mm/page_alloc.c:1726 [inline]
get_page_from_freelist+0x135c/0x3920 mm/page_alloc.c:3688
__alloc_frozen_pages_noprof+0x263/0x23a0 mm/page_alloc.c:4970
alloc_slab_page mm/slub.c:2452 [inline]
allocate_slab mm/slub.c:2618 [inline]
new_slab+0x94/0x340 mm/slub.c:2672
___slab_alloc+0xd9c/0x1940 mm/slub.c:3858
__slab_alloc.constprop.0+0x56/0xb0 mm/slub.c:3948
__slab_alloc_node mm/slub.c:4023 [inline]
slab_alloc_node mm/slub.c:4184 [inline]
__do_kmalloc_node mm/slub.c:4326 [inline]
__kmalloc_node_noprof+0x2ed/0x500 mm/slub.c:4333
kmalloc_array_node_noprof include/linux/slab.h:1020 [inline]
alloc_slab_obj_exts+0x41/0xa0 mm/slub.c:1992
__memcg_slab_post_alloc_hook+0x27b/0x940 mm/memcontrol.c:3074
memcg_slab_post_alloc_hook mm/slub.c:2179 [inline]
slab_post_alloc_hook mm/slub.c:4157 [inline]
slab_alloc_node mm/slub.c:4196 [inline]
kmem_cache_alloc_noprof+0x307/0x3b0 mm/slub.c:4203
create_nsproxy kernel/nsproxy.c:56 [inline]
create_new_namespaces+0x30/0xad0 kernel/nsproxy.c:74
prepare_nsset kernel/nsproxy.c:335 [inline]
__do_sys_setns+0x229/0x1910 kernel/nsproxy.c:569
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xcd/0x260 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
page last free pid 5943 tgid 5943 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
free_pages_prepare mm/page_alloc.c:1262 [inline]
__free_frozen_pages+0x69d/0xff0 mm/page_alloc.c:2725
discard_slab mm/slub.c:2716 [inline]
__put_partials+0x16d/0x1c0 mm/slub.c:3185
qlink_free mm/kasan/quarantine.c:163 [inline]
qlist_free_all+0x4e/0x120 mm/kasan/quarantine.c:179
kasan_quarantine_reduce+0x195/0x1e0 mm/kasan/quarantine.c:286
__kasan_slab_alloc+0x69/0x90 mm/kasan/common.c:329
kasan_slab_alloc include/linux/kasan.h:250 [inline]
slab_post_alloc_hook mm/slub.c:4147 [inline]
slab_alloc_node mm/slub.c:4196 [inline]
kmem_cache_alloc_lru_noprof+0x1d0/0x3b0 mm/slub.c:4215
shmem_alloc_inode+0x25/0x50 mm/shmem.c:5147
alloc_inode+0x61/0x240 fs/inode.c:346
new_inode+0x22/0x1c0 fs/inode.c:1145
__shmem_get_inode mm/shmem.c:3046 [inline]
shmem_get_inode+0x19a/0xfb0 mm/shmem.c:3120
shmem_mknod+0x1a8/0x450 mm/shmem.c:3841
lookup_open.isra.0+0x11d0/0x1580 fs/namei.c:3701
open_last_lookups fs/namei.c:3800 [inline]
path_openat+0x905/0x2d40 fs/namei.c:4036
do_filp_open+0x20b/0x470 fs/namei.c:4066
do_sys_openat2+0x11b/0x1d0 fs/open.c:1429
do_sys_open fs/open.c:1444 [inline]
__do_sys_openat fs/open.c:1460 [inline]
__se_sys_openat fs/open.c:1455 [inline]
__x64_sys_openat+0x174/0x210 fs/open.c:1455
Memory state around the buggy address:
ffff888025af4300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff888025af4380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff888025af4400: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff888025af4480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff888025af4500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
----------------
Code disassembly (best guess):
0: 15 62 02 c3 cc adc $0xccc30262,%eax
5: cc int3
6: cc int3
7: cc int3
8: 0f 1f 00 nopl (%rax)
b: 90 nop
c: 90 nop
d: 90 nop
e: 90 nop
f: 90 nop
10: 90 nop
11: 90 nop
12: 90 nop
13: 90 nop
14: 90 nop
15: 90 nop
16: 90 nop
17: 90 nop
18: 90 nop
19: 90 nop
1a: 90 nop
1b: f3 0f 1e fa endbr64
1f: eb 07 jmp 0x28
21: 0f 00 2d 73 1a 1d 00 verw 0x1d1a73(%rip) # 0x1d1a9b
28: fb sti
29: f4 hlt
* 2a: c3 ret <-- trapping instruction
2b: cc int3
2c: cc int3
2d: cc int3
2e: cc int3
2f: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1)
36: 00 00 00
39: 66 90 xchg %ax,%ax
3b: 90 nop
3c: 90 nop
3d: 90 nop
3e: 90 nop
3f: 90 nop