mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-11-05 13:20:11 +00:00
CRYPTO_malloc threw for a size of zero or less. LibreSSL 2.5.4, 3.4.1 and 3.4.3 all take an int size and return null there, so it now does the same, and the test checks for null instead of a throw. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
3.9 KiB
3.9 KiB
libSceLibreSsl technical debt
Unknown function info
- libSceLibreSsl pending exports - 365 named callable exports are listed in the PS5 3.20 export table and were cross-checked against the same module in PS5 firmware 13.60. Their signatures and behaviour are unverified; the declarations use the no-parameter unknown-signature convention and throw through
NotImplemented_nid_no_patch. - MD4, MD5, SHA1, SHA224, SHA256, SHA384 and SHA512 Init/Update/Final and SHA256 (libSceLibreSsl) - signatures and context layouts follow the LibreSSL headers, and buffering and
Finalfollow its sources; the module's LibreSSL version is unknown and nothing is checked on the console. Behaviour that differs between LibreSSL versions throws:SHA256with a null digest buffer (older versions return a static buffer) andSHA512_Finalwith the SHA-512/224 or SHA-512/256 digest length. Null contexts, null input with a nonzero length, null digest buffers in the 32-bitFinalfunctions and a buffered byte count that is not below the block size, which LibreSSL does not check, throw - DES_set_key, DES_ecb_encrypt, DES_set_odd_parity (libSceLibreSsl) - the 128-byte
DES_key_scheduleholds the 8-byte key followed by zeros instead of LibreSSL's precomputed subkeys, so a title reading its contents sees different bytes;DES_ecb_encryptderives the subkeys through mbedtls on each call. Not compared with the console. Results follow LibreSSL des_key.c and des.c:DES_set_keyskips the parity and weak-key checks and returns 0, as it does whileDES_check_keyis 0 (that variable is not in the PS5 export inventory), a nonzeroencencrypts, andDES_set_odd_paritysets each byte's low bit for odd parity. Null pointers throw where LibreSSL faults - X509_verify_cert_error_string - no console call is verified. The 64-bit argument, low-32-bit lookup, messages and shared numeric fallback follow LibreSSL 2.5.4, the version identified in published firmware 13.40 measurements. Console modifications and other firmware versions remain unverified. Unknown-code results share an overwritten static buffer and are not safe for concurrent use, as in that release; code 1 and codes above 54 use the numeric fallback.
- RAND_add, RAND_bytes, RAND_status, RAND_load_file, RAND_file_name, CRYPTO_malloc, CRYPTO_free, CRYPTO_set_mem_functions (libSceLibreSsl) - follow LibreSSL's rand_lib.c, randfile.c and malloc-wrapper.c, which are the same in 2.6.5 (3.4.3 linked); nothing is checked on the console.
RAND_bytesreads host entropy andCRYPTO_mallocandCRYPTO_freeuse the guest heap.CRYPTO_mallocreturns null for a size of zero or less, as LibreSSL 2.5.4 to 3.4 do; later versions take asize_tsize and callmalloc. A null buffer with a positive length throws