[Android 5.4] KASAN: out-of-bounds Read in unwind_next_frame (2)

3 views
Skip to first unread message

syzbot

unread,
Feb 8, 2025, 12:02:22 PM2/8/25
to syzkaller-a...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: cb850525fc3e UPSTREAM: f2fs: Introduce linear search for d..
git tree: android12-5.4
console output: https://syzkaller.appspot.com/x/log.txt?x=14cbfca4580000
kernel config: https://syzkaller.appspot.com/x/.config?x=9bcfb44d32c96d73
dashboard link: https://syzkaller.appspot.com/bug?extid=d0c4a0107e8a97f37053
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=10482b18580000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=14da4bdf980000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/e4ea5616716e/disk-cb850525.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/6ee9ae09097b/vmlinux-cb850525.xz
kernel image: https://storage.googleapis.com/syzbot-assets/b1b3fd5f5979/bzImage-cb850525.xz

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

==================================================================
BUG: KASAN: out-of-bounds in user_mode arch/x86/include/asm/ptrace.h:131 [inline]
BUG: KASAN: out-of-bounds in unwind_next_frame+0x1cd/0x1ea0 arch/x86/kernel/unwind_orc.c:426
Read of size 8 at addr ffff8881ee5078b0 by task syz-executor356/426

CPU: 0 PID: 426 Comm: syz-executor356 Not tainted 5.4.289-syzkaller-00030-gcb850525fc3e #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 12/27/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
user_mode arch/x86/include/asm/ptrace.h:131 [inline]
unwind_next_frame+0x1cd/0x1ea0 arch/x86/kernel/unwind_orc.c:426
arch_stack_walk+0x111/0x140 arch/x86/kernel/stacktrace.c:25
stack_trace_save_tsk+0x309/0x4b0 kernel/stacktrace.c:151
proc_pid_stack+0x125/0x1e0 fs/proc/base.c:490
proc_single_show+0xda/0x160 fs/proc/base.c:801
seq_read+0x4df/0xe60 fs/seq_file.c:232
do_loop_readv_writev fs/read_write.c:713 [inline]
do_iter_read+0x3e8/0x580 fs/read_write.c:935
vfs_readv fs/read_write.c:997 [inline]
do_preadv+0x20e/0x350 fs/read_write.c:1089
do_syscall_64+0xca/0x1c0 arch/x86/entry/common.c:290
entry_SYSCALL_64_after_hwframe+0x5c/0xc1
RIP: 0033:0x7f9aea93a619
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 51 18 00 00 90 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 b0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f9aea8f8198 EFLAGS: 00000246 ORIG_RAX: 0000000000000127
RAX: ffffffffffffffda RBX: 00007f9aea9c1328 RCX: 00007f9aea93a619
RDX: 0000000000000332 RSI: 00004000000017c0 RDI: 0000000000000004
RBP: 00007f9aea9c1320 R08: 0000000000000000 R09: 65732f636f72702f
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f9aea98e2b0
R13: 00007f9aea8f81a0 R14: 00004000000017c0 R15: 00004000000000c0

The buggy address belongs to the page:
page:ffffea0007b941c0 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0
flags: 0x8000000000000000()
raw: 8000000000000000 0000000000000000 ffffea0007b941c8 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 0x400dc0(GFP_KERNEL_ACCOUNT|__GFP_ZERO)
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_clone kernel/fork.c:2557 [inline]
__se_sys_clone kernel/fork.c:2538 [inline]
__x64_sys_clone+0x26b/0x2c0 kernel/fork.c:2538
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
free_the_page mm/page_alloc.c:4955 [inline]
__free_pages+0x91/0x140 mm/page_alloc.c:4961
__free_slab+0x221/0x2e0 mm/slub.c:1774
free_slab mm/slub.c:1789 [inline]
discard_slab mm/slub.c:1795 [inline]
unfreeze_partials+0x14e/0x180 mm/slub.c:2288
put_cpu_partial+0x44/0x180 mm/slub.c:2324
__slab_free+0x297/0x360 mm/slub.c:2971
qlist_free_all+0x43/0xb0 mm/kasan/quarantine.c:167
quarantine_reduce+0x1d9/0x210 mm/kasan/quarantine.c:260
__kasan_kmalloc+0x41/0x210 mm/kasan/common.c:507
slab_post_alloc_hook mm/slab.h:584 [inline]
slab_alloc_node mm/slub.c:2829 [inline]
slab_alloc mm/slub.c:2837 [inline]
kmem_cache_alloc_trace+0xdc/0x260 mm/slub.c:2854
kmalloc include/linux/slab.h:556 [inline]
kmalloc_array include/linux/slab.h:617 [inline]
proc_pid_stack+0x8d/0x1e0 fs/proc/base.c:481
proc_single_show+0xda/0x160 fs/proc/base.c:801
seq_read+0x4df/0xe60 fs/seq_file.c:232
do_loop_readv_writev fs/read_write.c:713 [inline]
do_iter_read+0x3e8/0x580 fs/read_write.c:935
vfs_readv fs/read_write.c:997 [inline]
do_preadv+0x20e/0x350 fs/read_write.c:1089
do_syscall_64+0xca/0x1c0 arch/x86/entry/common.c:290

Memory state around the buggy address:
ffff8881ee507780: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff8881ee507800: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffff8881ee507880: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
^
ffff8881ee507900: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff8881ee507980: 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 syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.

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
Reply all
Reply to author
Forward
0 new messages