Repository navigation
fix(libSceShare): return ERROR_INVALID_PARAM from status queries for unwritable pointers - #14973
Merged
oneandonlydean merged 1 commit intoNov 3, 2026
Conversation
…unwritable pointers
12 tasks done
|
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.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
In
core/libs/prx/libSceShare/Export.cpp,sceShareGetCurrentStatusandsceShareGetRunningStatuswrote directly to caller-supplied guest pointers (status) using rawstd::memsetand*status = 0. When passed invalid or unmapped memory pointers (e.g.(ShareCurrentStatus*)0x10or(uint32_t*)0x10), this caused an unhandled host access violation (0xc0000005).This PR:
statusrecords insceShareGetCurrentStatusandsceShareGetRunningStatususingGuestCopyOut_nid_no_patchpreservingerrno, returningERROR_INVALID_PARAM(0x81960002) if copy-out fails.core/libs/tests/GuestShare.cppwith negative assertions verifying that passing unwritable pointers returnsERROR_INVALID_PARAM.docs/dev/debt/libSceShare.mdthat returningERROR_INVALID_PARAMfor unwritable pointers insceShareGetCurrentStatusandsceShareGetRunningStatusis a defensive host-protection fallback and console behaviour is unmeasured.Tested
0xc0000005(write of0x10on thread 12856) in test feat(libs): add underscore Ult, internal Fiber and POSIX rwlockattr exports #2565guest_shareonorigin/mainbefore applying the fix.guest_sharepassed in 0.01s and neighborguest_share_playpassed in 0.04s.python tools/check_conventions.py --base origin/main(0 findings).python tools/pr_overlap.py --branch fix/libSceShare-pointer-validation(0 overlaps found across 1,909 open PRs).Checklist
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)