pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: pgcrypto: Detect errors with EVP calls from OpenSSL 7+ messages / 1 participants [nested] [flat]
* pgsql: pgcrypto: Detect errors with EVP calls from OpenSSL @ 2020-12-08 06:24 Michael Paquier <michael@paquier.xyz> 0 siblings, 0 replies; 7+ messages in thread From: Michael Paquier @ 2020-12-08 06:24 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org pgcrypto: Detect errors with EVP calls from OpenSSL The following routines are called within pgcrypto when handling digests but there were no checks for failures: - EVP_MD_CTX_size (can fail with -1 as of 3.0.0) - EVP_MD_CTX_block_size (can fail with -1 as of 3.0.0) - EVP_DigestInit_ex - EVP_DigestUpdate - EVP_DigestFinal_ex A set of elog(ERROR) is added by this commit to detect such failures, that should never happen except in the event of a processing failure internal to OpenSSL. Note that it would be possible to use ERR_reason_error_string() to get more context about such errors, but these refer mainly to the internals of OpenSSL, so it is not really obvious how useful that would be. This is left out for simplicity. Per report from Coverity. Thanks to Tom Lane for the discussion. Backpatch-through: 9.5 Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/28d1601ad988790c3c53d7ffd24ef6d2366d4457 Modified Files -------------- contrib/pgcrypto/openssl.c | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: pgcrypto: Detect errors with EVP calls from OpenSSL @ 2020-12-08 06:24 Michael Paquier <michael@paquier.xyz> 0 siblings, 0 replies; 7+ messages in thread From: Michael Paquier @ 2020-12-08 06:24 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org pgcrypto: Detect errors with EVP calls from OpenSSL The following routines are called within pgcrypto when handling digests but there were no checks for failures: - EVP_MD_CTX_size (can fail with -1 as of 3.0.0) - EVP_MD_CTX_block_size (can fail with -1 as of 3.0.0) - EVP_DigestInit_ex - EVP_DigestUpdate - EVP_DigestFinal_ex A set of elog(ERROR) is added by this commit to detect such failures, that should never happen except in the event of a processing failure internal to OpenSSL. Note that it would be possible to use ERR_reason_error_string() to get more context about such errors, but these refer mainly to the internals of OpenSSL, so it is not really obvious how useful that would be. This is left out for simplicity. Per report from Coverity. Thanks to Tom Lane for the discussion. Backpatch-through: 9.5 Branch ------ REL9_6_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/95992e5ed93d142d64efb020a51148d39678df6a Modified Files -------------- contrib/pgcrypto/openssl.c | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: pgcrypto: Detect errors with EVP calls from OpenSSL @ 2020-12-08 06:24 Michael Paquier <michael@paquier.xyz> 0 siblings, 0 replies; 7+ messages in thread From: Michael Paquier @ 2020-12-08 06:24 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org pgcrypto: Detect errors with EVP calls from OpenSSL The following routines are called within pgcrypto when handling digests but there were no checks for failures: - EVP_MD_CTX_size (can fail with -1 as of 3.0.0) - EVP_MD_CTX_block_size (can fail with -1 as of 3.0.0) - EVP_DigestInit_ex - EVP_DigestUpdate - EVP_DigestFinal_ex A set of elog(ERROR) is added by this commit to detect such failures, that should never happen except in the event of a processing failure internal to OpenSSL. Note that it would be possible to use ERR_reason_error_string() to get more context about such errors, but these refer mainly to the internals of OpenSSL, so it is not really obvious how useful that would be. This is left out for simplicity. Per report from Coverity. Thanks to Tom Lane for the discussion. Backpatch-through: 9.5 Branch ------ REL_12_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/d7ecba937b909c26cc266d06261ddaf5a540630e Modified Files -------------- contrib/pgcrypto/openssl.c | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: pgcrypto: Detect errors with EVP calls from OpenSSL @ 2020-12-08 06:24 Michael Paquier <michael@paquier.xyz> 0 siblings, 0 replies; 7+ messages in thread From: Michael Paquier @ 2020-12-08 06:24 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org pgcrypto: Detect errors with EVP calls from OpenSSL The following routines are called within pgcrypto when handling digests but there were no checks for failures: - EVP_MD_CTX_size (can fail with -1 as of 3.0.0) - EVP_MD_CTX_block_size (can fail with -1 as of 3.0.0) - EVP_DigestInit_ex - EVP_DigestUpdate - EVP_DigestFinal_ex A set of elog(ERROR) is added by this commit to detect such failures, that should never happen except in the event of a processing failure internal to OpenSSL. Note that it would be possible to use ERR_reason_error_string() to get more context about such errors, but these refer mainly to the internals of OpenSSL, so it is not really obvious how useful that would be. This is left out for simplicity. Per report from Coverity. Thanks to Tom Lane for the discussion. Backpatch-through: 9.5 Branch ------ REL_13_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/dfd8bf2b9255f361d5541260a83ce634216c40f3 Modified Files -------------- contrib/pgcrypto/openssl.c | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: pgcrypto: Detect errors with EVP calls from OpenSSL @ 2020-12-08 06:24 Michael Paquier <michael@paquier.xyz> 0 siblings, 0 replies; 7+ messages in thread From: Michael Paquier @ 2020-12-08 06:24 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org pgcrypto: Detect errors with EVP calls from OpenSSL The following routines are called within pgcrypto when handling digests but there were no checks for failures: - EVP_MD_CTX_size (can fail with -1 as of 3.0.0) - EVP_MD_CTX_block_size (can fail with -1 as of 3.0.0) - EVP_DigestInit_ex - EVP_DigestUpdate - EVP_DigestFinal_ex A set of elog(ERROR) is added by this commit to detect such failures, that should never happen except in the event of a processing failure internal to OpenSSL. Note that it would be possible to use ERR_reason_error_string() to get more context about such errors, but these refer mainly to the internals of OpenSSL, so it is not really obvious how useful that would be. This is left out for simplicity. Per report from Coverity. Thanks to Tom Lane for the discussion. Backpatch-through: 9.5 Branch ------ REL_10_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/5ba1df0f14d19a32c69adf97d452726fa6a28e02 Modified Files -------------- contrib/pgcrypto/openssl.c | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: pgcrypto: Detect errors with EVP calls from OpenSSL @ 2020-12-08 06:24 Michael Paquier <michael@paquier.xyz> 0 siblings, 0 replies; 7+ messages in thread From: Michael Paquier @ 2020-12-08 06:24 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org pgcrypto: Detect errors with EVP calls from OpenSSL The following routines are called within pgcrypto when handling digests but there were no checks for failures: - EVP_MD_CTX_size (can fail with -1 as of 3.0.0) - EVP_MD_CTX_block_size (can fail with -1 as of 3.0.0) - EVP_DigestInit_ex - EVP_DigestUpdate - EVP_DigestFinal_ex A set of elog(ERROR) is added by this commit to detect such failures, that should never happen except in the event of a processing failure internal to OpenSSL. Note that it would be possible to use ERR_reason_error_string() to get more context about such errors, but these refer mainly to the internals of OpenSSL, so it is not really obvious how useful that would be. This is left out for simplicity. Per report from Coverity. Thanks to Tom Lane for the discussion. Backpatch-through: 9.5 Branch ------ REL_11_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/b88afd8b6124270a4eead676a5dd56ee7d32a74d Modified Files -------------- contrib/pgcrypto/openssl.c | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: pgcrypto: Detect errors with EVP calls from OpenSSL @ 2020-12-08 06:24 Michael Paquier <michael@paquier.xyz> 0 siblings, 0 replies; 7+ messages in thread From: Michael Paquier @ 2020-12-08 06:24 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org pgcrypto: Detect errors with EVP calls from OpenSSL The following routines are called within pgcrypto when handling digests but there were no checks for failures: - EVP_MD_CTX_size (can fail with -1 as of 3.0.0) - EVP_MD_CTX_block_size (can fail with -1 as of 3.0.0) - EVP_DigestInit_ex - EVP_DigestUpdate - EVP_DigestFinal_ex A set of elog(ERROR) is added by this commit to detect such failures, that should never happen except in the event of a processing failure internal to OpenSSL. Note that it would be possible to use ERR_reason_error_string() to get more context about such errors, but these refer mainly to the internals of OpenSSL, so it is not really obvious how useful that would be. This is left out for simplicity. Per report from Coverity. Thanks to Tom Lane for the discussion. Backpatch-through: 9.5 Branch ------ REL9_5_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/f95d9fd8153cb1b7da55f425bf217482e4943d2e Modified Files -------------- contrib/pgcrypto/openssl.c | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
end of thread, other threads:[~2020-12-08 06:24 UTC | newest] Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2020-12-08 06:24 pgsql: pgcrypto: Detect errors with EVP calls from OpenSSL Michael Paquier <michael@paquier.xyz> 2020-12-08 06:24 pgsql: pgcrypto: Detect errors with EVP calls from OpenSSL Michael Paquier <michael@paquier.xyz> 2020-12-08 06:24 pgsql: pgcrypto: Detect errors with EVP calls from OpenSSL Michael Paquier <michael@paquier.xyz> 2020-12-08 06:24 pgsql: pgcrypto: Detect errors with EVP calls from OpenSSL Michael Paquier <michael@paquier.xyz> 2020-12-08 06:24 pgsql: pgcrypto: Detect errors with EVP calls from OpenSSL Michael Paquier <michael@paquier.xyz> 2020-12-08 06:24 pgsql: pgcrypto: Detect errors with EVP calls from OpenSSL Michael Paquier <michael@paquier.xyz> 2020-12-08 06:24 pgsql: pgcrypto: Detect errors with EVP calls from OpenSSL Michael Paquier <michael@paquier.xyz>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox