openssl/crypto/pem
erbsland-dev 5387b71acb Fix Edge Cases in Password Callback Handling
Fixes #8441: Modify the password callback handling to reserve one byte in the buffer for a null terminator, ensuring compatibility with legacy behavior that puts a terminating null byte at the end.

Additionally, validate the length returned by the callback to ensure it does not exceed the given buffer size. If the returned length is too large, the process now stops gracefully with an appropriate error, enhancing robustness by preventing crashes from out-of-bounds access.

Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/25330)
2024-09-09 08:58:03 +02:00
..
build.info
pem_all.c Rename OSSL_ENCODER_CTX_new_by_EVP_PKEY and OSSL_DECODER_CTX_new_by_EVP_PKEY 2021-02-17 15:26:12 +01:00
pem_err.c err: rename err_load_xxx_strings_int functions 2021-05-26 13:01:47 +10:00
pem_info.c Stop raising ERR_R_MALLOC_FAILURE in most places 2022-10-05 14:02:03 +02:00
pem_lib.c "foo * bar" should be "foo *bar" 2023-09-11 10:15:30 +02:00
pem_local.h Decoding PKCS#8: separate decoding of encrypted and unencrypted PKCS#8 2021-06-09 17:00:10 +02:00
pem_oth.c Update copyright year 2020-11-26 14:18:57 +00:00
pem_pk8.c Fix Edge Cases in Password Callback Handling 2024-09-09 08:58:03 +02:00
pem_pkey.c Copyright year updates 2024-09-05 09:35:49 +02:00
pem_sign.c Stop raising ERR_R_MALLOC_FAILURE in most places 2022-10-05 14:02:03 +02:00
pem_x509.c
pem_xaux.c
pvkfmt.c Copyright year updates 2023-09-28 14:23:29 +01:00