pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Avoid potential pfree on NULL on OpenSSL errors 3+ messages / 1 participants [nested] [flat]
* pgsql: Avoid potential pfree on NULL on OpenSSL errors @ 2023-09-22 09:26 Daniel Gustafsson <dgustafsson@postgresql.org> 0 siblings, 0 replies; 3+ messages in thread From: Daniel Gustafsson @ 2023-09-22 09:26 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Avoid potential pfree on NULL on OpenSSL errors Guard against the pointer being NULL before pfreeing upon an error returned from OpenSSL. Also handle errors from X509_NAME_print_ex which can return -1 on memory allocation errors. Backpatch down to v15 where the code was added. Author: Sergey Shinderuk <s.shinderuk@postgrespro.ru> Discussion: https://postgr.es/m/8db5374d-32e0-6abb-d402-40762511eff2@postgrespro.ru Backpatch-through: v15 Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/5f3aa309a880bb429c6a648d64e20fbd353fee8a Modified Files -------------- src/backend/libpq/be-secure-openssl.c | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) ^ permalink raw reply [nested|flat] 3+ messages in thread
* pgsql: Avoid potential pfree on NULL on OpenSSL errors @ 2023-09-22 09:27 Daniel Gustafsson <dgustafsson@postgresql.org> 0 siblings, 0 replies; 3+ messages in thread From: Daniel Gustafsson @ 2023-09-22 09:27 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Avoid potential pfree on NULL on OpenSSL errors Guard against the pointer being NULL before pfreeing upon an error returned from OpenSSL. Also handle errors from X509_NAME_print_ex which also can return -1 on memory allocation errors. Backpatch down to v15 where the code was added. Author: Sergey Shinderuk <s.shinderuk@postgrespro.ru> Discussion: https://postgr.es/m/8db5374d-32e0-6abb-d402-40762511eff2@postgrespro.ru Backpatch-through: v15 Branch ------ REL_16_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/f720875a4670f94c6d8acd288a2a62c7cabb92dd Modified Files -------------- src/backend/libpq/be-secure-openssl.c | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) ^ permalink raw reply [nested|flat] 3+ messages in thread
* pgsql: Avoid potential pfree on NULL on OpenSSL errors @ 2023-09-22 09:27 Daniel Gustafsson <dgustafsson@postgresql.org> 0 siblings, 0 replies; 3+ messages in thread From: Daniel Gustafsson @ 2023-09-22 09:27 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Avoid potential pfree on NULL on OpenSSL errors Guard against the pointer being NULL before pfreeing upon an error returned from OpenSSL. Also handle errors from X509_NAME_print_ex which also can return -1 on memory allocation errors. Backpatch down to v15 where the code was added. Author: Sergey Shinderuk <s.shinderuk@postgrespro.ru> Discussion: https://postgr.es/m/8db5374d-32e0-6abb-d402-40762511eff2@postgrespro.ru Backpatch-through: v15 Branch ------ REL_15_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/9dc85806d8beb1d4b0cc5461cc3a7d2e44c6e782 Modified Files -------------- src/backend/libpq/be-secure-openssl.c | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) ^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2023-09-22 09:27 UTC | newest] Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2023-09-22 09:26 pgsql: Avoid potential pfree on NULL on OpenSSL errors Daniel Gustafsson <dgustafsson@postgresql.org> 2023-09-22 09:27 pgsql: Avoid potential pfree on NULL on OpenSSL errors Daniel Gustafsson <dgustafsson@postgresql.org> 2023-09-22 09:27 pgsql: Avoid potential pfree on NULL on OpenSSL errors Daniel Gustafsson <dgustafsson@postgresql.org>
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