feat(libSceLibreSsl3): decode subjectAltName and issuerAltName in X509V3_EXT_d2i #27765
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/27765"
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 MarrasFederico on 2026-11-27T08:49:21Z.
What
X509V3_EXT_d2iinlibSceLibreSsl3threw for subjectAltName (85) and issuerAltName (86). Both now decode into aSTACK_OF(GENERAL_NAME), as LibreSSL 4.0.0x509_genn.candtasn_dec.cdo. The result can be released with the existingGENERAL_NAMES_free.ASN1_OBJECT, directoryName anX509_NAME, and x400Address keeps its whole encoding as a SEQUENCE string.CollectConstructedString(matching LibreSSL 4.0.0asn1_collectwithASN1_MAX_STRING_NEST = 5andstd::bad_alloc->MallocFailure), so constructed issuer strings inside an authority key identifier decode cleanly instead of throwing.ReadLengthrejects reserved0xffandsize_toverflow rather than capping the BER length octet count atsizeof(std::size_t), accepting leading-zero multi-octet lengths like LibreSSL 4.0.0asn1_lib.c.otherName and ediPartyName elements, constructed keyid/time strings and non-string indefinite lengths still throw. When the X509 name decoder fails inside a directoryName, it queues fewer
ASN1_R_NESTED_ASN1_ERRORentries than LibreSSL, so the test checks only the first reason. Allocation-failure queues for directoryName are not checked. The debt entry lists these gaps.Tested
Ubuntu 26.04, GCC 15.2.0, Release,
BUILD_TESTING=ON: atd188d3960157861e619aaeec07a1f2d42d7882c7,guest_libressl3_x509v3_ext_d2i3/3 (Windows host offline for this follow-up). Negative control: keepingcore/libs/prx/libSceLibreSsl3/src/X509V3ExtD2i.cppfromc399813f0fwith the updated tests failsguest_libressl3_x509v3_ext_d2iatcore/libs/prx/libSceLibreSsl3/tests/X509V3ExtD2i.cpp:194. Every input — including all constructed string and leading-zero BER length vectors — was verified against LibreSSL 4.0.0 (ce488b78), built separately, throughX509V3_EXT_d2i, giving the same count, types, string types and data, and the same error queue. The allocation sweeps compare the distinct queues against a failing-allocator run of the same build.Each of these breaks the test:
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)Summary by CodeRabbit
Imported from boykopovar/AnyPS5. Originally posted by coderabbitai[bot] on 2026-11-27T08:58:50Z.
Review: COMMENTED
Actionable comments posted: 1
f02467b6-b423-4868-ac22-d6f784df29b8Reviewing files that changed from the base of the PR and between
43e3b541e2andc399813f0f.core/libs/prx/libSceLibreSsl3/src/X509V3ExtD2i.cppcore/libs/prx/libSceLibreSsl3/tests/X509V3ExtD2i.cppdocs/dev/debt/changes/feat-libressl3-authority-keyid.mdIncluded review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-27T09:14:14Z.
Review: APPROVED
Reviewed — looks good
Nothing blocks this change; the review found no verified blocking defects.
What I ran
Reviewed head
c399813f0fc4f53e8d1d0ea631a44975ec199414. I read the prepared diff, manifest, description and all three changed files. No tests or build commands were run; the test results in the description are author-reported.Results
Findings
Blocking
None.
Non-blocking
None.
Not verified
No build or tests were run, so the reported Ubuntu/GCC test results were not independently confirmed. Console ABI and allocator behavior remain unverified as recorded in the debt entry. No files were excluded from the changed-file manifest.
To get this to a good state
Nothing is required.
Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-27T14:37:18Z.
Review: APPROVED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
c399813f0f:tools/check_conventions.pypassed.guest_libressl3_x509v3_ext_d2i_testsbuilt cleanly.guest_libressl3_x509v3_ext_d2i):core/libs/prx/libSceLibreSsl3/src/X509V3ExtD2i.cppreverted tomainand the new tests kept, the suite fails: Restoring the change makes it pass again.Looks Good To Me
Imported from boykopovar/AnyPS5. Originally posted by Plyxen on 2026-11-28T05:06:31Z.
Review: APPROVED
Checked head
c399813f0f. All on Windows 11 with WinLibs GCC 15.2 (Release), applied tomaina163d4b886together with #27930, #27929, #27926, #27925, #27924, #27923, #27922, #27901, #27828, #27771, #27755, #27748, #27682.tools/check_conventions.py --headandtools/debt_fold.py --checkpassed and the full build succeeded.guest_libressl3_x509v3_ext_d2ipasses. In the full CPU suite (5,120 tests) the only failures are unrelated:windows_read_trap_unknownfails onmaintoo (fixed in #28028).frame_capture_minimize,jpeg_external_toolchainandguest_pthread_mutex_contentionare timeouts under load; they pass when run on their own.guest_audio_in_capturepasses 20/20 onmainand with #27922.AI-assisted: yes (Claude Code)
Imported from boykopovar/AnyPS5. Originally posted by coderabbitai[bot] on 2026-11-28T09:56:28Z.
Review: COMMENTED
Actionable comments posted: 2
9f2d237e-2944-4b4a-a80c-0015490da076Reviewing files that changed from the base of the PR and between
c399813f0fand897e7876e5.core/libs/prx/libSceLibreSsl3/src/X509V3ExtD2i.cppcore/libs/prx/libSceLibreSsl3/tests/X509V3ExtD2i.cppdocs/dev/debt/changes/feat-libressl3-authority-keyid.mdIncluded review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-28T09:56:35Z.
Review: APPROVED
Reviewed — looks good
Nothing blocks this change; the remaining points are optional and are recorded in the debt entry.
What I ran
Reviewed head
897e7876e50da38d3893b0f9855d25455eb34026. No commands or tests were run; the test result below is author-reported.Results
Findings
Blocking
None.
Non-blocking
None.
Not verified
No programmatic checks were run. The test and negative-control results were not independently verified. Console ABI and allocator equivalence remain unverified, as recorded by the change.
files.jsonwas not available; the manifest marks the source, test, and debt entry as included, and I read all three.To get this to a good state
Nothing is required.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-28T10:07:07Z.
Review: APPROVED
Reviewed — looks good
Nothing blocks this change; the reviewed code and supplied test report support merging.
What I ran
Reviewed head
d188d3960157861e619aaeec07a1f2d42d7882c7. I did not run commands or tests; the Ubuntu test results and negative control below are reported in the PR description, not independently verified.Results
Findings
Blocking
None.
Non-blocking
None.
Not verified
The full changed files were read for
core/libs/prx/libSceLibreSsl3/src/X509V3ExtD2i.cpp,core/libs/prx/libSceLibreSsl3/tests/X509V3ExtD2i.cpp, anddocs/dev/debt/changes/feat-libressl3-authority-keyid.md; no changed files were excluded according to the manifest. Test execution and reported LibreSSL 4.0.0 parity were not independently verified. Console ABI and allocator behavior remain unverified, as documented in the debt note.To get this to a good state
Nothing is required.
Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-28T10:12:31Z.
Review: APPROVED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
d188d39601:tools/check_conventions.pypassed.guest_libressl3_x509v3_ext_d2i_testsbuilt cleanly.guest_libressl3_x509v3_ext_d2i):core/libs/prx/libSceLibreSsl3/src/X509V3ExtD2i.cppreverted tomainand the new tests kept, the suite fails: Restoring the change makes it pass again.Looks Good To Me
Imported from boykopovar/AnyPS5. Originally posted by ligmaSec on 2026-12-03T12:29:56Z.
Review: COMMENTED
Compiled and ran the exact
X509V3ExtD2ifixture on Linux with the branch’s changed sources and the existing LibreSSL libraries. The alternative-name decoding, allocation cleanup, and error cases passed.AI-assisted: yes.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.