==================================================================
BUG: KASAN: stack-out-of-bounds in profile_pc+0xa4/0xe0 arch/x86/kernel/time.c:42
Read of size 8 at addr ffff8881d1397860 by task syz.1.282/1496
CPU: 1 PID: 1496 Comm: syz.1.282 Tainted: G W 5.4.276-syzkaller-00021-g58de09405d1e #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024
Call Trace:
__dump_stack lib/dump_stack.c:77 [inline]
dump_stack+0x1d8/0x241 lib/dump_stack.c:118
print_address_description+0x8c/0x600 mm/kasan/report.c:384
__kasan_report+0xf3/0x120 mm/kasan/report.c:516
kasan_report+0x30/0x60 mm/kasan/common.c:653
profile_pc+0xa4/0xe0 arch/x86/kernel/time.c:42
profile_tick+0xb9/0x100 kernel/profile.c:416
tick_sched_handle kernel/time/tick-sched.c:206 [inline]
tick_sched_timer+0x237/0x3c0 kernel/time/tick-sched.c:1342
__run_hrtimer kernel/time/hrtimer.c:1581 [inline]
__hrtimer_run_queues+0x3e9/0xb90 kernel/time/hrtimer.c:1643
hrtimer_interrupt+0x38a/0x890 kernel/time/hrtimer.c:1705
local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1122 [inline]
smp_apic_timer_interrupt+0x110/0x460 arch/x86/kernel/apic/apic.c:1147
apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:834
RIP: 0010:atomic_try_cmpxchg include/asm-generic/atomic-instrumented.h:694 [inline]
RIP: 0010:queued_spin_lock include/asm-generic/qspinlock.h:78 [inline]
RIP: 0010:do_raw_spin_lock include/linux/spinlock.h:181 [inline]
RIP: 0010:__raw_spin_lock include/linux/spinlock_api_smp.h:143 [inline]
RIP: 0010:_raw_spin_lock+0x9a/0x1b0 kernel/locking/spinlock.c:151
Code: fe 49 c1 ee 03 43 0f b6 04 26 84 c0 0f 85 bb 00 00 00 c7 44 24 20 00 00 00 00 4c 89 ef be 04 00 00 00 e8 39 dc 42 fd 4c 89 ff 04 00 00 00 e8 2c dc 42 fd 43 0f b6 04 26 84 c0 0f 85 aa 00 00
RSP: 0018:ffff8881d1397860 EFLAGS: 00000256 ORIG_RAX: ffffffffffffff13
RAX: 0000000000000001 RBX: 1ffff1103a272f0c RCX: ffffffff84511557
RDX: 0000000000000001 RSI: 0000000000000004 RDI: ffff8881d1397880
RBP: ffff8881d13978f0 R08: dffffc0000000000 R09: ffffed103d408259
R10: 0000000000000000 R11: dffffc0000000001 R12: dffffc0000000000
R13: ffff8881ea0412c0 R14: 1ffff1103a272f10 R15: ffff8881d1397880
spin_lock include/linux/spinlock.h:338 [inline]
unix_dgram_recvmsg+0x45e/0x1120 net/unix/af_unix.c:2150
sock_recvmsg_nosec net/socket.c:891 [inline]
sock_recvmsg net/socket.c:909 [inline]
sock_read_iter+0x34e/0x430 net/socket.c:987
call_read_iter include/linux/fs.h:1983 [inline]
generic_file_splice_read+0x4e0/0x7e0 fs/splice.c:307
do_splice_to fs/splice.c:877 [inline]
do_splice fs/splice.c:1191 [inline]
__do_sys_splice fs/splice.c:1433 [inline]
__se_sys_splice+0x14f3/0x1b80 fs/splice.c:1413
do_syscall_64+0xca/0x1c0 arch/x86/entry/common.c:290
entry_SYSCALL_64_after_hwframe+0x5c/0xc1
RIP: 0033:0x7f04a8988b99
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:00007f04a7c0a048 EFLAGS: 00000246 ORIG_RAX: 0000000000000113
RAX: ffffffffffffffda RBX: 00007f04a8b16fa0 RCX: 00007f04a8988b99
RDX: 0000000000000009 RSI: 0000000000000000 RDI: 0000000000000007
RBP: 00007f04a8a0977e R08: 0000000008000f28 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 000000000000000b R14: 00007f04a8b16fa0 R15: 00007fff11cd5b08
The buggy address belongs to the page:
page:ffffea000744e5c0 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0
flags: 0x8000000000000000()
raw: 8000000000000000 0000000000000000 ffffea000744e5c8 0000000000000000
raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 3, migratetype Unmovable, gfp_mask 0x500dc0(GFP_USER|__GFP_ZERO|__GFP_ACCOUNT)
set_page_owner include/linux/page_owner.h:31 [inline]
post_alloc_hook mm/page_alloc.c:2165 [inline]
prep_new_page+0x18f/0x370 mm/page_alloc.c:2171
get_page_from_freelist+0x2d13/0x2d90 mm/page_alloc.c:3794
__alloc_pages_nodemask+0x393/0x840 mm/page_alloc.c:4893
__alloc_pages include/linux/gfp.h:503 [inline]
__alloc_pages_node include/linux/gfp.h:516 [inline]
alloc_pages_node include/linux/gfp.h:530 [inline]
alloc_thread_stack_node kernel/fork.c:259 [inline]
dup_task_struct+0x85/0x600 kernel/fork.c:886
copy_process+0x56d/0x3230 kernel/fork.c:1889
_do_fork+0x197/0x900 kernel/fork.c:2399
__do_sys_clone3 kernel/fork.c:2688 [inline]
__se_sys_clone3 kernel/fork.c:2675 [inline]
__x64_sys_clone3+0x2da/0x300 kernel/fork.c:2675
do_syscall_64+0xca/0x1c0 arch/x86/entry/common.c:290
entry_SYSCALL_64_after_hwframe+0x5c/0xc1
page last free stack trace:
reset_page_owner include/linux/page_owner.h:24 [inline]
free_pages_prepare mm/page_alloc.c:1176 [inline]
__free_pages_ok+0x847/0x950 mm/page_alloc.c:1438
io_mem_free fs/io_uring.c:3273 [inline]
io_ring_ctx_free fs/io_uring.c:3560 [inline]
io_ring_ctx_wait_and_kill+0x94f/0xd90 fs/io_uring.c:3636
io_uring_release+0x57/0x70 fs/io_uring.c:3654
__fput+0x262/0x680 fs/file_table.c:281
task_work_run+0x140/0x170 kernel/task_work.c:113
exit_task_work include/linux/task_work.h:22 [inline]
do_exit+0xcaf/0x2bc0 kernel/exit.c:859
do_group_exit+0x138/0x300 kernel/exit.c:982
__do_sys_exit_group kernel/exit.c:993 [inline]
__se_sys_exit_group kernel/exit.c:991 [inline]
__x64_sys_exit_group+0x3b/0x40 kernel/exit.c:991
do_syscall_64+0xca/0x1c0 arch/x86/entry/common.c:290
entry_SYSCALL_64_after_hwframe+0x5c/0xc1
addr ffff8881d1397860 is located in stack of task syz.1.282/1496 at offset 0 in frame:
_raw_spin_lock+0x0/0x1b0
this frame has 1 object:
[32, 36) 'val.i.i.i'
Memory state around the buggy address:
ffff8881d1397700: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff8881d1397780: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffff8881d1397800: 00 00 00 00 00 00 00 00 00 00 00 00 f1 f1 f1 f1
^
ffff8881d1397880: 04 f3 f3 f3 00 00 00 00 00 00 00 00 00 00 00 00
ffff8881d1397900: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================
----------------
Code disassembly (best guess):
0: fe 49 c1 decb -0x3f(%rcx)
3: ee out %al,(%dx)
4: 03 43 0f add 0xf(%rbx),%eax
7: b6 04 mov $0x4,%dh
9: 26 84 c0 es test %al,%al
c: 0f 85 bb 00 00 00 jne 0xcd
12: c7 44 24 20 00 00 00 movl $0x0,0x20(%rsp)
19: 00
1a: 4c 89 ef mov %r13,%rdi
1d: be 04 00 00 00 mov $0x4,%esi
22: e8 39 dc 42 fd call 0xfd42dc60
27: 4c 89 ff mov %r15,%rdi
* 2a: be 04 00 00 00 mov $0x4,%esi <-- trapping instruction
2f: e8 2c dc 42 fd call 0xfd42dc60
34: 43 0f b6 04 26 movzbl (%r14,%r12,1),%eax
39: 84 c0 test %al,%al
3b: 0f .byte 0xf
3c: 85 .byte 0x85
3d: aa stos %al,%es:(%rdi)