pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Fix potential memory leak in pgcrypto 7+ messages / 1 participants [nested] [flat]
* pgsql: Fix potential memory leak in pgcrypto @ 2020-10-19 00:40 Michael Paquier <michael@paquier.xyz> 0 siblings, 0 replies; 7+ messages in thread From: Michael Paquier @ 2020-10-19 00:40 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix potential memory leak in pgcrypto When allocating a EVP context, it would have been possible to leak some memory allocated directly by OpenSSL, that PostgreSQL lost track of if the initialization of the context allocated failed. The cleanup can be done with EVP_MD_CTX_destroy(). Note that EVP APIs exist since OpenSSL 0.9.7 and we have in the tree equivalent implementations for older versions since ce9b75d (code removed with 9b7cd59a as of 10~). However, in 9.5 and 9.6, the existing code makes use of EVP_MD_CTX_destroy() and EVP_MD_CTX_create() without an equivalent implementation when building the tree with OpenSSL 0.9.6 or older, meaning that this code is in reality broken with such versions since it got introduced in e2838c5. As we have heard no complains about that, it does not seem worth bothering with in 9.5 and 9.6, so I have left that out for simplicity. Author: Michael Paquier Discussion: https://postgr.es/m/20201015072212.GC2305@paquier.xyz Backpatch-through: 9.5 Branch ------ REL_13_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/1bd9b2b2369608de7763b3947af2f59292152268 Modified Files -------------- contrib/pgcrypto/openssl.c | 1 + 1 file changed, 1 insertion(+) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Fix potential memory leak in pgcrypto @ 2020-10-19 00:40 Michael Paquier <michael@paquier.xyz> 0 siblings, 0 replies; 7+ messages in thread From: Michael Paquier @ 2020-10-19 00:40 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix potential memory leak in pgcrypto When allocating a EVP context, it would have been possible to leak some memory allocated directly by OpenSSL, that PostgreSQL lost track of if the initialization of the context allocated failed. The cleanup can be done with EVP_MD_CTX_destroy(). Note that EVP APIs exist since OpenSSL 0.9.7 and we have in the tree equivalent implementations for older versions since ce9b75d (code removed with 9b7cd59a as of 10~). However, in 9.5 and 9.6, the existing code makes use of EVP_MD_CTX_destroy() and EVP_MD_CTX_create() without an equivalent implementation when building the tree with OpenSSL 0.9.6 or older, meaning that this code is in reality broken with such versions since it got introduced in e2838c5. As we have heard no complains about that, it does not seem worth bothering with in 9.5 and 9.6, so I have left that out for simplicity. Author: Michael Paquier Discussion: https://postgr.es/m/20201015072212.GC2305@paquier.xyz Backpatch-through: 9.5 Branch ------ REL_11_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/9141390813e0bbbe315313b232e027fa977c3b21 Modified Files -------------- contrib/pgcrypto/openssl.c | 1 + 1 file changed, 1 insertion(+) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Fix potential memory leak in pgcrypto @ 2020-10-19 00:40 Michael Paquier <michael@paquier.xyz> 0 siblings, 0 replies; 7+ messages in thread From: Michael Paquier @ 2020-10-19 00:40 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix potential memory leak in pgcrypto When allocating a EVP context, it would have been possible to leak some memory allocated directly by OpenSSL, that PostgreSQL lost track of if the initialization of the context allocated failed. The cleanup can be done with EVP_MD_CTX_destroy(). Note that EVP APIs exist since OpenSSL 0.9.7 and we have in the tree equivalent implementations for older versions since ce9b75d (code removed with 9b7cd59a as of 10~). However, in 9.5 and 9.6, the existing code makes use of EVP_MD_CTX_destroy() and EVP_MD_CTX_create() without an equivalent implementation when building the tree with OpenSSL 0.9.6 or older, meaning that this code is in reality broken with such versions since it got introduced in e2838c5. As we have heard no complains about that, it does not seem worth bothering with in 9.5 and 9.6, so I have left that out for simplicity. Author: Michael Paquier Discussion: https://postgr.es/m/20201015072212.GC2305@paquier.xyz Backpatch-through: 9.5 Branch ------ REL_10_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/e8d36f9ece5e48e6252f9ba3dc01c51755036f9a Modified Files -------------- contrib/pgcrypto/openssl.c | 1 + 1 file changed, 1 insertion(+) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Fix potential memory leak in pgcrypto @ 2020-10-19 00:40 Michael Paquier <michael@paquier.xyz> 0 siblings, 0 replies; 7+ messages in thread From: Michael Paquier @ 2020-10-19 00:40 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix potential memory leak in pgcrypto When allocating a EVP context, it would have been possible to leak some memory allocated directly by OpenSSL, that PostgreSQL lost track of if the initialization of the context allocated failed. The cleanup can be done with EVP_MD_CTX_destroy(). Note that EVP APIs exist since OpenSSL 0.9.7 and we have in the tree equivalent implementations for older versions since ce9b75d (code removed with 9b7cd59a as of 10~). However, in 9.5 and 9.6, the existing code makes use of EVP_MD_CTX_destroy() and EVP_MD_CTX_create() without an equivalent implementation when building the tree with OpenSSL 0.9.6 or older, meaning that this code is in reality broken with such versions since it got introduced in e2838c5. As we have heard no complains about that, it does not seem worth bothering with in 9.5 and 9.6, so I have left that out for simplicity. Author: Michael Paquier Discussion: https://postgr.es/m/20201015072212.GC2305@paquier.xyz Backpatch-through: 9.5 Branch ------ REL_12_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/57bdf29dd5f66bda9bcb538b6911b1accd89f47e Modified Files -------------- contrib/pgcrypto/openssl.c | 1 + 1 file changed, 1 insertion(+) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Fix potential memory leak in pgcrypto @ 2020-10-19 00:40 Michael Paquier <michael@paquier.xyz> 0 siblings, 0 replies; 7+ messages in thread From: Michael Paquier @ 2020-10-19 00:40 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix potential memory leak in pgcrypto When allocating a EVP context, it would have been possible to leak some memory allocated directly by OpenSSL, that PostgreSQL lost track of if the initialization of the context allocated failed. The cleanup can be done with EVP_MD_CTX_destroy(). Note that EVP APIs exist since OpenSSL 0.9.7 and we have in the tree equivalent implementations for older versions since ce9b75d (code removed with 9b7cd59a as of 10~). However, in 9.5 and 9.6, the existing code makes use of EVP_MD_CTX_destroy() and EVP_MD_CTX_create() without an equivalent implementation when building the tree with OpenSSL 0.9.6 or older, meaning that this code is in reality broken with such versions since it got introduced in e2838c5. As we have heard no complains about that, it does not seem worth bothering with in 9.5 and 9.6, so I have left that out for simplicity. Author: Michael Paquier Discussion: https://postgr.es/m/20201015072212.GC2305@paquier.xyz Backpatch-through: 9.5 Branch ------ REL9_5_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/099238322cf80dc0ea11d1cbd84e78fbf95f48e5 Modified Files -------------- contrib/pgcrypto/openssl.c | 1 + 1 file changed, 1 insertion(+) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Fix potential memory leak in pgcrypto @ 2020-10-19 00:40 Michael Paquier <michael@paquier.xyz> 0 siblings, 0 replies; 7+ messages in thread From: Michael Paquier @ 2020-10-19 00:40 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix potential memory leak in pgcrypto When allocating a EVP context, it would have been possible to leak some memory allocated directly by OpenSSL, that PostgreSQL lost track of if the initialization of the context allocated failed. The cleanup can be done with EVP_MD_CTX_destroy(). Note that EVP APIs exist since OpenSSL 0.9.7 and we have in the tree equivalent implementations for older versions since ce9b75d (code removed with 9b7cd59a as of 10~). However, in 9.5 and 9.6, the existing code makes use of EVP_MD_CTX_destroy() and EVP_MD_CTX_create() without an equivalent implementation when building the tree with OpenSSL 0.9.6 or older, meaning that this code is in reality broken with such versions since it got introduced in e2838c5. As we have heard no complains about that, it does not seem worth bothering with in 9.5 and 9.6, so I have left that out for simplicity. Author: Michael Paquier Discussion: https://postgr.es/m/20201015072212.GC2305@paquier.xyz Backpatch-through: 9.5 Branch ------ REL9_6_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/994a02f7f77c760db5c28aa9f34c7e7fd88993cf Modified Files -------------- contrib/pgcrypto/openssl.c | 1 + 1 file changed, 1 insertion(+) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Fix potential memory leak in pgcrypto @ 2020-10-19 00:40 Michael Paquier <michael@paquier.xyz> 0 siblings, 0 replies; 7+ messages in thread From: Michael Paquier @ 2020-10-19 00:40 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix potential memory leak in pgcrypto When allocating a EVP context, it would have been possible to leak some memory allocated directly by OpenSSL, that PostgreSQL lost track of if the initialization of the context allocated failed. The cleanup can be done with EVP_MD_CTX_destroy(). Note that EVP APIs exist since OpenSSL 0.9.7 and we have in the tree equivalent implementations for older versions since ce9b75d (code removed with 9b7cd59a as of 10~). However, in 9.5 and 9.6, the existing code makes use of EVP_MD_CTX_destroy() and EVP_MD_CTX_create() without an equivalent implementation when building the tree with OpenSSL 0.9.6 or older, meaning that this code is in reality broken with such versions since it got introduced in e2838c5. As we have heard no complains about that, it does not seem worth bothering with in 9.5 and 9.6, so I have left that out for simplicity. Author: Michael Paquier Discussion: https://postgr.es/m/20201015072212.GC2305@paquier.xyz Backpatch-through: 9.5 Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/ca2a12c935f75fb56c3b14527d6f2ff6f549ea85 Modified Files -------------- contrib/pgcrypto/openssl.c | 1 + 1 file changed, 1 insertion(+) ^ permalink raw reply [nested|flat] 7+ messages in thread
end of thread, other threads:[~2020-10-19 00:40 UTC | newest] Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2020-10-19 00:40 pgsql: Fix potential memory leak in pgcrypto Michael Paquier <michael@paquier.xyz> 2020-10-19 00:40 pgsql: Fix potential memory leak in pgcrypto Michael Paquier <michael@paquier.xyz> 2020-10-19 00:40 pgsql: Fix potential memory leak in pgcrypto Michael Paquier <michael@paquier.xyz> 2020-10-19 00:40 pgsql: Fix potential memory leak in pgcrypto Michael Paquier <michael@paquier.xyz> 2020-10-19 00:40 pgsql: Fix potential memory leak in pgcrypto Michael Paquier <michael@paquier.xyz> 2020-10-19 00:40 pgsql: Fix potential memory leak in pgcrypto Michael Paquier <michael@paquier.xyz> 2020-10-19 00:40 pgsql: Fix potential memory leak in pgcrypto 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