==================================================================
BUG: KASAN: slab-use-after-free in timer_is_static_object+0x80/0x90 kernel/time/timer.c:691
Read of size 8 at addr ffff8880357aa098 by task syz.6.7118/26379
CPU: 2 UID: 0 PID: 26379 Comm: syz.6.7118 Not tainted syzkaller #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:378 [inline]
print_report+0xcd/0x630 mm/kasan/report.c:482
kasan_report+0xe0/0x110 mm/kasan/report.c:595
timer_is_static_object+0x80/0x90 kernel/time/timer.c:691
lookup_object_or_alloc.part.0+0x420/0x590 lib/debugobjects.c:679
lookup_object_or_alloc lib/debugobjects.c:665 [inline]
debug_object_activate+0x326/0x4c0 lib/debugobjects.c:820
debug_timer_activate kernel/time/timer.c:793 [inline]
__mod_timer+0x814/0xd30 kernel/time/timer.c:1124
add_timer+0x62/0x90 kernel/time/timer.c:1249
call_timer_fn+0x19a/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+0x219/0x8e0 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:1052 [inline]
sysvec_apic_timer_interrupt+0xa4/0xc0 arch/x86/kernel/apic/apic.c:1052
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:697
RIP: 0010:zap_pte_range mm/memory.c:1863 [inline]
RIP: 0010:zap_pmd_range mm/memory.c:1946 [inline]
RIP: 0010:zap_pud_range mm/memory.c:1975 [inline]
RIP: 0010:zap_p4d_range mm/memory.c:1996 [inline]
RIP: 0010:unmap_page_range+0xe59/0x41b0 mm/memory.c:2017
Code: 04 d8 48 c1 e3 0c 48 89 44 24 18 e8 31 df b2 ff 48 01 5c 24 10 4c 8b 7c 24 40 48 8b 5c 24 10 4c 89 ff 48 89 de e8 c7 d9 b2 ff <49> 39 df 0f 85 8a fc ff ff e8 09 df b2 ff 0f b6 9c 24 25 01 00 00
RSP: 0018:ffffc9000ce575f8 EFLAGS: 00000293
RAX: 0000000000000000 RBX: 00007fc9cd6f1000 RCX: ffffffff820a6999
RDX: ffff88802936a480 RSI: 00007fc9cd7b1000 RDI: 0000000000000006
RBP: 0000000000000000 R08: 0000000000000006 R09: 00007fc9cd7b1000
R10: 00007fc9cd6f1000 R11: 0000000000000001 R12: 00007fc9cd6f0000
R13: ffff88802c4df780 R14: dffffc0000000000 R15: 00007fc9cd7b1000
unmap_single_vma.constprop.0+0x153/0x240 mm/memory.c:2060
unmap_vmas+0x218/0x470 mm/memory.c:2104
exit_mmap+0x1b2/0xb90 mm/mmap.c:1280
__mmput+0x12a/0x410 kernel/fork.c:1133
mmput+0x62/0x70 kernel/fork.c:1156
exit_mm kernel/exit.c:582 [inline]
do_exit+0x7c7/0x2bf0 kernel/exit.c:954
do_group_exit+0xd3/0x2a0 kernel/exit.c:1107
get_signal+0x2671/0x26d0 kernel/signal.c:3034
arch_do_signal_or_restart+0x8f/0x7c0 arch/x86/kernel/signal.c:337
exit_to_user_mode_loop+0x85/0x130 kernel/entry/common.c:40
exit_to_user_mode_prepare include/linux/irq-entry-common.h:225 [inline]
syscall_exit_to_user_mode_work include/linux/entry-common.h:175 [inline]
syscall_exit_to_user_mode include/linux/entry-common.h:210 [inline]
do_syscall_64+0x426/0xfa0 arch/x86/entry/syscall_64.c:100
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fc9cd58efc9
Code: Unable to access opcode bytes at 0x7fc9cd58ef9f.
RSP: 002b:00007fc9ce3830e8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca
RAX: fffffffffffffe00 RBX: 00007fc9cd7e5fa8 RCX: 00007fc9cd58efc9
RDX: 0000000000000000 RSI: 0000000000000080 RDI: 00007fc9cd7e5fa8
RBP: 00007fc9cd7e5fa0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fc9cd7e6038 R14: 00007ffc2cfa3e80 R15: 00007ffc2cfa3f68
Allocated by task 11678:
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:400 [inline]
__kasan_kmalloc+0xaa/0xb0 mm/kasan/common.c:417
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:1381
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/0xfa0 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Freed by task 26356:
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:587
kasan_save_free_info mm/kasan/kasan.h:406 [inline]
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:2530 [inline]
slab_free mm/slub.c:6619 [inline]
kfree+0x2b8/0x6d0 mm/slub.c:6826
rose_neigh_put include/net/rose.h:166 [inline]
rose_timer_expiry+0x53f/0x630 net/rose/rose_timer.c:183
call_timer_fn+0x19a/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+0x219/0x8e0 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:1052 [inline]
sysvec_apic_timer_interrupt+0xa4/0xc0 arch/x86/kernel/apic/apic.c:1052
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:697
The buggy address belongs to the object at ffff8880357aa000
which belongs to the cache kmalloc-512 of size 512
The buggy address is located 152 bytes inside of
freed 512-byte region [ffff8880357aa000, ffff8880357aa200)
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff8880357a9800 pfn:0x357a8
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 ffffea0001381810 ffffea00012c9110
raw: ffff8880357a9800 000000000010000b 00000000f5000000 0000000000000000
head: 00fff00000000240 ffff88801b442c80 ffffea0001381810 ffffea00012c9110
head: ffff8880357a9800 000000000010000b 00000000f5000000 0000000000000000
head: 00fff00000000002 ffffea0000d5ea01 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 9596, tgid 9575 (iou-wrk-9576), ts 146440357560, free_ts 138908080057
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x1c0/0x230 mm/page_alloc.c:1850
prep_new_page mm/page_alloc.c:1858 [inline]
get_page_from_freelist+0x10a3/0x3a30 mm/page_alloc.c:3884
__alloc_frozen_pages_noprof+0x25f/0x2470 mm/page_alloc.c:5183
alloc_slab_page mm/slub.c:3048 [inline]
allocate_slab mm/slub.c:3219 [inline]
new_slab+0xa5/0x360 mm/slub.c:3273
___slab_alloc+0xdc4/0x1ae0 mm/slub.c:4643
__slab_alloc.constprop.0+0x63/0x110 mm/slub.c:4762
__slab_alloc_node mm/slub.c:4838 [inline]
slab_alloc_node mm/slub.c:5260 [inline]
__do_kmalloc_node mm/slub.c:5633 [inline]
__kmalloc_node_noprof+0x4dd/0x8a0 mm/slub.c:5640
kmalloc_array_node_noprof include/linux/slab.h:1075 [inline]
alloc_slab_obj_exts+0x3a/0xd0 mm/slub.c:2123
account_slab mm/slub.c:3173 [inline]
allocate_slab mm/slub.c:3238 [inline]
new_slab+0x283/0x360 mm/slub.c:3273
___slab_alloc+0xdc4/0x1ae0 mm/slub.c:4643
__slab_alloc.constprop.0+0x63/0x110 mm/slub.c:4762
__slab_alloc_node mm/slub.c:4838 [inline]
slab_alloc_node mm/slub.c:5260 [inline]
__kmalloc_cache_noprof+0x477/0x780 mm/slub.c:5750
kmalloc_noprof include/linux/slab.h:957 [inline]
io_add_buffers io_uring/kbuf.c:524 [inline]
__io_manage_buffers_legacy io_uring/kbuf.c:566 [inline]
io_manage_buffers_legacy+0x3ce/0xe70 io_uring/kbuf.c:579
__io_issue_sqe+0xe8/0x7c0 io_uring/io_uring.c:1824
io_issue_sqe+0x85/0x1000 io_uring/io_uring.c:1847
io_wq_submit_work+0x3b8/0xac0 io_uring/io_uring.c:1959
page last free pid 9253 tgid 9253 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
free_pages_prepare mm/page_alloc.c:1394 [inline]
__free_frozen_pages+0x7df/0x1160 mm/page_alloc.c:2906
vfree+0x1fd/0xb50 mm/vmalloc.c:3440
xskq_destroy+0x3b/0x50 net/xdp/xsk_queue.c:64
xsk_release+0x4be/0x7e0 net/xdp/xsk.c:1210
__sock_release+0xb3/0x270 net/socket.c:662
sock_close+0x1c/0x30 net/socket.c:1455
__fput+0x402/0xb70 fs/file_table.c:468
task_work_run+0x150/0x240 kernel/task_work.c:227
resume_user_mode_work include/linux/resume_user_mode.h:50 [inline]
exit_to_user_mode_loop+0xec/0x130 kernel/entry/common.c:43
exit_to_user_mode_prepare include/linux/irq-entry-common.h:225 [inline]
syscall_exit_to_user_mode_work include/linux/entry-common.h:175 [inline]
syscall_exit_to_user_mode include/linux/entry-common.h:210 [inline]
do_syscall_64+0x426/0xfa0 arch/x86/entry/syscall_64.c:100
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Memory state around the buggy address:
ffff8880357a9f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff8880357aa000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff8880357aa080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff8880357aa100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff8880357aa180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
----------------
Code disassembly (best guess):
0: 04 d8 add $0xd8,%al
2: 48 c1 e3 0c shl $0xc,%rbx
6: 48 89 44 24 18 mov %rax,0x18(%rsp)
b: e8 31 df b2 ff call 0xffb2df41
10: 48 01 5c 24 10 add %rbx,0x10(%rsp)
15: 4c 8b 7c 24 40 mov 0x40(%rsp),%r15
1a: 48 8b 5c 24 10 mov 0x10(%rsp),%rbx
1f: 4c 89 ff mov %r15,%rdi
22: 48 89 de mov %rbx,%rsi
25: e8 c7 d9 b2 ff call 0xffb2d9f1
* 2a: 49 39 df cmp %rbx,%r15 <-- trapping instruction
2d: 0f 85 8a fc ff ff jne 0xfffffcbd
33: e8 09 df b2 ff call 0xffb2df41
38: 0f b6 9c 24 25 01 00 movzbl 0x125(%rsp),%ebx
3f: 00