pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Correctly copy the target host identification in PQcancelCreate.
3+ messages / 1 participants
[nested] [flat]

* pgsql: Correctly copy the target host identification in PQcancelCreate.
@ 2025-07-02 19:48 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 3+ messages in thread

From: Tom Lane @ 2025-07-02 19:48 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Correctly copy the target host identification in PQcancelCreate.

PQcancelCreate failed to copy struct pg_conn_host's "type" field,
instead leaving it zero (a/k/a CHT_HOST_NAME).  This seemingly
has no great ill effects if it should have been CHT_UNIX_SOCKET
instead, but if it should have been CHT_HOST_ADDRESS then a
null-pointer dereference will occur when the cancelConn is used.

Bug: #18974
Reported-by: Maxim Boguk <maxim.boguk@gmail.com>
Author: Sergei Kornilov <sk@zsrv.org>
Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://postgr.es/m/18974-575f02b2168b36b3@postgresql.org
Backpatch-through: 17

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/fe05430ace8e0b3c945cf581564458a5983a07b6

Modified Files
--------------
src/interfaces/libpq/fe-cancel.c | 1 +
1 file changed, 1 insertion(+)



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* pgsql: Correctly copy the target host identification in PQcancelCreate.
@ 2025-07-02 19:48 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 3+ messages in thread

From: Tom Lane @ 2025-07-02 19:48 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Correctly copy the target host identification in PQcancelCreate.

PQcancelCreate failed to copy struct pg_conn_host's "type" field,
instead leaving it zero (a/k/a CHT_HOST_NAME).  This seemingly
has no great ill effects if it should have been CHT_UNIX_SOCKET
instead, but if it should have been CHT_HOST_ADDRESS then a
null-pointer dereference will occur when the cancelConn is used.

Bug: #18974
Reported-by: Maxim Boguk <maxim.boguk@gmail.com>
Author: Sergei Kornilov <sk@zsrv.org>
Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://postgr.es/m/18974-575f02b2168b36b3@postgresql.org
Backpatch-through: 17

Branch
------
REL_18_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/5d0800000ed5e4fb5ed010bb4b93f966e08b9fb3

Modified Files
--------------
src/interfaces/libpq/fe-cancel.c | 1 +
1 file changed, 1 insertion(+)



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* pgsql: Correctly copy the target host identification in PQcancelCreate.
@ 2025-07-02 19:48 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 3+ messages in thread

From: Tom Lane @ 2025-07-02 19:48 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Correctly copy the target host identification in PQcancelCreate.

PQcancelCreate failed to copy struct pg_conn_host's "type" field,
instead leaving it zero (a/k/a CHT_HOST_NAME).  This seemingly
has no great ill effects if it should have been CHT_UNIX_SOCKET
instead, but if it should have been CHT_HOST_ADDRESS then a
null-pointer dereference will occur when the cancelConn is used.

Bug: #18974
Reported-by: Maxim Boguk <maxim.boguk@gmail.com>
Author: Sergei Kornilov <sk@zsrv.org>
Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://postgr.es/m/18974-575f02b2168b36b3@postgresql.org
Backpatch-through: 17

Branch
------
REL_17_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/445bd37b19c297b56a7e3b24a69b3648918d2c31

Modified Files
--------------
src/interfaces/libpq/fe-cancel.c | 1 +
1 file changed, 1 insertion(+)



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2025-07-02 19:48 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2025-07-02 19:48 pgsql: Correctly copy the target host identification in PQcancelCreate. Tom Lane <tgl@sss.pgh.pa.us>
2025-07-02 19:48 pgsql: Correctly copy the target host identification in PQcancelCreate. Tom Lane <tgl@sss.pgh.pa.us>
2025-07-02 19:48 pgsql: Correctly copy the target host identification in PQcancelCreate. Tom Lane <tgl@sss.pgh.pa.us>

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