feat(libSceLibreSsl): implement OCSP_RESPONSE_free #15994
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/15994"
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 sandivd on 2026-11-05T07:23:54Z.
What
Local audited commit:
57d0d3efe3d213ed8bd27ff35ecab54eeac0cf34; its source tree is identical to the verified six-file snapshot.Implement the C export
OCSP_RESPONSE_free(NIDbznVjTfYf9U) with its verified void/pointer System V ABI. It releases nested OCSP response strings, owned OID names/data/objects, the optional response-bytes container and the response through the existing guest allocator helpers. Owned string/OID bytes are erased before release, borrowed NDEF data and static OID storage survive, and sequence-member pointers are cleared in dispatcher order. Malformed non-null owned negative lengths throw before any release; this intentional fault-handling difference is recorded in debt.The contract follows pinned LibreSSL 2.5.4
ocsp/ocsp.h,ocsp/ocsp_asn.c,asn1/tasn_fre.c,asn1/tasn_typ.c,asn1/asn1_lib.candasn1/a_object.c. The corresponding 3.4.1 layouts and cleanup semantics agree. The pinned PS5 3.20 inventory supplies the name/NID mapping.Previous PR #12850 implemented the same export, was approved and was closed by its author without merging on October 31, 2026; no closure reason was found. This version reuses main's response layout and ASN.1 helpers and verifies dispatcher pointer clearing. It adds no dependency or initialization state. Base:
4639eff7f4c23325a916875a0e37f1e312fa18f4. The contribution merges cleanly with fetched upstream1e24993fa3a7da25e8fc27152af654687ba64552usinggit merge-tree; none of the six contribution paths changed there, so this baseline audit retained the tested base rather than rebasing. The newer merged tree has not received a fresh full build.The previous prescribed overlap checker scanned 1,885 open PRs and exited 2: six mechanical pending-export-counter conflicts (#10834, #10878, #10915, #11003, #14115, #15827) and 41 branches already conflicting with upstream. This audit refreshed all 47 head commits and states; every head is unchanged and every PR remains open. The prior full manual comparison across both LibreSSL modules therefore remains valid: none implements this export or changes its new nested layout or reused cleanup helpers. Fresh export-name/NID searches found only closed, unmerged #12850 and no active duplicate. Shared files and stale-branch normalization failures are not claimed as competing implementations. Simultaneous integration of those other PRs and search-index completeness remain uncertain; checker exit 0 is not claimed.
Tested
Local verification only; no hosted CI run was requested or claimed.
Focused baseline audit on the exact unmodified feature parent, using an isolated clean worktree, matching compiler/options, CTest properties, timeouts, relative working directories and Windows-drive/DrvFS storage setup:
A means the same failure reproduces on the base; B is an established platform/environment limitation; C is intermittent/inconclusive; D is introduced/worsened by this change. Variable addresses, PIDs, scheduling and AGC iteration counts are not treated as different assertions. All changed statuses/failure modes were reviewed separately. No OCSP-related reproducible regression remains. Complete original output and exact per-test comparisons are retained in the prepared local
baseline-regression-audit.md, paired case-output files and raw CTest logs for attachment before publication. Those artifacts are not yet uploaded.Final checks after the audit: 57/57 SSL-related tests on each OS; 65/65 Windows public-header checks; 65/65 Linux native-filesystem header checks in 71.08 s. All 6,015 native-copy inputs match both recorded hashes and the current source. Original 90/30-second header limits are unchanged. The previous WSL temporary control directory had expired; it was recreated from the retained verified archive before the passing run. Baseline prerequisite builds passed separately from the retained full feature builds. No assertions, timeouts, production code or test source were changed for this audit.
The original full-suite failures remain disclosed below. Baseline reproduction does not resolve every underlying AGC, exception or filesystem defect. The old logs do not preserve the complete ambient environment; recorded compiler/configuration and CTest settings were matched, while process load and timing necessarily differed.
Exact original executed failures and audit classifications
windows_crash_thread_nameagc_process_sampler_stackagc_driver_direct_write_completionexec_argumentsguest_filesystemguest_raise_short_sleepguest_raise_short_sleep_without_wakepublic_headersguest_kernel_sysguest_accesslog_fileagc_driver_bc_block_copyagc_driver_depth_compare_copyagc_driver_image_srgb_sample_copyagc_driver_lookup_log_fits_buildagc_driver_native_depth_bda_clearagc_driver_native_multisample_depthagc_driver_sample_multisample_targetagc_driver_sampled_cache_budgetagc_driver_sampled_clear_keysagc_driver_staged_clear_sampled_readagc_driver_msaa_dcc_srgb_clear_2agc_driver_msaa_dcc_clear_2agc_driver_msaa_dcc_compared_import_2agc_driver_msaa_dcc_srgb_clear_4agc_driver_msaa_dcc_clear_4agc_driver_msaa_dcc_compared_import_4agc_driver_msaa_dcc_srgb_clear_8agc_driver_msaa_dcc_clear_8agc_driver_msaa_dcc_compared_import_8agc_driver_frame_capture_eopagc_driver_frame_replay_shaderagc_driver_frame_replay_shader_hostagc_driver_frame_replay_shader_prologue_codeagc_driver_frame_replay_shader_prologue_headeragc_driver_frame_replay_shader_prologue_readonlyagc_driver_frame_replayagc_driver_frame_replay_concurrentagc_driver_image_srgb_sample_copy_forcedagc_driver_native_depth_retirementagc_driver_native_depth_clearsagc_driver_native_depth_clear_refusalsagc_driver_native_depth_stencilagc_driver_native_depth_separate_stencilagc_driver_native_depth_aliased_stencilagc_driver_native_depth_aliased_depth_depth_onlyagc_driver_native_depth_aliased_depth_stencilagc_driver_native_depth_aliased_depth_no_stencilagc_driver_native_depth_expand_gateagc_driver_native_depth_stencil_viewagc_driver_native_depth_buffer_clearagc_driver_native_depth_uniform_planesagc_driver_native_depth_publicationagc_driver_native_depth_driver_pathagc_driver_native_depth_driver_queued_fillagc_storage_kept_unit_settleagc_storage_idle_writeback_raceagc_driver_recorderagc_driver_sampled_cache_budget_without_storage_image_multisampleagc_driver_resource_cache_replaced_textureagc_driver_resource_cache_lookup_changedagc_driver_resource_cache_collect_refusalsagc_driver_staged_clear_sampled_read_draw_pipelineagc_driver_image_table_vouch_queued_drawsguest_file_timestampsguest_filesystemguest_mmap_executableguest_kernel_fcntlsymlink_file_writer_binarysymlink_file_writer_textfile_writer_binaryfile_writer_textguest_none_relocationsguest_none_relocations_sceoverlapping_relocationsguest_needed_modulesinput_fileThe 64 original Linux dependency blocks are
public_headers_compile_0throughpublic_headers_compile_63; their individual outcomes/classifications are preserved in the audit report.Windows: Windows 11 Home Single Language 10.0.26300; MSYS2 UCRT64 GCC 16.2.0, CMake 4.4.4, Ninja 1.13.2, Python 3.10.0. The broad GPU suite used NVIDIA RTX 3050 Ti Laptop GPU, driver 32.0.16.1656. Linux: Ubuntu 24.04.1 under WSL2 kernel 5.15.167.4, GCC 13.3.0, CMake 3.28.3, Ninja 1.11.1; broad GPU tests used llvmpipe LLVM 20.1.2.
Ownership tests check release order, byte erasure, optional/null fields, all 16 OID flag combinations, static and borrowed members, zero-length ownership, pointer clearing and three negative owned-length positions without partial destruction. Separate probes run the complete ownership graph through existing libSceLibreSsl3 forwarding on both systems. Seven isolated negative controls per platform (stub, wrong order, missing wipe, missing pointer clear, missing preflight, ignored NDEF and freeing a static OID) all compiled and were detected; restored final source passed. Those controls used the earlier
8bfe082f60base; the production/test files and allocator helpers remain unchanged after integration, and all positive checks above were rerun on the stated final base.Full-suite failures are retained, not disabled. Windows failures:
windows_crash_thread_name,agc_process_sampler_stack,agc_driver_direct_write_completion,exec_arguments,guest_filesystem,guest_raise_short_sleep,guest_raise_short_sleep_without_wake. They concern unchanged filesystem, diagnostics/SEH fixtures, AGC completion and exec/exception paths. Earlierguest_sleep_wakefailed intermittently at the preceding base and passed in the final run. Some underlying Windows causes remain unresolved.Linux's mounted workspace has DrvFS-specific permission/descriptor/timestamp/mapping failures; six original binaries pass with unchanged assertions when only their working directory is moved to native Linux storage. A separate byte-verified source snapshot passes all 65 public-header checks under their original limits. The original CTest summary reports 134 failures: 70 executed failures and 64 blocked header batches; JUnit's 210 skipped entries include those 64 blocks and 146 capability skips. Moving only temporary storage to native Linux also makes
input_file,guest_needed_modulesandoverlapping_relocationspass;guest_none_relocationsand its SCE variant still hit their unchanged 20-second limits and remain unresolved. Other Linux failures include the unavailable asynchronous userfaultfd write watch, missing /dev/udmabuf and AGC assertions; some individual GPU causes remain unresolved. Thelog_filechild-output mismatch was traced to the existing write-watch warning prepended to stderr. The original full-suite report still includes all failures, dependency blocks and skips. Detailed logs and the complete failure lists are available locally for attachment before submission.Current-upstream conventions pass without findings, test-script registration passes (257 scripts), and git diff --check passes. The overlap checker has the documented exit-2 limitation and completed manual review above.
No PS5 hardware or title execution was performed. Native PS5 layouts/allocator interoperability and firmware modifications remain unverified. The response decoder still throws; tests construct source-defined objects using the registered guest allocator. No separate native LibreSSL runtime oracle was run for this contribution.
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)