[moderation] [fs?] KASAN: stack-out-of-bounds Read in unwind_next_frame (3)

5 views
Skip to first unread message

syzbot

unread,
Jan 8, 2025, 12:12:24 PM1/8/25
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 63676eefb7a0 Merge tag 'sched_ext-for-6.13-rc5-fixes' of g..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=162016f8580000
kernel config: https://syzkaller.appspot.com/x/.config?x=1c541fa8af5c9cc7
dashboard link: https://syzkaller.appspot.com/bug?extid=a516fe79028c1604af82
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
CC: [linux-...@vger.kernel.org linux-...@vger.kernel.org]

Unfortunately, I don't have any reproducer for this issue yet.

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/e4d2861ad6bf/disk-63676eef.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/bc8746d9f45c/vmlinux-63676eef.xz
kernel image: https://storage.googleapis.com/syzbot-assets/f51cd89b3763/bzImage-63676eef.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+a516fe...@syzkaller.appspotmail.com

==================================================================
BUG: KASAN: stack-out-of-bounds in user_mode arch/x86/include/asm/ptrace.h:214 [inline]
BUG: KASAN: stack-out-of-bounds in unwind_next_frame+0x1ad1/0x22d0 arch/x86/kernel/unwind_orc.c:482
Read of size 2 at addr ffffc9000c20f430 by task syz.1.2167/14955

CPU: 1 UID: 0 PID: 14955 Comm: syz.1.2167 Not tainted 6.13.0-rc5-syzkaller-00161-g63676eefb7a0 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
Call Trace:
<TASK>
__dump_stack lib/dump_stack.c:94 [inline]
dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120
print_address_description mm/kasan/report.c:378 [inline]
print_report+0x169/0x550 mm/kasan/report.c:489
kasan_report+0x143/0x180 mm/kasan/report.c:602
user_mode arch/x86/include/asm/ptrace.h:214 [inline]
unwind_next_frame+0x1ad1/0x22d0 arch/x86/kernel/unwind_orc.c:482
arch_stack_walk+0x11c/0x150 arch/x86/kernel/stacktrace.c:25
stack_trace_save_tsk+0x24b/0x3d0 kernel/stacktrace.c:150
proc_pid_stack+0x12c/0x1e0 fs/proc/base.c:492
proc_single_show+0xff/0x1d0 fs/proc/base.c:812
traverse+0x1e1/0x550 fs/seq_file.c:111
seq_read_iter+0xc8c/0xd70 fs/seq_file.c:195
seq_read+0x3a9/0x4f0 fs/seq_file.c:162
vfs_read+0x1fe/0xb70 fs/read_write.c:563
ksys_pread64 fs/read_write.c:756 [inline]
__do_sys_pread64 fs/read_write.c:764 [inline]
__se_sys_pread64 fs/read_write.c:761 [inline]
__x64_sys_pread64+0x1ac/0x240 fs/read_write.c:761
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f5100385d29
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:00007f51011f2038 EFLAGS: 00000246 ORIG_RAX: 0000000000000011
RAX: ffffffffffffffda RBX: 00007f5100576160 RCX: 00007f5100385d29
RDX: 0000000000001005 RSI: 0000000020001580 RDI: 000000000000000b
RBP: 00007f5100401b08 R08: 0000000000000000 R09: 0000000000000000
R10: 000000000000000a R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 00007f5100576160 R15: 00007ffe8dc42ec8
</TASK>

The buggy address belongs to the virtual mapping at
[ffffc9000c208000, ffffc9000c211000) created by:
copy_process+0x5d1/0x3d50 kernel/fork.c:2224

The buggy address belongs to the physical page:
page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x38592
memcg:ffff88802fb63482
flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000000000 0000000000000000 dead000000000122 0000000000000000
raw: 0000000000000000 0000000000000000 00000001ffffffff ffff88802fb63482
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 0, migratetype Unmovable, gfp_mask 0x2dc2(GFP_KERNEL|__GFP_HIGHMEM|__GFP_NOWARN|__GFP_ZERO), pid 14937, tgid 14936 (syz.1.2167), ts 965469818304, free_ts 963821684441
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x1f3/0x230 mm/page_alloc.c:1558
prep_new_page mm/page_alloc.c:1566 [inline]
get_page_from_freelist+0x365c/0x37a0 mm/page_alloc.c:3476
__alloc_pages_noprof+0x292/0x710 mm/page_alloc.c:4753
alloc_pages_mpol_noprof+0x3e8/0x680 mm/mempolicy.c:2269
vm_area_alloc_pages mm/vmalloc.c:3591 [inline]
__vmalloc_area_node mm/vmalloc.c:3669 [inline]
__vmalloc_node_range_noprof+0x9c9/0x1380 mm/vmalloc.c:3846
alloc_thread_stack_node kernel/fork.c:314 [inline]
dup_task_struct+0x444/0x8c0 kernel/fork.c:1116
copy_process+0x5d1/0x3d50 kernel/fork.c:2224
kernel_clone+0x226/0x8e0 kernel/fork.c:2806
__do_sys_clone kernel/fork.c:2949 [inline]
__se_sys_clone kernel/fork.c:2933 [inline]
__x64_sys_clone+0x258/0x2a0 kernel/fork.c:2933
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f
page last free pid 14929 tgid 14922 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
free_pages_prepare mm/page_alloc.c:1127 [inline]
free_unref_page+0xd3f/0x1010 mm/page_alloc.c:2659
vfree+0x1c3/0x360 mm/vmalloc.c:3383
free_partitions block/partitions/core.c:113 [inline]
blk_add_partitions block/partitions/core.c:638 [inline]
bdev_disk_changed+0xf3e/0x13f0 block/partitions/core.c:693
loop_reread_partitions drivers/block/loop.c:534 [inline]
loop_set_status+0x70c/0x8f0 drivers/block/loop.c:1302
lo_ioctl+0xcbc/0x1f50
blkdev_ioctl+0x57f/0x6a0 block/ioctl.c:693
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:906 [inline]
__se_sys_ioctl+0xf7/0x170 fs/ioctl.c:892
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f

Memory state around the buggy address:
ffffc9000c20f300: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffffc9000c20f380: f1 f1 f1 f1 00 00 00 f2 f2 f2 f2 f2 04 f2 00 f2
>ffffc9000c20f400: f2 f2 00 00 f3 f3 f3 f3 00 00 00 00 00 00 00 00
^
ffffc9000c20f480: 00 00 00 00 00 00 00 00 f1 f1 f1 f1 00 f3 f3 f3
ffffc9000c20f500: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup

syzbot

unread,
Apr 4, 2025, 1:08:19 PM4/4/25
to syzkaller-upst...@googlegroups.com
Auto-closing this bug as obsolete.
Crashes did not happen for a while, no reproducer and no activity.
Reply all
Reply to author
Forward
0 new messages