fix(libSceFiber): return INVALID from sceFiberOptParamInitialize for an unwritable pointer #14979
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/14979"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by fogydes on 2026-11-02T07:36:57Z.
What
sceFiberOptParamInitializewrote directly to the guest destination pointer withstd::memsetwithout validating caller memory writability, triggering an unhandled host access violation (0xc0000005) on unwritable memory.Zeroed parameter blocks are now written through
GuestCopyOut_nid_no_patchwhile preservingerrno, returningSCE_FIBER_ERROR_INVALID(0x80590004) when copy-out fails as a defensive host-protection fallback.Tested
core/libs/tests/Fiber.cpp:sceFiberOptParamInitialize(nullptr)returningFiberErrorNullsceFiberOptParamInitialize(0x10)returningFiberErrorInvalid(reproducing unhandled host access violation0xc0000005on main, passing after fix)FiberOptParaminitialization confirming fields are properly cleared to zerofiber(Test #2136) andfiber_contextless(Test #2137) passed 100% (0.15 s)python tools/check_conventions.py --base origin/mainpassed cleanly with 0 findingspython tools/pr_overlap.py --branch fix/libSceFiber-pointer-validationverified 0 overlaps across 1,914 open PRsChecklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)