fix: payload ptrace/mount/symlink hardening + SDK version docs + install-all trim#173
Merged
Merged
Conversation
…rsion docs
Findings from a full-repo scan. Client + payload + docs; all gates green
(payload -Werror build, client typecheck/lint/754 tests, i18n 18-lang).
payload/src/ptrace_remote.c — three failure-path hardening fixes on the
ShellUI RPC primitives (candidate root cause for the FW-12 install crash
where the helper goes unreachable after a rejected install):
- pt_mmap: a failed remote mmap returns -errno in rax; callers only
checked ==-1||==0, so e.g. -ENOMEM (0xFFFF...F4) was used as a valid
pointer and dereferenced inside SceShellUI -> crash. Collapse the whole
[-4095,-1] range to -1 in one place so every caller is covered.
- pt_syscall: restore bak_reg on the pt_step/pt_getregs failure paths
(mirroring pt_call), so a later PT_DETACH can't resume ShellUI at the
syscall site with junk argument registers.
- pt_attach: PT_DETACH on waitpid failure so a mid-attach EINTR can't
leave ShellUI frozen + our tracer leaked (next attach would EBUSY).
payload/src/runtime.c — FS_MOUNT: validate the derived mount_name too, and
reject a lone "." — otherwise mount_name "." (or an image named "..exfat")
builds /mnt/ps5upload/. which the kernel normalises to the namespace root,
shadowing every existing mount. Also bump reconcile's src[256] -> src[512]
to match the writer/find-existing buffers (long source paths were truncated
-> false "source missing" at boot).
payload/src/register.c — copy_dir_recursive: lstat() instead of stat() when
staging sce_sys, so a symlink is skipped (as the comment already claims)
rather than followed — a hostile dump's sce_sys/leak -> /system_data/... no
longer copies a system file into user space, and a dangling link no longer
aborts the whole copy.
client/src/state/pkgLibrary.ts — trim an unfinished installAll WIP that
declared installAll/installingAll on the store interface without
implementing them (TypeScript TS2739 -> CI red) and an orphaned
pkgEntryInstallOrder helper. Keep the standalone-good failure-notification
bell so a failed install rings the bell instead of only updating the row.
README.md, FAQ.md, scripts/install-{macos,ubuntu,windows} — bump the pinned
PS5 Payload SDK from v0.38 -> v0.40 to match CI/release (publish.yml,
engine-ci.yml). v0.38 predates getloadavg(); make install && make payload
against it failed to link (undefined symbol: getloadavg). The historical
CHANGELOG 2.12.1 entry documenting the original v0.38->v0.39 bump is left
untouched.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
#171 was admin-merged without CI, so its webui.rs landed with formatting that cargo fmt --check rejects — blocking the engine job for every subsequent PR. cargo fmt --all touches the whole workspace regardless of feature gates, so this surfaced on the first post-#171 CI run. No behavior change. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 task
phantomptr
added a commit
that referenced
this pull request
Jul 6, 2026
…n order (#174) Implements #137's install-all request (and completes the WIP trimmed in #173). The Install Package screen gains an "Install all (N)" header button that installs every staged, not-yet-installed package sequentially through the existing readiness-gated install() cascade, in base -> update -> DLC order so an add-on never installs before its base (Sony's installer accepts an update/DLC whose base isn't present yet but then lands nothing). - pkgLibrary.ts: `pkgEntryInstallOrder` (mirrors uploadQueue.installOrderPriority for a PkgEntry) + `installAll` action + `installingAll` state. installAll snapshots the idle, not-installed rows, sorts by order, and awaits each install() (which self-serializes on `installing` and never throws), counting outcomes; one summary bell at the end. No-op if an install is already running. - InstallPackage screen: "Install all (N)" button, shown only when >1 row is installable (a single row already has its own Install button), disabled while any install runs. - pkgLibrary.test.ts: 5 cases pinning pkgEntryInstallOrder (category order, path-hint fallback, category-beats-path, batch sort). - en.ts + i18n-known-missing.json: two new keys, allowlisted for all 17 non-English locales per the coverage gate. Client-only; no payload/engine changes. typecheck + lint + 759 tests + i18n (18 langs) + vite build all green. Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
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.
Description
Fixes found during a full-repo scan (payload C, Rust engine, TS client, docs/scripts). All are defensive/failure-path changes plus a docs correction and a WIP trim — no success-path behavior changes.
Changes
Payload — ShellUI RPC ptrace hardening (
payload/src/ptrace_remote.c). Candidate root cause for the FW-12 install crash where the on-console helper goes unreachable after a rejected install (see #152, #164, #81):pt_mmap: a failed remotemmapreturns-errnoin rax, but callers only checked==-1 || ==0— so-ENOMEM(0xFFFF…F4) was used as a valid pointer and dereferenced inside SceShellUI → crash. Now collapses the whole[-4095,-1]range to-1in one place.pt_syscall: restoresbak_regon thept_step/pt_getregsfailure paths (mirroringpt_call), so a laterPT_DETACHcan't resume ShellUI at the syscall site with junk argument registers.pt_attach:PT_DETACHonwaitpidfailure so a mid-attachEINTRcan't leave ShellUI frozen with our tracer leaked.Payload — FS_MOUNT + reconcile (
payload/src/runtime.c):mount_nametoo, and reject a lone.— otherwisemount_name="."(or an image named..exfat) builds/mnt/ps5upload/.which the kernel normalises to the namespace root, shadowing every existing mount.src[256]→src[512]to match the writer / find-existing buffers (long source paths were truncated → false "source missing" at boot).Payload — sce_sys staging symlink safety (
payload/src/register.c):copy_dir_recursiveuseslstat()instead ofstat(), so a symlink is skipped (as the existing comment already claims) rather than followed — a hostile dump'ssce_sys/leak -> /system_data/...no longer copies a system file into user space, and a dangling link no longer aborts the whole copy.Client — install-all WIP trim (
client/src/state/pkgLibrary.ts): removes an unfinishedinstallAll/installingAllthat was declared on the store interface without an implementation (TypeScriptTS2739→ CI red) plus an orphanedpkgEntryInstallOrderhelper. Keeps the standalone-good failure-notification bell so a failed install rings the bell instead of only updating the row (partially addresses #137).Docs — SDK version (
README.md,FAQ.md,scripts/install-{macos,ubuntu,windows}): bump pinned PS5 Payload SDKv0.38 → v0.40to match CI/release (publish.yml,engine-ci.yml).v0.38predatesgetloadavg(), somake install && make payloadagainst it failed to link. The historical CHANGELOG 2.12.1 entry is left untouched.Type of Change
Testing
-Wall -Wextra -Werroragainst SDK v0.40.typecheck,lint, 754 Vitest tests, i18n coverage (18 langs) all pass.🤖 Generated with Claude Code