Skip to content

fix(libkernel): fail the stat family with EFAULT when the output struct is not writable guest memory - #9618

Merged
adriadam10 merged 2 commits into
boykopovar:mainfrom
xXPBSXx:fix/output-structs-efault
Oct 25, 2026
Merged

adriadam10 merged 2 commits into
boykopovar:mainfrom
xXPBSXx:fix/output-structs-efault

Conversation

@xXPBSXx

@xXPBSXx xXPBSXx commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

What

Fill a local struct and copy it out with a checked write, GuestCopyOut_nid_no_patch (new, libc General.cpp: HostWrite guard, then process_vm_writev on Linux and a VirtualQuery writability walk on Windows), failing with EFAULT. Applied to fstat_nid_disambig1/_fstat, sceKernelFstat, lstat, sceKernelStat (so stat) and _fstatfs. The order of checks is unchanged: descriptor and path errors still come first, the copy-out is last, as in sys_fstat/sys_stat/sys_fstatfs.

Fixes: #9617

Tested

Head c424bd17c8 (two commits, 83f28bd67f and c424bd17c8), rebased onto main f26434afa3; git merge-tree against current main 38d463a6cf is clean. The diff is 5 files, +148/-12: General.hpp +1, General.cpp +40, Open.cpp +3/-1, Stdio.cpp +15/-11, GuestFstatFault.cpp +89.

  • guest_fstat_fault and the six tests of the earlier description (guest_file_timestamps, guest_kernel_sys, guest_filesystem, guest_posix_filesystem, guest_socket_descriptors, guest_socket_pair), 7 tests, on main f26434afa3 with this head:
    • Windows 10, MinGW-w64 GCC 15.2, Release: 7 of 7 pass. With General.hpp, General.cpp, Open.cpp and Stdio.cpp taken from main and the test kept, guest_fstat_fault fails with a SegFault.
    • Ubuntu 24.04 under WSL2 (a virtualised kernel, not bare-metal), GCC 13.3, Release: 7 of 7 pass. With only General.cpp put back to its first-commit version (same tree, same build directory, test kept), guest_fstat_fault aborts at the EPERM case.
  • Measured by others, on the earlier head faa3926cdf (before this rebase): jotitadev on Linux (Ubuntu 26.04, GCC 15.2, head bd2c029ef merged onto main 17f533556), review; jotitadev on macOS (Mac M2 Max, macOS 27.2, x86_64 under Rosetta), on the feat: macOS host support (Apple Silicon via Rosetta 2, Vulkan on MoltenVK) #8658 port branch dc0c8db500 merged with faa3926cdf, not on main, review. I have not rerun macOS.
  • The rebase changed only the test file: its local extern "C" declarations were dropped because main now declares them in the headers, and the _fstatfs call casts to KernelStatfs*. The source hunks are unchanged.
  • check_conventions --base upstream/main passes.
  • Not tested by me: macOS; a stat buffer in write-watched memory on macOS.

Relation to other work

#9423 adds CopyGuestPath_nid_no_patch, a checked read of guest path strings. GuestCopyOut_nid_no_patch here is the write counterpart for output structs; the two touch different functions and do not overlap, but both use the same host mechanism (process_vm_* on Linux, a VirtualQuery walk on Windows) and could share one primitive later. If you prefer the check inline in each wrapper instead of a shared helper, say so and I will fold it.

Merge order with #9478 and #7447 (they share Stdio.cpp) is in the comments; this PR does not depend on them.

Checklist

AI-assisted (Claude Code).

🤖 Generated with Claude Code

@jotitadev jotitadev left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Linux run of the case listed as not tested: an output struct on a mapped page that is not writable.

Machine: Linux x86_64, i7-8700, Ubuntu 26.04 (kernel 7.0.0-38), GCC 15.2, Release, BUILD_TESTING=ON. Head bd2c029ef merged --no-commit onto main 17f533556 (clean).

  • The seven tests from the description pass: guest_fstat_fault, guest_file_timestamps, guest_kernel_sys, guest_filesystem, guest_posix_filesystem, guest_socket_descriptors and guest_socket_pair.

  • Read-only and inaccessible pages: I added a local probe to guest_fstat_fault (not pushed). It maps two anonymous pages filled with 0xa5, then mprotects the second one:

    output pointer result
    start of a PROT_READ page fstat -1/EFAULT, stat -1/EFAULT, sceKernelFstat 0x8002000e, _fstatfs -1. No crash.
    start of a PROT_NONE page fstat -1/EFAULT
    16 bytes before a PROT_READ page (sizeof(FileStat) is 120) fstat -1/EFAULT, and the 16 writable bytes are overwritten

    So process_vm_writev does reject a mapped page that isn't writable, as the description expects, and that case could be asserted the same way as the bad-address cases. The last row is a difference between hosts. On Linux, process_vm_writev writes up to the fault, so a struct that straddles into a non-writable page gets partly written before EFAULT. The Windows VirtualQuery walk checks the whole range before its memcpy, so it writes nothing. FreeBSD's copyout can also stop partway, so this may be acceptable, but the two hosts don't give the same result.

Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.

@github-actions github-actions Bot added the fix error Closes an issue (Fixes #N) label Oct 22, 2026
@github-actions

github-actions Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.

Pull request Shared files not compared
PR 5021 core/libs/prx/libc/src/General.cpp
core/libs/prx/libkernel/File/src/Open.cpp
core/libs/prx/libkernel/File/src/Stdio.cpp
PR 6544 core/libs/prx/libc/src/General.cpp
PR 6936 core/libs/prx/libkernel/File/src/Open.cpp
core/libs/prx/libkernel/File/src/Stdio.cpp
PR 7121 core/libs/prx/libkernel/File/src/Open.cpp
core/libs/prx/libkernel/File/src/Stdio.cpp
PR 7201 core/libs/prx/libc/src/General.cpp
core/libs/prx/libkernel/File/src/Open.cpp
core/libs/prx/libkernel/File/src/Stdio.cpp
PR 8520 core/libs/prx/libkernel/File/src/Open.cpp
core/libs/prx/libkernel/File/src/Stdio.cpp
PR 9019 core/libs/prx/libkernel/File/src/Open.cpp
core/libs/prx/libkernel/File/src/Stdio.cpp
PR 9161 core/libs/prx/libkernel/File/src/Stdio.cpp
PR 9284 core/libs/prx/libkernel/File/src/Stdio.cpp
PR 9293 core/libs/prx/libkernel/File/src/Stdio.cpp
PR 9297 core/libs/prx/libkernel/File/src/Stdio.cpp
PR 9302 core/libs/prx/libkernel/File/src/Stdio.cpp
PR 9371 core/libs/prx/libc/src/General.cpp
PR 9442 core/libs/prx/libkernel/File/src/Stdio.cpp
PR 9447 core/libs/prx/libc/include/General.hpp
PR 9561 core/libs/prx/libkernel/File/src/Open.cpp
core/libs/prx/libkernel/File/src/Stdio.cpp
PR 9693 core/libs/prx/libc/include/General.hpp
core/libs/prx/libc/src/General.cpp
core/libs/prx/libkernel/File/src/Open.cpp
core/libs/prx/libkernel/File/src/Stdio.cpp
PR 9732 core/libs/prx/libkernel/File/src/Stdio.cpp
PR 9823 core/libs/prx/libkernel/File/src/Stdio.cpp
PR 9929 core/libs/prx/libc/include/General.hpp

@MarcZX10 MarcZX10 left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The main fix is well targeted: metadata is filled into local FileStat/KernelStatfs values, check precedence is retained, and the exact-head tests exercise all six stat-family wrappers with invalid pointers. Current-main conventions and whitespace pass; hosted conventions, eligibility, intake, labels, relinker, registration and ASan checks pass, while product Linux/Windows jobs are skipped. The author reports Windows and WSL red/green runs; an independent Linux reviewer confirms the same focused suite and additionally tested read-only and straddling pages. I did not rerun the full runtime tests locally.

Two safety gaps remain in GuestCopyOut_nid_no_patch: the non-Windows fallback can still dereference invalid output pointers, and Linux errors other than EFAULT can fall back to unchecked memcpy. Please add a checked copy-out path or fail safely, and cover read-only and partial-write behavior.

The linked #9617 is a generic invalid-pointer sweep, not a title-specific stop.

I’ve noticed that holding this PR because of #5239 isn’t necessary. It’s fine for PRs to keep coming in; they’ll be handled in due course. Please disregard my earlier request to hold or defer it.

@EagleBearerYS

Copy link
Copy Markdown
Contributor

@xXPBSXx a merge-order note: #9478 changes the same ResolvePathError_nid_no_patch call in lstat that this PR reworks. It passes the resolver's module flag, ResolvePathError_nid_no_patch(path, native, true), so lstat of an original .prx name finds its relinked .guest.prx. This PR fills a local FileStat and copies it out with GuestCopyOut_nid_no_patch. They compose as this PR's version of the function with the flag kept. Since #9478 is a one-line change, I'd propose it goes first and this PR keeps the flag when it rebases; if you'd rather this one went first, #9478 rebases over it instead. #7447 (qpavyros) sets the same call's archived flag too, so the combined call keeps both.

@MarcZX10 MarcZX10 left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I withdraw the earlier #5239 intake-hold objection. I rechecked exact head bd2c029ef713a8d1cbbb582dc5a621e39fa0d207 against current main 3ca07d086d5f44fbe3c00370e7f03953ab46ca1b: whitespace and conventions pass, the new regression source and all three changed implementation translation units pass local GCC 12.2 C++20 syntax-only compilation, and the current-main merge tree is clean. The author reports Windows and WSL red/green runs; an independent Linux reviewer confirms the seven focused tests, plus read-only and inaccessible-page probes. I did not run the runtime suite locally. Hosted relinker/register-context/write-watch checks pass; full product jobs are skipped. The exact-head safety issues from the prior review remain: 1. On macOS and other non-Windows/non-Linux hosts, GuestCopyOut_nid_no_patch falls through to memcpy. GuestArenaBeginHostWrite_nid_postfix returns true on non-Windows hosts, so this guard does not validate an arbitrary destination; a bad pointer can still crash the host. Please add a checked copy-out implementation for supported hosts or fail safely without dereferencing invalid guest memory. 2. On Linux, every process_vm_writev error other than EFAULT falls back to memcpy. Errors such as EPERM (for example, syscall filtering) and ENOSYS do not establish that the destination is writable. Please remove the unchecked fallback or restrict it to a condition that proves the full destination safe. 3. Add a read-only destination regression, as the independent reviewer already probed, and document/assert the partial-write behavior if a structure straddles into an inaccessible page. The branch base 17f533556272e5f6833ed730172f12308eee08d2 is behind current main; the repository requires keeping branches up to date. Please rebase/update and rerun the focused tests on that head. The overlap bot reports #9478's shared Stdio.cpp comparison is incomplete because it conflicts with main. The author's proposed merge order is reasonable, but preserve the ResolvePathError_nid_no_patch(path, native, true) module flag when combining it with #9478, and retain #7447's archived flag if applicable.

I’ve noticed that holding this PR because of #5239 isn’t necessary. It’s fine for PRs to keep coming in; they’ll be handled in due course. Please disregard my earlier request to hold or defer it.

@adriadam10 adriadam10 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, the approach is right: local struct, copy-out last, error order unchanged as in sys_fstat/sys_stat/sys_fstatfs. Two things still defeat the purpose of the helper (same as @MarcZX10's review):

  • core/libs/prx/libc/src/General.cpp:706-709: any process_vm_writev error other than EFAULT (EPERM under seccomp, ENOSYS) falls back to an unchecked memcpy, which crashes on a bad pointer. Return false or throw on those instead (#9161 throws on host failures other than EFAULT).
  • General.cpp:712-714: on macOS and other hosts the helper is a plain memcpy after HostWrite, whose Open() is true for any non-arena pointer on non-Windows hosts. Either add a checked path for those hosts (e.g. mach_vm_write/vm_region on macOS) or NotImplemented_nid_no_patch there so it does not dereference a bad pointer silently.
  • GuestFstatFault.cpp: add a read-only page case (mmap two pages, mprotect the second PROT_READ, expect -1/EFAULT at its start), as @jotitadev probed. Also note in the PR which behaviour you want when the struct straddles into a non-writable page: Linux writes up to the fault, the Windows walk writes nothing. Pick one and assert it, or state that it is unspecified like copyout.
  • Merge order with #9478: keep the module flag in lstat's ResolvePathError_nid_no_patch(path, native, true) when you rebase over it.

Please also rebase onto current main and rerun the focused tests.

@MarcZX10

Copy link
Copy Markdown
Contributor

I’ve noticed that my earlier request to hold this PR based on #5239 was unnecessary. It’s fine to keep submitting PRs; maintainers will handle them in due course. Please disregard that request.

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blocking correctness issue: GuestCopyOut_nid_no_patch can still fault instead of returning EFAULT on non-Windows hosts. On Linux, when process_vm_writev fails with anything other than EFAULT (for example EPERM under seccomp or ENOSYS), lines 706–709 fall back to std::memcpy; the non-Linux/non-Windows branch at lines 712–714 always does so. GuestArenaBeginHostWrite_nid_postfix does not validate writability on these platforms (it calls the write-watch hook and returns true), so an invalid or read-only destination can still crash in those branches. Please use a copy-out path that safely detects these failures, or fail conservatively when the safe syscall is unavailable, and add regression coverage for a non-EFAULT syscall failure and the macOS path before considering this fixed.

@xXPBSXx

xXPBSXx commented Oct 23, 2026

Copy link
Copy Markdown
Contributor Author

@adriadam10 @MarcZX10 thanks, both points are addressed in a follow-up commit (no force-push):

  • Linux: any process_vm_writev failure other than EFAULT no longer falls back to memcpy; GuestCopyOut_nid_no_patch throws std::runtime_error with the errno.
  • macOS: dedicated mach_vm_write branch, the same pattern as ReadGuest/WriteGuest in Udp.cpp. Every other host throws instead of writing unchecked.
  • Tests (guest_fstat_fault): a read-only page and a PROT_NONE / PAGE_NOACCESS page must give EFAULT (POSIX and Windows). A Linux child process with a seccomp filter that makes process_vm_writev return EPERM must see the exception and an unchanged destination buffer.
  • Red/green on Linux (WSL2: a virtualised kernel, not bare-metal): without the General.cpp change guest_fstat_fault fails, with it the test passes. Windows passes. check_conventions is clean and git merge-tree against main is clean.
  • Not tested: the macOS branch (no Mac available).
  • fix(libkernel): resolve original .prx names to relinked .guest.prx in lstat #9478 (lstat module flag) touches different lines, so there is no overlap with this commit.

AI-assisted (Claude Code).

@jotitadev jotitadev left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

macOS run of the new mach_vm_write branch (listed as not tested).

Mac M2 Max, macOS 27.2, Apple clang, x86_64 under Rosetta, Release. main does not build libc/libkernel on macOS yet, so the tree is #8658 (feat/macos-port) @ dc0c8db merged with this PR @ faa3926 (clean merge).

  • guest_fstat_fault, guest_file_timestamps, guest_kernel_sys, guest_filesystem, guest_posix_filesystem, guest_socket_descriptors and guest_socket_pair: 7/7 pass. guest_fstat_fault 3/3 runs.
  • Red/green: with GuestCopyOut_nid_no_patch put back to the bd2c029 version (memcpy on non-Linux, non-Windows hosts), guest_fstat_fault fails with a SegFault on macOS.
  • mach_vm_write on this host (standalone check, arm64 and Rosetta give the same results): addresses 1 and ~0xfff, a PROT_READ page and a PROT_NONE page all fail. An unaligned stack buffer and a write across two untouched pages succeed. A write that crosses from a writable page into a read-only one fails but leaves the bytes before the boundary written. process_vm_writev behaves the same way.

The HostWrite guard before mach_vm_write is required on macOS, and no test covers it. On macOS, write watch protects watched pages with mprotect (Linux uses userfaultfd async WP instead). mach_vm_write does not raise the fault the watch handler relies on; it returns KERN_PROTECTION_FAILURE. In a local check I registered a page with GuestWriteWatchRegister_nid_postfix and armed it with one Collect:

  • raw mach_vm_write into the page: kr=1, and no write is collected;
  • fstat and sceKernelFstat into the page through this PR: 0, st_size correct, and the page is collected as written;
  • the same with the guard limited to _WIN32: fstat returns -1/EFAULT and sceKernelFstat returns 0x8002000E, yet guest_fstat_fault still passes.

So a stat buffer in watched (imported GPU) memory would get a spurious EFAULT on macOS if the guard were ever moved or dropped. A small case in guest_fstat_fault would catch that on macOS: register and arm a page, fstat into it, and expect success plus one collected write. It is optional and does not block this PR.

Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.

@xXPBSXx

xXPBSXx commented Oct 23, 2026

Copy link
Copy Markdown
Contributor Author

My earlier note that #9478 "touches different lines, so there is no overlap" was wrong, and I had not run a merge check against #9478 when I wrote it. I have measured it now with git merge-tree --write-tree:

On the order proposed above: either order works for this PR. If #9478 lands first, I rebase this PR and keep the true flag; the resolution is the two lines ResolvePathError_nid_no_patch(path, native, true) followed by this PR's FileStat result{} / FillLinkStat / GuestCopyOut_nid_no_patch block. If this PR lands first, #9478 only needs its one-line change re-applied on top. I have not built or tested the combined resolution yet; I will do that when the second PR is rebased.

AI-assisted (Claude Code).

@EagleBearerYS

Copy link
Copy Markdown
Contributor

@xXPBSXx thanks for measuring it. Since either order works, let's have this PR go first: #9478 is the one-line change, so it re-applies ResolvePathError_nid_no_patch(path, native, true) on top of this PR's FileStat block when it merges main after it. Nothing changes on your side, and #9478's description now lists that order.

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The follow-up addresses the safety blockers from my earlier review: non-EFAULT Linux errors no longer fall through to memcpy, macOS uses mach_vm_write, and the test now covers read-only/PAGE_NOACCESS or PROT_NONE destinations plus Linux seccomp EPERM. The independent macOS report also confirms the focused regression passes there.

Two repository-checklist items still need updating before I can approve:

  1. The PR body still describes the first commit (bd2c029ef7) as the tested change and says macOS/read-only destinations were not tested. The follow-up at current head faa3926cdf5473ae5d3bf1e39b09a1511f2ce37a changes both the implementation and tests. Please refresh Tested with the follow-up results and their exact head/base, including that the macOS validation used the #8658 port branch rather than current main.
  2. The overlap discussion on this PR records a merge conflict with open #9478 and #7447 in Stdio.cpp and proposes preserving both resolver flags, but the checklist still says Depends on: none. Please agree the merge order with those authors and record the actual dependency/order in the checklist. Preserve module=true from #9478 and archived=true from #7447 when composing ResolvePathError_nid_no_patch.

I verified this PR alone merges cleanly with current upstream/main; the requested coordination is for the reported combined conflicts. AI-assisted review.

@xXPBSXx

xXPBSXx commented Oct 24, 2026

Copy link
Copy Markdown
Contributor Author

Thanks @MarcZX10, both items are updated.

  1. Tested now describes head faa3926cdf on merge base ab347d144d with the follow-up results: the Linux red/green runs on the same tree and build directory (only General.cpp reverted), the Windows run, and jotitadev's Linux and macOS runs named as other people's measurements. The macOS run used the feat: macOS host support (Apple Silicon via Rosetta 2, Vulkan on MoltenVK) #8658 port branch dc0c8db500 merged with this head, not main. I did not test macOS myself.
  2. Order with fix(libkernel): resolve original .prx names to relinked .guest.prx in lstat #9478 / feat(libc): support archive-backed stdio reads #7447: EagleBearerYS confirmed on this PR (12:09Z, as author of fix(libkernel): resolve original .prx names to relinked .guest.prx in lstat #9478) that this PR goes first and that fix(libkernel): resolve original .prx names to relinked .guest.prx in lstat #9478 applies its one-line change afterwards, so Depends on stays none. I measured the combined resolutions with git merge-tree and a local merge: both conflicts are the same lines in lstat_nid_postfix. With fix(libkernel): resolve original .prx names to relinked .guest.prx in lstat #9478 the resolution keeps ResolvePathError_nid_no_patch(path, native, true) and this PR's local result plus GuestCopyOut_nid_no_patch; with feat(libc): support archive-backed stdio reads #7447 the archived stat is filled into the local result (File::FillArchivedStat(native, &result)) and then copied out, keeping false, true for the resolver flags. guest_fstat_fault and the archive tests pass on both combinations on Windows and Linux. I have not asked the feat(libc): support archive-backed stdio reads #7447 author yet; whichever PR lands second rebases onto the first.

AI-assisted (Claude Code).

@adriadam10
adriadam10 dismissed MarcZX10’s stale review October 24, 2026 10:20

Dismissing a stale review: the requested changes were addressed after it (new head and/or updated description with the asked-for runs) and the merge queue blocks on it. Please request changes again if anything is still open.

@github-actions github-actions Bot added the needs rebase Conflicts with main, rebase needed label Oct 24, 2026
xXPBSXx and others added 2 commits October 25, 2026 01:08
…ct is not writable guest memory

fstat, _fstat, sceKernelFstat, stat, lstat, sceKernelStat and _fstatfs
filled the caller's struct in place, or copied into it after a check that
only tests for null, so a pointer into unmapped memory crashed the host.
Fill a local struct and copy it out with a checked write that fails with
EFAULT. FreeBSD 11.4 does the same after the lookup has succeeded:
copyout(&ub, uap->sb) in sys_fstat (sys/kern/kern_descrip.c:1328),
copyout(&sb, uap->ub) in sys_stat (sys/kern/vfs_syscalls.c:2066) and
copyout(sfp, uap->buf) in sys_fstatfs (sys/kern/vfs_syscalls.c:337).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…t errors

GuestCopyOut_nid_no_patch fell back to memcpy when process_vm_writev failed
with anything but EFAULT, and on every non-Linux/non-Windows host. Throw
instead (macOS uses mach_vm_write as Udp.cpp does) and cover read-only and
PROT_NONE pages plus a seccomp EPERM child in guest_fstat_fault.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@xXPBSXx
xXPBSXx force-pushed the fix/output-structs-efault branch from faa3926 to c424bd1 Compare October 24, 2026 23:36
@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Oct 24, 2026
@adriadam10
adriadam10 merged commit 35d22d8 into boykopovar:main Oct 25, 2026
21 checks passed
@adriadam10

Copy link
Copy Markdown
Collaborator

Re-checked after the rebase: the source hunks are unchanged (GuestCopyOut_nid_no_patch throws on non-EFAULT host errors, mach_vm_write on macOS, copy-out last in all six stat-family wrappers), and the test only dropped its local declarations; merged.

adriadam10 pushed a commit that referenced this pull request Oct 25, 2026
Main's #9618 has lstat fill a local FileStat and copy it out to the guest.
The merge keeps that and this branch's module lookup in the same call, so an
original .prx name still resolves to its relinked .guest.prx.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix error Closes an issue (Fixes #N) libc libkernel

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(libkernel): fstat, stat, lstat, fstatfs and their sceKernel* forms crash on an output pointer into unmapped memory instead of failing with EFAULT

5 participants