Repository navigation
fix(libSceIme): probe guest pointers; feat(web): cache the converter library pack; fix(libSceJson2): probe String, Value, collection and InitParameter2 guest pointers; fix(libSceFreeTypeOt), fix(libSceFreeTypeOl), fix(libSceVoice), fix(libkernel_sys), fix(libfreetype): probe the remaining unclaimed guest-pointer findings - #1
heavilyusingai wants to merge 8236 commits into
Conversation
|
I picked this up and have a fix ready. Research notes first, then what the change does. What settles the behaviour here
The fix (PR heavilyusingai/AnyPS5#1, branch
Measured: with main's The change is AI-assisted. Happy to rebase on any preferred base or adjust the messages to reviewer taste. |
bb9d662 to
6c7f7b2
Compare
Status update and rebase noteThe VnaWebsocket topic of this PR is done upstream. While scoping the next fix, upstream closed boykopovar/AnyPS5#19572 as completed on 13 Nov 20:28 UTC, and
What the new commit does
MeasuredLinux x86_64, GCC 12: with the fix, Remaining candidates for the next topics (still open upstream, no open PR on them): boykopovar#19012 (libSceIme caret/open parameter probing), boykopovar#18451/boykopovar#18439/boykopovar#18437/boykopovar#18436/boykopovar#18418 (ctest timeouts), boykopovar#18393/boykopovar#18417/boykopovar#18435 (PYTHONUTF8 on Windows CI), boykopovar#18191 (check_skips tool bug), boykopovar#19121 (Persian README). |
Topic 2: libSceIme — the caret and open parameter structures (boykopovar#19012)Commit
What the commit does
MeasuredLinux x86_64, GCC 12: upstream Patch for upstream submission: commit |
Verification pass (2026-11-15): everything re-confirmed, two upstream-claim updatesFull re-verification in a fresh sandbox: submodules re-initialized, both libraries rebuilt (GCC 12, Linux x86_64), all suites re-run. Reproduced:
Two findings from the re-check:
Net: the branch remains a verified working showcase with two |
Topic 3: feat(web) — the library pack now reuses Cache Storage (commit
|
fd40b59 to
d301121
Compare
Verification pass round 2 (2026-11-15): rebase, correction of one earlier finding, all greenFull re-verification from a fresh sandbox — and this pass corrected one claim from the last report and restructured the branch. Branch restructured: sysmodule commit dropped, rebased onto current
|
Progress report (667dbde → 28d6295)📈 System libraries: 41.28% (+1.25%, +585 implemented, +24 declared, -54 reverted, -19 removed functions) ✅ 585 implemented
⚪ 21 behaviourally empty (constant return or throw)
🆕 24 declared as stubs
|
| Library | Name |
|---|---|
| libSceFreeType | FT_Add_Default_Modules_nid_postfix |
| libSceFreeType | FT_Get_Module_nid_postfix |
| libSceFreeType | FT_Get_Renderer_nid_postfix |
| libSceFreeType | FT_Library_SetLcdFilterWeights_nid_postfix |
| libSceFreeType | FT_Library_SetLcdFilter_nid_postfix |
| libSceFreeType | FT_Remove_Module_nid_postfix |
| libSceIcu | ucfpos_close_nid_postfix |
| libSceIcu | ucfpos_constrainCategory_nid_postfix |
| libSceIcu | ucfpos_constrainField_nid_postfix |
| libSceIcu | ucfpos_getCategory_nid_postfix |
| libSceIcu | ucfpos_getField_nid_postfix |
| libSceIcu | ucfpos_getIndexes_nid_postfix |
| libSceIcu | ucfpos_open_nid_postfix |
| libSceIcu | uloc_canonicalize |
| libSceIcu | uloc_getBaseName |
| libSceIcu | uloc_getCountry |
| libSceIcu | uloc_getLanguage |
| libSceIcu | uloc_getScript |
| libSceJson2 | _ZN3sce4Json6String6appendEPKc |
| libSceJson2 | _ZN3sce4Json6String6appendERKS1_ |
| libSceJson2 | _ZNK3sce4Json6String7compareEPKc |
| libSceJson2 | _ZNK3sce4Json6String7compareERKS1_ |
| libSceJson2 | _ZNK3sce4Json6StringeqEPKc |
| libSceJson2 | _ZNK3sce4Json6StringeqERKS1_ |
| libSceLibcInternal | inet_aton_nid_postfix |
| libSceLibcInternal | inet_network_nid_postfix |
| libSceLibreSsl | SSL_CIPHER_get_bits_nid_postfix |
| libSceLibreSsl | SSL_CIPHER_get_name_nid_postfix |
| libSceLibreSsl | SSL_CIPHER_get_version_nid_postfix |
| libSceLibreSsl3 | X509_ALGOR_get0_nid_postfix |
| libSceLibreSsl3 | tls_config_parse_protocols_nid_postfix |
| libSceNpTrophy | sceNpTrophyGroupArrayGetNum |
| libSceNpTrophy | sceNpTrophyNumInfoGetTotal |
| libSceNpTrophy | sceNpTrophySetInfoGetTrophyFlagArray |
| libSceNpTrophy | sceNpTrophySetInfoGetTrophyNum |
| libc | getsubopt_nid_postfix |
| libcairo | cairo_matrix_init |
| libcairo | cairo_matrix_init_identity |
| libcairo | cairo_matrix_init_translate |
| libcairo | cairo_matrix_invert |
| libcairo | cairo_matrix_multiply |
| libcairo | cairo_matrix_rotate |
| libcairo | cairo_matrix_scale |
| libcairo | cairo_matrix_transform_distance |
| libcairo | cairo_matrix_transform_point |
| libcairo | cairo_matrix_translate |
| libcairo | cairo_region_get_rectangle |
| libcairo | cairo_region_union_rectangle |
| libcairo | cairo_set_dash |
| libcairo | cairo_surface_create_for_rectangle |
| libcairo | cairo_surface_create_similar |
| libfreetype | FT_Gzip_Uncompress_nid_postfix |
| libkernel | getsockopt_nid_postfix |
| libkernel | setsockopt_nid_postfix |
🗑️ 19 removed
| Library | Name |
|---|---|
| libSceLibcInternal | _ZNKSt5ctypeIwE10do_toupperEPwPKw_nid_postfix |
| libSceLibcInternal | _ZNKSt5ctypeIwE10do_toupperEw_nid_postfix |
| libSceLibcInternal | _ZNKSt5ctypeIwE11do_scan_notEsPKwS2__nid_postfix |
| libSceLibcInternal | _ZNKSt5ctypeIwE5do_isEPKwS2_Ps_nid_postfix |
| libSceLibcInternal | _ZNKSt5ctypeIwE5do_isEsw_nid_postfix |
| libSceLibcInternal | _ZNKSt8time_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE3putES3_RSt8ios_basewPK2tmcc_nid_postfix |
| libSceLibcInternal | _ZNKSt8time_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE6do_putES3_RSt8ios_basewPK2tmcc_nid_postfix |
| libSceLibcInternal | __std_atomic_wait_direct_16_nid_postfix |
| libSceLibcInternal | __std_atomic_wait_direct_8_nid_postfix |
| libSceLibcInternal | libSceLibcInternalInventory_196_nid_no_patch |
| libSceLibcInternal | libSceLibcInternalInventory_238_nid_no_patch |
| libSceLibcInternal | libSceLibcInternalInventory_243_nid_no_patch |
| libSceLibcInternal | libSceLibcInternalInventory_251_nid_no_patch |
| libSceLibcInternal | sceLibcInternalPending3_014_nid_no_patch |
| libSceLibcInternal | sceLibcInternalPending3_015_nid_no_patch |
| libSceLibcInternal | sceLibcInternalPending3_020_nid_no_patch |
| libSceLibcInternal | sceLibcInternalPending3_022_nid_no_patch |
| libSceLibcInternal | sceLibcInternalPending4_071_nid_no_patch |
| libSceNpPartner001 | libSceNpPartner001Unknown_pQfYTZHznMc_nid_no_patch |
Changed libraries (implemented exports)
| Library | Before | After | Change |
|---|---|---|---|
| libc | 1775/1779 (99.78%) | 1786/1793 (99.61%) | -0.17% |
| libcairo | 90/161 (55.90%) | 115/161 (71.43%) | +15.53% |
| libfontconfig | 23/53 (43.40%) | 24/53 (45.28%) | +1.89% |
| libfreetype | 16/26 (61.54%) | 16/26 (61.54%) | +0.00% |
| libkernel | 717/767 (93.48%) | 715/767 (93.22%) | -0.26% |
| libkernel_sys | 187/820 (22.80%) | 191/820 (23.29%) | +0.49% |
| libSceAjmi | 4/24 (16.67%) | 6/26 (23.08%) | +6.41% |
| libSceFont | 153/240 (63.75%) | 160/241 (66.39%) | +2.64% |
| libSceFontGs | 4/6 (66.67%) | 8/10 (80.00%) | +13.33% |
| libSceFreeType | 142/152 (93.42%) | 136/152 (89.47%) | -3.95% |
| libSceFreeTypeOt | 141/199 (70.85%) | 142/199 (71.36%) | +0.50% |
| libSceGnmDriver | 35/67 (52.24%) | 41/72 (56.94%) | +4.71% |
| libSceHttp | 107/123 (86.99%) | 110/123 (89.43%) | +2.44% |
| libSceHttpCache | 13/30 (43.33%) | 16/30 (53.33%) | +10.00% |
| libSceIcu | 208/2757 (7.54%) | 251/2762 (9.09%) | +1.54% |
| libSceJsc | 65/737 (8.82%) | 82/737 (11.13%) | +2.31% |
| libSceJson2 | 134/223 (60.09%) | 132/223 (59.19%) | -0.90% |
| libSceJxr | 118/143 (82.52%) | 128/143 (89.51%) | +6.99% |
| libSceLibcInternal | 425/1130 (37.61%) | 478/1131 (42.26%) | +4.65% |
| libSceLibreSsl | 302/473 (63.85%) | 304/473 (64.27%) | +0.42% |
| libSceLibreSsl3 | 582/701 (83.02%) | 598/705 (84.82%) | +1.80% |
| libSceMediaFrameworkInterface | 0/177 (0.00%) | 0/191 (0.00%) | +0.00% |
| libSceMouse | 12/29 (41.38%) | 16/29 (55.17%) | +13.79% |
| libSceMove | 12/21 (57.14%) | 15/21 (71.43%) | +14.29% |
| libSceNKWebKit | 2998/11258 (26.63%) | 3133/11261 (27.82%) | +1.19% |
| libSceNpCppWebApi | 1342/1778 (75.48%) | 1477/1822 (81.06%) | +5.59% |
| libSceNpPartner001 | 3/4 (75.00%) | 4/4 (100.00%) | +25.00% |
| libSceNpRemotePlaySessionSignaling | 8/14 (57.14%) | 10/14 (71.43%) | +14.29% |
| libSceNpSessionSignaling | 26/31 (83.87%) | 27/31 (87.10%) | +3.23% |
| libSceNpTrophy | 26/110 (23.64%) | 22/110 (20.00%) | -3.64% |
| libSceNpTus | 137/142 (96.48%) | 139/142 (97.89%) | +1.41% |
| libSceNpUniversalDataSystem | 72/93 (77.42%) | 73/93 (78.49%) | +1.08% |
| libSceNpWebApi2 | 34/45 (75.56%) | 35/45 (77.78%) | +2.22% |
| libSceOpusCeltEnc | 8/15 (53.33%) | 9/15 (60.00%) | +6.67% |
| libSceOpusSilkEnc | 8/15 (53.33%) | 9/15 (60.00%) | +6.67% |
| libScePosixForWebKit | 31/38 (81.58%) | 33/38 (86.84%) | +5.26% |
| libSceRudp | 33/35 (94.29%) | 34/35 (97.14%) | +2.86% |
| libSceSaveData.native | 56/120 (46.67%) | 59/120 (49.17%) | +2.50% |
| libSceSystemGesture | 23/24 (95.83%) | 24/24 (100.00%) | +4.17% |
| libSceSystemService | 154/617 (24.96%) | 156/617 (25.28%) | +0.32% |
| libSceUlt | 79/96 (82.29%) | 82/96 (85.42%) | +3.12% |
| libSceUsbStorage | 12/47 (25.53%) | 14/47 (29.79%) | +4.26% |
| libSceVideoRecordingP | 9/26 (34.62%) | 10/26 (38.46%) | +3.85% |
| libwebrtc | 182/412 (44.17%) | 217/412 (52.67%) | +8.50% |
d301121 to
5b61072
Compare
Contribution 3:
|
50337bc to
28d6295
Compare
|
Rebased onto the current upstream Patch-ids are unchanged ( Local-kit patches regenerated ( |
4fb03f0 to
7e2507b
Compare
|
Rebased this branch onto current Topic 4 closes the audit's Local results: all 38 pre-existing modern/legacy JSON2 suites unchanged (the only failure remains the pre-existing |
7e2507b to
88e98c5
Compare
|
Round 5 — Array/Object collection probes (commit 5/5 of the JSON2 audit series) Rebased onto upstream
The debt-doc Array/Object entry is at line 22; the PR description now carries the topic-5 summary and tested note. |
88e98c5 to
e6d7dcc
Compare
|
Round 6 — InitParameter2 probes (commit 6/6; the libSceJson2 audit series is complete) Rebased onto upstream
|
e6d7dcc to
a870336
Compare
|
Round 7 — rebase, re-verification, and a tracker-picked fix (commit 7/7)
|
…changed-test-scope docs(build): explain Windows AGC changed-test coverage
…on-launch-guard fix(tools): guard replay comparison launches on Windows
…rify-submodules fix(tools): verify submodule revisions after rebases
…getgain-measured-1360 docs(debt): record the 13.60 measurements of the GetGain and GetRerouteCount validation paths
…close-service-tail-1360 docs(debt): record that sceAudioInClose reaches the audio service for a free slot
…null-values fix(libSceNKWebKit): treat a NULL JSValueRef as null in the JavaScriptCore C API
…rt-scan perf(tools): speed up file scanning and entry labeling in debt_report
…lize-private-data fix(libSceNKWebKit): keep private data readable in finalize when a context group is destroyed
…bigint-proxy-types fix(libSceNKWebKit): report a BigInt as an object type and stop unwrapping proxies in JSValueIsArray
…hared-device-invalid-state fix(libSceAudioIn): answer invalid state for shared-device handles outside the port table
Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
Every public sce::Json::Value entry point now reads the caller's value through checked 32-byte node copies and validates payload handles before the raw storage walks. Mutations run against a host snapshot written back with checked stores; unreadable values present the null-value contract and readable values with unreadable payloads degrade per operation instead of crashing the host. Storage owners, child parent links and auxiliary fallback parents bind to the real object where the raw machinery creates them, allocation order matches raw including the nested-copy partial-failure states, and string payload release reuses the String probe layer. serialize paths and raw internal call sites keep raw handling. A value-probes suite covers the contract. Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
Every public sce::Json::Array, Object, iterator and Pair entry point now reads caller pointers through checked field probes and writes results back with checked stores. Unreadable collections present the empty contract (typed getter defaults, no-op mutations, unbound iterators and NotImplemented where raw reports it), fresh containers bind begin/end to the self-looped sentinel head, insert/erase with unreadable keys skip mutation, and inserting a pair whose key cannot be read leaves the collection untouched instead of faulting. Iterator states, link payloads, owner addresses and allocation order match raw; failed result writes release admitted state and probe failures never notify the allocator. Registered GuestJsonCollectionProbes covers the contract. Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
Queue commands receive the slot address sceSdmaOpen published through a checked copy-out, then dereference it raw. A forged or corrupted handle turned into an unchecked host write or fault. The eight queue-management exports and the submit path now resolve the handle against the slot table and refuse unknown addresses with SdmaErrorInvalidArgument; every address Open can publish still resolves, closed slots keep resolving so their refusal contracts are unchanged, and a slot re-opened at the same address works again. GuestSdma covers the forged and unmapped handles beside the existing null and closed contracts. Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
sceImeBackendOpen dereferenced the whole 0x28-byte parameter structure and scanned the initial string with an unbounded UTF-16 length scan, and the candidate, convert-mode and text outputs wrote through raw stores the audit could not see past the CopyText helper. The parameter is now copied in with a checked guest copy, the initial string is read chunk-wise through the same copies with raw's terminator-inside-the-limit admission and too-long refusal, the string scan left ValidateParam so raw's error precedence is unchanged, and every output (candidate list, candidate select, convert mode and the CopyText destinations) publishes through checked copies. Unreadable parameters and strings refuse with the null-argument code as a host-safety fallback (unmeasured on a console), preserving caller errno; a refused EnterCharacter still keeps its inserted character like raw. GuestImeBackend covers the unreadable parameter and string, the too-long and limit-exact strings, the unwritable outputs and the readable round-trips. Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
The Ot exports dereferenced guest-resident freetype mirrors and published outputs through raw stores: the vector and metrics math read their operands and wrote their results directly, the service lookup walked descriptor arrays and compared guest strings raw, the render and glyph-slot entry points read handle fields raw, and the resource-fork scanner wrote its outputs through unchecked pointers. Every access now goes through GuestCopyIn/GuestCopyOut with the caller's errno preserved: refusals mirror raw's contracts (invalid-argument throws where raw faulted, no-op returns where raw no-opped, the raccess outputs throw like raw's null check, and the count is published before a refused offsets pointer so callers can observe the ordering), and the queue of computed values is only stored after the publish succeeds. GuestFreeTypeOtCalc is a new suite covering the calc trio's readable round-trips and refusals; GuestFreeTypeOtGlyphSlot, GuestFreeTypeOtRaccess and GuestFreeTypeOtRenderInternal gain unreadable-pointer sections. Upstream main's build SIGSEGVs (exit 139) on the same tests; this commit exits 0. tools/guest_pointer_audit.py libSceFreeTypeOt reports 0 findings. Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
…robe hb_ft_face_create_cached checked the guest face record and published the cached-face generic back through a file-local errno wrapper the audit cannot classify. The flagged publish sites now call the checked guest copy and writability probes directly with the caller's errno preserved, so the audit sees the checked path; behavior is unchanged. tools/guest_pointer_audit.py learns GuestWritable_nid_no_patch: the fault-guarded writability probe belongs in the checked-call family alongside GuestCopyIn/GuestCopyOut, so an address taken for a probed write counts as checked. libharfbuzz reports 0 findings; the GuestHarfBuzzFreeTypeShaping cached-face coverage is unchanged. Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
…ram base scePlayerSelectionDialogParamInitialize derived the magic from the address of the base member, phrased as a raw member access on the guest parameter. The same address now comes from the parameter itself plus the member offset, and the initializer still publishes the whole structure through a checked copy. Behavior is unchanged; the existing GuestPlayerSelectionDialog initialize round-trip and unreadable-parameter refusal cover the path. libScePlayerSelectionDialog reports 0 findings. Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
… pointer sceWebBrowserDialogGetResult published the canceled result through the address of the result member, phrased as a raw member access on the guest result pointer. The slot address now comes from the pointer itself plus the member offset, and the write still goes through the checked copy helper with the arg-null refusal on failure. Behavior is unchanged; the existing GuestWebBrowserDialog refused-output coverage covers the path. libSceWebBrowserDialog reports 0 findings. Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
Upstream's wrapper-pointer fix stopped one export short: sceFreeTypeOlAlloc still zeroed the output through a raw store, read the guest allocator recorder raw and published the block through a raw pointer. The recorder and output are now probed with checked guest copies, the caller's errno preserved: the raw-matching null pre-write is kept (checked), an unreadable recorder or missing alloc callback refuses with 6, and the allocated block publishes through a checked copy that returns 6 on refusal, leaving the raw-matching 64 for an allocation the allocator itself reports as failed. GuestFreeTypeOlModules gains the unreadable recorder, missing callback, unreadable output, zero-size and alloc-failure sections. Upstream main's ModuleWrappers SIGSEGVs (exit 139) on the same test; this commit exits 0. libSceFreeTypeOl reports 0 findings. Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
sceVoiceInit read the guest VoiceInitParam's app_type raw. The parameter is now copied in with a checked guest copy with the caller's errno preserved; an unreadable parameter refuses with the raw InvalidArgument contract instead of faulting, and the app-type validation and stored app type come from the local copy. GuestVoice gains an unreadable parameter section: upstream main's Export.cpp SIGSEGVs (exit 139) on the same test, this commit exits 0. libSceVoice reports 0 findings. Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
pthread_attr_setstackaddr dereferenced the guest attr slot raw and pthread_get_specificarray_np wrote its key array entries raw. The slot handle is now read through the checked copy helper with the caller's errno preserved (an unreadable slot refuses with the raw EINVAL contract, the probed handle's host record stays direct library state), and the array entries publish one at a time through checked copies that return the raw EFAULT contract on refusal. GuestKernelSysPthreadNp gains unreadable-slot and unreadable-array sections in the attr and specific cases: upstream main's Export.Discovery.cpp SIGSEGVs (exit 139) on the same cases, this commit exits 0. libkernel_sys reports 0 findings. Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
FT_Set_Default_Properties, freetypeLegacyBitmapBlend and freetypeLegacyLibrarySetLcdGeometry read the guest library wrapper's host handle raw, and the blend path walked the wrapper's face list raw to sync the blended bitmap. The handle is now probed with a checked guest copy with the caller's errno preserved — an unreadable wrapper yields the raw null-host branches instead of a fault — and the face walk moved into an internal helper taking the probed wrapper, matching the FreeTypeOt render-internal precedent. GuestLegacyFreeTypeLibrary and GuestLegacyFreeTypeBitmapBlend gain unreadable-library sections; both suites run in the project CMake CI (the sandbox harness hosts their module-loading form). libfreetype reports 0 findings. Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
The service lookup compared guest strings through a hand-rolled per-unit copy into fixed stack buffers. The same bound and refusal now come from libc's CopyGuestString_nid_no_patch, the bounded checked helper the other libraries already use for guest identifiers, removing the local helper and the string comparison; an identifier without a terminator inside the bound still refuses the lookup, so the existing boundary case is unchanged. Also drops a dead test lambda and a weak either-way assertion from the calc suite. Behavior is unchanged: all FreeTypeOt probe suites pass and the audit stays at 0 findings. Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
Upstream's InitParameter2 guest-copy fix landed the LoadGuest-based getters this series' rebases kept; the four raw definitions this series' Value commit had conflicted against are now dead duplicates and are removed. Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
…ts safely freeaddrinfo walked the guest-supplied result chain raw: the nodes are host allocations handed to the guest by getaddrinfo, and a forged chain faulted the host on the first unreadable member before corrupting it further with blind frees. Each node is now fault-guard probed before its strings are freed and the walk stops on an unreadable node. getnameinfo published the host and service strings through raw memcpy stores into the guest buffers; both outputs now go through checked copies that return the function's own buffer-error code on refusal, leaving neither output partially written. getaddrinfo reused its parameter names for the host-side copies, which the audit reads as raw string calls; the copies now carry their own names and the numeric parsing uses them. GuestPosixResolver is a new offline suite covering the numeric getaddrinfo round trips, the errno-preserving unreadable hints, node string, chain node, host output and service output refusals: upstream main's Resolver.cpp SIGSEGVs (exit 139) on the same test, this commit exits 0. libScePosixForWebKit reports 0 findings. Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
…vent exports Every exported function that reads or writes guest memory now goes through checked GuestCopyIn/GuestCopyOut probes with the caller's errno preserved: buffer attribute setters build locals and publish, attribute option and registration paths probe into locals, status getters publish snapshots, SysMode firmware answers answer 0 on unreadable modes, and GetEventCount probes the event payload. Refusals surface the library's INVALID_ADDRESS or INVALID_VALUE error instead of faulting on guest pointers. Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
94c3f04 to
e2e0c13
Compare
|
Round 15 — sync to Branch force-pushed as
Overlap handled: upstream landed Claim sweep for the next slice: the census's big remaining slices are all actively claimed — NpCppWebApi 538 (boykopovar#21551), libc 300, NKWebKit 264, NpCommon 229 (boykopovar#22389/boykopovar#24452), webrtc 184, LibreSsl 121+102 (51 open fix PRs), Icu 101 (12), FreeType 78 (6), NpManager 60 (boykopovar#21547/boykopovar#22504), libkernel 52 (boykopovar#24470), Font 46 (7), LibcInternal 40, Agc 37 (8), Jsc 32 (7). Mid-size leftovers are claimed too: Ampr 11 (boykopovar#20633), Psml_debug 8 (boykopovar#22275), Http 8, Usbd 9, Ngs2.native 5 (boykopovar#23227/boykopovar#22860/boykopovar#21141), Ajm.native 6, AppContent 5, GnmDriver 19 (boykopovar#24455), AgcDriver 15 (boykopovar#23432 covers only Submit's queue context; the Eq/Configuration/Resource/Unimplemented getters remain). No duplicate work is being opened; the next slice will pick from the genuinely unclaimed residue. |
What
A series of standalone contributions, one topic per commit, each developed against upstream
mainand verified locally. Each commit is independently submittable toboykopovar/AnyPS5as its own pull request (git format-patch upstream/main..HEADyields one patch per topic). The branch currently sits on upstreammain(rebased onto the tip on every round with zero file overlap).— resolved upstream (as are topics 6, 9 and 10: upstreamfix(libSceIme): probe the caret and open parameter structuresmainlandeddc52cc6118for the Json2 InitParameter2 copies,dd696c6378for libSceFreeTypeOl and835c2a59a0for the Http2 WaitAsync copy, so those were dropped from the series in the round-12/13 rebases): upstreammainlandeddec5326a72(caret/open parameter probes) and0ba9bea31c(input text buffer probe), so this topic was dropped from the series in the round-11 rebase. upstream issue #19012 Upstream open PR #19036 implements the same approach (Param/ExtendedParam copies,errnopreserved, unit-by-unit text copy); this patch stays blocked per the one-topic rule until that PR resolves.sceImeOpen_nid_postfix(viaValidateOpen) readparam->user_id,param->type,extended->priorityand the initial text buffer, andsceImeSetCaretreadcaret->index, with direct host accesses, so an unmapped pointer faulted the host. The structures are now copied withGuestCopyIn_nid_no_patchwith the caller'serrnopreserved, and the initial text is copied unit by unit, matching the previousTextLengthsemantics; an unreadable structure or buffer returnsErrorInvalidAddress(0x80bc0031) and error precedence for readable structures is unchanged. AsceImeSetTextfollow-up may be needed: it still reads its text directly.feat(web): reuse the verified library pack from Cache Storage— the converter's system-library pack (up to 512 MiB) re-downloaded on every conversion.downloadLibrariesnow checks Cache Storage (anyps5-libraries-v1) after the release-tag verification, before the download: a cached pack is re-verified (size + SHA-256) and served without a network fetch; only digest-verified bytes are stored; a stale or corrupt entry is deleted and re-downloaded; storage failures are ignored. The UI shows the newphaseCachedLibrariesphase (en/de/ar). Repeat conversions stop re-fetching the pack, and a session works on a flaky connection once the pack is cached.fix(libSceJson2): probe String guest pointers— the guest-pointer audit flags 186 raw dereferences in libSceJson2'sExport.cpp; this commit closes thesce::Json::Stringfamily (~28 public methods, the largest unclaimed slice; the remaining Value/Array/Object families stay open for follow-up commits). Rebased over the upstream libc errno-inside-copies fix. Every public String method now dereferencesself, the 24-byteTextheader and the character buffers through checked copies (GuestCopyIn/GuestCopyOut,errnopreserved), so a title passing a dangling or guest-residentStringno longer faults the host. Readable memory keeps byte-exact raw behavior: all 37 pre-existing JSON2 suites pass unchanged, including the reserved-header0xa5pattern, allocation-failure notification counts, padded growth math and counted-search shared-zerostrncmpsemantics. Unreadable memory maps to per-method conventions: reads to the existing null-header rules (empty string, zero capacity,npos, unequal), mutations to no-ops with rolled-back growth buffers, unreadable source text tostd::invalid_argumentwhere null text throws (the rule upstreamValue::setalready ships). Probe failures never fire the allocator notifier; destroying an unreadable header leaves both allocations unregistered rather than risking a double release. New regression suiteguest_json_string_probescovers unreadable objects, headers, character buffers and needles pluserrnopreservation and allocator conservation.fix(libSceJson2): probe Array and Object guest pointers— the same audit'ssce::Json::Array/Objectcollection families (~35 public methods: both collection constructors, copy constructors, destructors and assignment operators; Arraypush_front/push_back/insert/pop_front/pop_back/erase/front/back/empty/size/clear; both iterator sets — dereference, increment, advance, comparison, copy construction and assignment; Objectoperator[]/find/erase/insert(Pair)/begin/end/size/empty/clear; and thePairconstructors and destructor). Every entry point now reads caller pointers through checked field probes (collection storage, iterator states andPairmembers,errnopreserved) and writes results back with checked stores. Unreadable collections present the empty contract: typed getter defaults (Defaults(TypeNull), the raw(const Value*)16back fallback), no-op mutations, unbound iterators andNotImplementedexactly where raw reports it (emptypop_front, missing-storage element access). Fresh containers bindbegin/endto the self-looped sentinel head like raw; insert/erase with unreadable keys skip mutation while null key text keeps raw'semptyCharactersentry behavior, and inserting a pair whose key text cannot be read leaves the collection untouched because raw would fault the host. Iterator states, link payload placement (+16 Array / +48 Object), storage owner addresses and allocation order match raw; failed result write-backs release admitted state and probe failures never fire the allocator notifier. The remaining audit slice (InitParameter2, ~10 findings) stays open for a follow-up commit.fix(libSceJson2): probe InitParameter2 guest pointers— the audit's last libSceJson2 slice: theInitParameter2constructor (zeros plus float format 2),setAllocator/setAllocatorRtti/setFileBufferSize/setSpecialFloatFormatType, the four getters,InitParameterRtticonstruction andInitializer::initialize. Every member access now goes through checked copies: unreadable parameter objects and callback blocks fail per operation (mutations no-op, getters return zero defaults,InitParameterRtticonstruction leaves the readable parameter zeroed) andinitializerefuses an unreadable flag or parameter with0x80848120while the already-initialized state check keeps raw precedence over every probe (post-initialization calls with unreadable receivers still return0x80848111without touching them). Readable rtti callbacks publish the internal allocator only on a fresh module exactly like raw.initializevalidates exactly the 0x1c parameter prefix raw reads and then runs the raw body unchanged, so the allocation-entry suite's pinned cache-allocator-before-allocation/read-buffer-afterward order and mid-call mutation semantics stay byte-exact; the allocator object and its vtable remain raw (pre-existing debt). This completes the conversion of libSceJson2's 186 audit findings.fix(libSceSdma): resolve queue handles through the slot table— picked from the upstream issue tracker: the guest-pointer audit still flagged 8 direct dereferences in libSceSdma, and no open upstream PR covers the library. The eight queue-management exports and the submit path dereference the handle valuesceSdmaOpenpublished (a host slot address handed back by the title) — a forged or corrupted handle became an unchecked host write or fault. The handle is now resolved against the slot table and unknown addresses refuse withSdmaErrorInvalidArgument; every address Open can publish still resolves, closed slots keep resolving so their refusal contracts are unchanged, and a slot re-opened at the same address works again.guest_sdma_testsextended with forged (&local), unmapped (0x10) and re-open round-trip sections: the fixed build passes while upstreammain's build aborts on the same section (tools/guest_pointer_audit.py libSceSdmanow reports 0 findings).fix(libSceImeBackend): probe guest parameters and outputs— the next unclaimed audit slice (libSceImeBackend, 5 findings; libScePsml_debug is claimed by fix(libScePsml_debug): copy Mfsr guest params and outputs through GuestCopy boykopovar/AnyPS5#22275).sceImeBackendOpendereferenced the whole 0x28-byte parameter and scanned the initial string with an unbounded UTF-16 length scan; the candidate/convert-mode/text outputs wrote through raw stores hidden behind theCopyTexthelper. The parameter is now copied in with a checked copy, the initial string is read chunk-wise with raw's terminator-inside-the-limit admission and too-long refusal (the scan leftValidateParam, so raw's error precedence is unchanged), and every output publishes through checked copies. Unreadable parameters/strings refuse with the null-argument code as a host-safety fallback (unmeasured on a console) with callererrnopreserved; a refusedEnterCharacterstill keeps its inserted character like raw.GuestImeBackendextended with unreadable parameter/string, too-long and limit-exact strings, unwritable outputs and readable round-trips: upstreammain's build SIGSEGVs (exit 139) on the same test, this commit passes;guest_ime_backend_state_testsunchanged.fix(libSceFreeTypeOl): probe guest memory and handle reads— the next unclaimed audit slice (6 findings). The allocation wrapper dereferenced the whole guestFT_Memoryrecorder and stored its result through a raw pointer; the free wrapper read and cleared the block pointer raw;SupportModulesread the library handle's host pointer raw andDoneGlyphSlotread the slot's owner raw. All of these now go through checked fault-guarded guest copies: the recorder is admitted only when both callbacks are present, the block/result pointers publish through checked copies, and unmapped pointers refuse with raw's error contracts (6 for allocation, 0x21 for the module list, no-op for free/slot) instead of faulting, with callererrnopreserved and a refused allocation still zeroing the output like raw.GuestFreeTypeOlModulesextended with unreadable recorder/block/output/library/slot sections.A third commit (libSceSysmodule pointer probing, #19010) was removed from this branch: upstream merged #19031 covering it.
fix(libSceJson2): probe Value guest pointers— the same audit'ssce::Json::Valuefamily (~45 public methods: constructors/destructor, assignment, swap, the nine setters, the eight getters,count, the threeoperator[]/getValuepairs,referValue/referArray/referObject/referString/referBoolean/referInteger/referUInteger/referReal,toString,clearand the four handler setters). Every entry point now reads the caller's value through checked 32-byte node copies (errnopreserved) and validates payload handles before the raw storage walks: mutations run against a host snapshot written back with checked stores, unreadable Value objects present the null-value contract (typed getter defaults, element-access misses, conservative no-op mutations,0x80848104from handler registration), and readable values with unreadable string handles or collection storage keep those handles registered while payload-dependent operations degrade instead of faulting. Storage owners, child parent links and auxiliary fallback parents bind to the real object where the raw machinery creates them (never the transient snapshot), allocation order matches raw including the nested-copy partial-failure parent states, and the string payload release reuses the String probe layer with the handle released only after a successful header read.serialize/Serializepaths and raw internal call sites stay raw. New regression suiteguest_json_value_probescovers unreadable objects, payloads and storage pluserrnopreservation, allocator conservation and allocation-failure budgets.Tested
Linux x86_64, GCC 12 / Node 22.
guest_ime_openfull suite passes; a probe against upstreammain'sExport.cppdies withfatal SIGSEGV at address 0x10(exit 139), this commit returns0x80bc0031;tools/check_conventions.pyclean.worker-manifestfixture extended with a fake Cache Storage: the first download stores the verified pack, the second serves it without a second pack fetch (asserted via the recorded request log), a corrupt stale entry is deleted and re-downloaded, no-caches environments keep the old path;worker-manifest2/2,app/batch/failure-report/output-directory/directory-writer37/37,i18n10/10 after the rebase onto the Arabic-parity fix.tools/check_conventions.pyclean againstupstream/main.cachesAPI guarded byself.caches.numeric_localecase is the pre-existing environment-dependent skip: no decimal-comma locale installed); the newguest_json_string_probessuite passes;tools/check_conventions.py --base upstream/mainclean.main, all 38 pre-existing modern/legacy JSON2 suites keep passing unchanged (including the nested-copy allocation fingerprints, auxiliary-budget metadata states and float temporary/destination accounting), the newguest_json_value_probessuite passes, and only the pre-existingnumeric_localeenvironment skip remains;tools/check_conventions.py --base upstream/mainclean.main(329 upstream commits, zero file overlap), all 39 pre-existing modern/legacy JSON2 suites keep passing unchanged plus the newguest_json_collection_probessuite (40 of 41; the only non-pass is the pre-existingnumeric_localeenvironment skip: no decimal-comma locale installed);tools/check_conventions.py --base upstream/mainclean.main(236 upstream commits, zero file overlap), all 40 pre-existing modern/legacy JSON2 suites keep passing unchanged plus the newguest_json_init_parameter_probessuite (41 of 42; the only non-pass is the pre-existingnumeric_localeenvironment skip); the allocation-entry suite's pinned parameter-read-order assertions pass against the probedinitialize;tools/check_conventions.py --base upstream/mainclean.guest_sdma_testspasses including the new forged-handle section (upstreammain's Export.cpp aborts on the same test, exit 134; this commit exits 0); the full 42-suite JSON2 matrix still passes 41/42 after the 491-commit rebase;tools/check_conventions.py --base upstream/mainclean.guest_ime_backend_testspasses including the new probe sections (upstreammain's Export.cpp SIGSEGVs on the same test, exit 139; this commit exits 0);guest_ime_backend_state_testspasses unchanged;tools/guest_pointer_audit.py libSceImeBackendreports 0 findings;tools/check_conventions.py --base upstream/mainclean.guest_freetype_ol_modules_testspasses including the new probe sections (upstreammain's ModuleWrappers.cpp SIGSEGVs on the same test, exit 139; this commit exits 0);tools/guest_pointer_audit.py libSceFreeTypeOlreports 0 findings;tools/check_conventions.py --base upstream/mainclean.tools/guest_pointer_audit.py libSceHttp2reports 0 findings (was 1); the extendedguest_http2_guest_pointer_testscompiles clean and runs in the project CMake CI (the sandbox harness cannot host the transport — its pristine suite crashes there identically — so the offline round-trip is asserted by CI);tools/check_conventions.py --base upstream/mainclean.guest_freetype_ot_calc_tests(new),guest_freetype_ot_glyph_slot_tests,guest_freetype_ot_raccess_testsandguest_freetype_ot_render_internal_testspass including the new probe sections (upstreammain's Ot sources SIGSEGV on the same tests, exit 139; this commit exits 0);tools/guest_pointer_audit.py libSceFreeTypeOtreports 0 findings;tools/check_conventions.py --base upstream/mainclean.GuestHarfBuzzFreeTypeShaping,GuestPlayerSelectionDialogandGuestWebBrowserDialogcoverage covers the changed paths; all three libraries report 0 findings;tools/check_conventions.py --base upstream/mainclean.guest_freetype_ol_modules_testspasses including the new alloc probe sections (upstreammain's ModuleWrappers SIGSEGVs on the same test, exit 139; this commit exits 0);tools/guest_pointer_audit.py libSceFreeTypeOlreports 0 findings;tools/check_conventions.py --base upstream/mainclean.guest_voice_testspasses with the new unreadable-parameter section (upstream 139, this commit 0);guest_kernel_sys_pthread_np_testspasses all four modes including the new probe cases (upstream 139 onattr, this commit 0); the legacy-freetype suites gained unreadable-library sections (CI-hosted module runners);tools/guest_pointer_audit.pyreports 0 for all three libraries;tools/check_conventions.py --base upstream/mainclean.fix(libSceFreeTypeOl): probe the alloc wrapper's recorder and output— upstream's FreeTypeOl wrapper fix (dd696c6378) stopped one export short:sceFreeTypeOlAllocstill zeroed the output and read the guest allocator recorder raw. The recorder and output are now probed with checked copies,errnopreserved: raw's null pre-write is kept (checked), unreadable recorder or missing callback refuses with 6, the block publishes through a checked copy returning 6 on refusal, and the raw 64 stays for a failed allocation.GuestFreeTypeOlModulesgains unreadable recorder/output, missing-callback, zero-size and alloc-failure sections — upstreammainSIGSEGVs (exit 139) on the same test, this commit exits 0. libSceFreeTypeOl reports 0 findings.fix(libSceVoice): probe the voice init parameter—sceVoiceInitreadparam->app_typeraw; the parameter is now checked-copied witherrnopreserved and the unreadable refusal mirrors raw'sInvalidArgument.GuestVoicegains an unreadable-parameter section (upstreammainSIGSEGVs 139 on the same test, this commit exits 0). libSceVoice reports 0 findings.fix(libkernel_sys): probe the attr handle and the specific-key array+fix(libfreetype): probe the legacy library handle— the pthread attr slot handle and specific-key array entries now go through checked copies (EINVAL/EFAULT refusals preserved), and the legacy-freetype exports probe the wrapper's host handle (unreadable wrapper yields the raw null-host branches) with the blend's face walk moved into an internal helper taking the probed wrapper (FreeTypeOt render-internal precedent).GuestKernelSysPthreadNp(upstream 139 / this commit 0 on the attr and specific cases) and the two legacy suites (CI-hosted PRX runners) gained unreadable sections. libkernel_sys and libfreetype report 0 findings.