feat(libSceLibreSsl3): implement ASN.1 value mutation and octet lifetime #14889
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/14889"
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 Noxy-HNR on 2026-11-01T22:46:57Z.
What
Four newly named LibreSSL3 exports currently throw:
ASN1_STRING_set,ASN1_INTEGER_set,ASN1_OCTET_STRING_cmpandASN1_OCTET_STRING_free. Implement binary/NUL-terminated string replacement, full signed 64-bit integer magnitudes, octet comparison and owned/borrowed buffer destruction through the application heap.Contracts come from LibreSSL 4.0.0 a_string.c, a_int.c and a_octet.c, using the existing 24-byte guest
Asn1String. Owned data is erased before release; NDEF string buffers remain borrowed. Invalid native dereference/overflow/alias cases throw. Console ABI and behavior are unverified; the debt entry also records the integer allocator's difference from LibreSSL's CBB allocation chain. No title unblock is claimed.Tested
Current head
e971edaa96is a maintainer merge of main9ade3ed806into23f56dae04. The ASN.1 implementation and regression test are byte-for-byte unchanged; the maintainer commit and its identity are preserved. The current-head Windows job now passed. Its log identifiese971edaa9696and shows ASN.1 value, ASN.1 decoder, ASN.1 string and session-metadata runtime tests passing. It reports zero failures among 3,436 selected CTest entries, including skipped entries; this is not a separate full Linux run. Local results below retain their original head and scope.Historical local verification (
23f56dae04): merged main6beaeef052without force-pushing; the only manual conflict resolution was the debt inventory. The ASN.1 implementation and regression test are unchanged. Windows 11 x86-64, WinLibs GCC 15.2.0/Ninja, Release,-j 18: rebuilt the real modules and all four focused ASN.1 targets;guest_libressl3_asn1_values,guest_libressl3_asn1,guest_libressl3_asn1_stringandguest_libressl3_asn1_objectall passed in each of three runs. Conventions and whitespace checks pass. Current-head hosted checks are pending.Historical hosted verification (
973e270f90): the Windows changed-test job passed;guest_libressl3_asn1_values, both ASN.1 decoders and the allocator regression passed. The job reports zero failures among 3,337 selected CTest entries, including skipped entries. Its log identifies this exact PR head. This is not a fresh full Linux run; earlier local and Linux results below retain their stated commits and scope.Latest rebase verification on November 2 (
47fe0f6392, based onmainatf6232fcfda): resolved the debt inventory conflict while preserving main's new entries. The ASN.1 implementation and its test source are byte-for-byte unchanged from710ff5eed5, including both owned-terminator alias fixes. Windows 11 x86-64, WinLibs GCC 15.2.0, Release: rebuilt the value, decoder, allocator and newly landed time-test targets; 5/5 focused tests passed (guest_libressl_asn1,guest_libressl_asn1_allocator,guest_libressl3_asn1_values,guest_libressl3_time,guest_libressl3_asn1). The public-header audit passes for 405 libraries / 27,952 exports; current conventions, whitespace and the current-main merge preview pass. The automatic Windows job subsequently passed on this head: 2,074 tests executed and passed, 959 skipped, zero failures across 3,033 selected CTest entries. The value-mutation, decoder and allocator tests all ran and passed. This is a changed-test workflow, not the separate full build requested in the follow-up. Older results below retain their tested heads.Prior follow-up verification (
710ff5eed5): the overlap guard also covers an owned empty string, whose data pointer is its terminator. The new regression checks that alias rejection preserves the pointer and zero length. Windows Release: the same four focused ASN.1 tests passed (4/4), and conventions and whitespace checks passed. The prior nonempty terminator fix in155b280226is preserved. Linux was not rerun for this follow-up.Windows 11 x86-64, WinLibs MinGW GCC 15.2.0, Release, configured from upstream
0580e5c951withBUILD_TESTING=ON.guest_libressl3_asn1_values_tests,guest_libressl3_asn1_testsandguest_libressl_asn1_teststhrough CMake.ctest --test-dir <build> -R '^guest_libressl(3_asn1_values|3_asn1|_asn1|_asn1_allocator)$' --output-on-failure: 4/4 passed.python core/libs/tests/test_public_headers.py --audit-only: 399 libraries / 26,743 exports passed.python tools/check_conventions.py --base origin/mainandgit diff --check: passed.nid_patcherand successfully patched a copy of the resulting PRX with the libc export-preservation option.The prior head was rebased onto
198e13c75e. The current rebase ontof6232fcfdaincludes newer upstream library and build inputs; the focused rebuild and tests above cover that integration.No Linux, console or retail-title runtime test was performed. The full project build/test suite was not run.
tools/pr_overlap.py --repo boykopovar/AnyPS5 --base main --branch HEADwas rerun against 1,777 open PRs. It returned exit 2 because several other heads conflict with main, so this is not an automatic overlap pass. Shared declarations, build registrations and debt diffs were inspected manually for #10461, #10631, #10960, #11146, #12754, #13486, #14212, #14483, #14499, #14612, #14992, #15031, #15045 and #15119, along with the adjacent-edit findings. No other implementation of these four exports was found; the report also compares this local rebase against this PR's own previous head. Other PRs still touch shared debt/build/declaration files, so integration may require another rebase as those land.Companion PR #14890 changes adjacent placeholder declarations in the same shared files. A local
git merge-treecheck reports conflicts if the two branches are combined. Merge this ASN.1 contribution first; the BIO PR declares this merge-order dependency and will need a rebase afterward.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)