pg.ddx.io pgpool-committers@postgresql.org mailing list archive
help / color / mirror / Atom feedpgpool: Reject node count larger than MAX_NUM_BACKENDS in parse_wd_node
6+ messages / 1 participants
[nested] [flat]
* pgpool: Reject node count larger than MAX_NUM_BACKENDS in parse_wd_node
@ 2026-09-29 04:41 Taiki Koshino <koshino@sraoss.co.jp>
0 siblings, 0 replies; 6+ messages in thread
From: Taiki Koshino @ 2026-09-29 04:41 UTC (permalink / raw)
To: pgpool-committers@lists.postgresql.org
Reject node count larger than MAX_NUM_BACKENDS in parse_wd_node_function_json.
parse_wd_node_function_json() in src/watchdog/wd_json_data.c parses a
peer-supplied NodeCount and a NodeIdList array out of a watchdog JSON
message and palloc()s an int array of node_count entries to populate.
The downstream consumer degenerate_backend_set_ex() in
src/main/pool_internal_comms.c declares
int node_id[MAX_NUM_BACKENDS];
(128 ints, 512 bytes) on the stack and copies up to node_count entries
into it. A peer that sets NodeCount above MAX_NUM_BACKENDS therefore
writes past the stack buffer in the failover-command path, which is
reachable from WD_IPC_FAILOVER_COMMAND and wd_authkey is not set.
Bound node_count at the parser, before the palloc, so an out-of-range
value is rejected via ereport(ERROR) and never reaches the downstream
fixed-size stack array.
Reported-by: Emond Papegaaij <emond.papegaaij@topicus.nl>
Reported-by: Claude
Author: Tatsuo Ishii <ishii@postgresql.org>
CVE-2026-92870
Backpatch-through: v4.3
Branch
------
V4_7_STABLE
Details
-------
https://git.postgresql.org/gitweb?p=pgpool2.git;a=commitdiff;h=3b48331c71972f46e48bcba8a7653ce5a7020...
Modified Files
--------------
src/watchdog/wd_json_data.c | 7 +++++++
1 file changed, 7 insertions(+)
^ permalink raw reply [nested|flat] 6+ messages in thread
* pgpool: Reject node count larger than MAX_NUM_BACKENDS in parse_wd_node
@ 2026-09-29 04:43 Taiki Koshino <koshino@sraoss.co.jp>
0 siblings, 0 replies; 6+ messages in thread
From: Taiki Koshino @ 2026-09-29 04:43 UTC (permalink / raw)
To: pgpool-committers@lists.postgresql.org
Reject node count larger than MAX_NUM_BACKENDS in parse_wd_node_function_json.
parse_wd_node_function_json() in src/watchdog/wd_json_data.c parses a
peer-supplied NodeCount and a NodeIdList array out of a watchdog JSON
message and palloc()s an int array of node_count entries to populate.
The downstream consumer degenerate_backend_set_ex() in
src/main/pool_internal_comms.c declares
int node_id[MAX_NUM_BACKENDS];
(128 ints, 512 bytes) on the stack and copies up to node_count entries
into it. A peer that sets NodeCount above MAX_NUM_BACKENDS therefore
writes past the stack buffer in the failover-command path, which is
reachable from WD_IPC_FAILOVER_COMMAND and wd_authkey is not set.
Bound node_count at the parser, before the palloc, so an out-of-range
value is rejected via ereport(ERROR) and never reaches the downstream
fixed-size stack array.
Reported-by: Emond Papegaaij <emond.papegaaij@topicus.nl>
Reported-by: Claude
Author: Tatsuo Ishii <ishii@postgresql.org>
CVE-2026-92870
Backpatch-through: v4.3
Branch
------
V4_6_STABLE
Details
-------
https://git.postgresql.org/gitweb?p=pgpool2.git;a=commitdiff;h=6928aca758a52fd30ed9eaf1928e1c5d7139d...
Modified Files
--------------
src/watchdog/wd_json_data.c | 7 +++++++
1 file changed, 7 insertions(+)
^ permalink raw reply [nested|flat] 6+ messages in thread
* pgpool: Reject node count larger than MAX_NUM_BACKENDS in parse_wd_node
@ 2026-09-29 04:43 Taiki Koshino <koshino@sraoss.co.jp>
0 siblings, 0 replies; 6+ messages in thread
From: Taiki Koshino @ 2026-09-29 04:43 UTC (permalink / raw)
To: pgpool-committers@lists.postgresql.org
Reject node count larger than MAX_NUM_BACKENDS in parse_wd_node_function_json.
parse_wd_node_function_json() in src/watchdog/wd_json_data.c parses a
peer-supplied NodeCount and a NodeIdList array out of a watchdog JSON
message and palloc()s an int array of node_count entries to populate.
The downstream consumer degenerate_backend_set_ex() in
src/main/pool_internal_comms.c declares
int node_id[MAX_NUM_BACKENDS];
(128 ints, 512 bytes) on the stack and copies up to node_count entries
into it. A peer that sets NodeCount above MAX_NUM_BACKENDS therefore
writes past the stack buffer in the failover-command path, which is
reachable from WD_IPC_FAILOVER_COMMAND and wd_authkey is not set.
Bound node_count at the parser, before the palloc, so an out-of-range
value is rejected via ereport(ERROR) and never reaches the downstream
fixed-size stack array.
Reported-by: Emond Papegaaij <emond.papegaaij@topicus.nl>
Reported-by: Claude
Author: Tatsuo Ishii <ishii@postgresql.org>
CVE-2026-92870
Backpatch-through: v4.3
Branch
------
V4_5_STABLE
Details
-------
https://git.postgresql.org/gitweb?p=pgpool2.git;a=commitdiff;h=f94bfc05b99d80eaff548a3e590a931d78183...
Modified Files
--------------
src/watchdog/wd_json_data.c | 7 +++++++
1 file changed, 7 insertions(+)
^ permalink raw reply [nested|flat] 6+ messages in thread
* pgpool: Reject node count larger than MAX_NUM_BACKENDS in parse_wd_node
@ 2026-09-29 04:43 Taiki Koshino <koshino@sraoss.co.jp>
0 siblings, 0 replies; 6+ messages in thread
From: Taiki Koshino @ 2026-09-29 04:43 UTC (permalink / raw)
To: pgpool-committers@lists.postgresql.org
Reject node count larger than MAX_NUM_BACKENDS in parse_wd_node_function_json.
parse_wd_node_function_json() in src/watchdog/wd_json_data.c parses a
peer-supplied NodeCount and a NodeIdList array out of a watchdog JSON
message and palloc()s an int array of node_count entries to populate.
The downstream consumer degenerate_backend_set_ex() in
src/main/pool_internal_comms.c declares
int node_id[MAX_NUM_BACKENDS];
(128 ints, 512 bytes) on the stack and copies up to node_count entries
into it. A peer that sets NodeCount above MAX_NUM_BACKENDS therefore
writes past the stack buffer in the failover-command path, which is
reachable from WD_IPC_FAILOVER_COMMAND and wd_authkey is not set.
Bound node_count at the parser, before the palloc, so an out-of-range
value is rejected via ereport(ERROR) and never reaches the downstream
fixed-size stack array.
Reported-by: Emond Papegaaij <emond.papegaaij@topicus.nl>
Reported-by: Claude
Author: Tatsuo Ishii <ishii@postgresql.org>
CVE-2026-92870
Backpatch-through: v4.3
Branch
------
V4_4_STABLE
Details
-------
https://git.postgresql.org/gitweb?p=pgpool2.git;a=commitdiff;h=2dd04af2e7d312a1e0508a9776f08777b415f...
Modified Files
--------------
src/watchdog/wd_json_data.c | 7 +++++++
1 file changed, 7 insertions(+)
^ permalink raw reply [nested|flat] 6+ messages in thread
* pgpool: Reject node count larger than MAX_NUM_BACKENDS in parse_wd_node
@ 2026-09-29 04:44 Taiki Koshino <koshino@sraoss.co.jp>
0 siblings, 0 replies; 6+ messages in thread
From: Taiki Koshino @ 2026-09-29 04:44 UTC (permalink / raw)
To: pgpool-committers@lists.postgresql.org
Reject node count larger than MAX_NUM_BACKENDS in parse_wd_node_function_json.
parse_wd_node_function_json() in src/watchdog/wd_json_data.c parses a
peer-supplied NodeCount and a NodeIdList array out of a watchdog JSON
message and palloc()s an int array of node_count entries to populate.
The downstream consumer degenerate_backend_set_ex() in
src/main/pool_internal_comms.c declares
int node_id[MAX_NUM_BACKENDS];
(128 ints, 512 bytes) on the stack and copies up to node_count entries
into it. A peer that sets NodeCount above MAX_NUM_BACKENDS therefore
writes past the stack buffer in the failover-command path, which is
reachable from WD_IPC_FAILOVER_COMMAND and wd_authkey is not set.
Bound node_count at the parser, before the palloc, so an out-of-range
value is rejected via ereport(ERROR) and never reaches the downstream
fixed-size stack array.
Reported-by: Emond Papegaaij <emond.papegaaij@topicus.nl>
Reported-by: Claude
Author: Tatsuo Ishii <ishii@postgresql.org>
CVE-2026-92870
Backpatch-through: v4.3
Branch
------
V4_3_STABLE
Details
-------
https://git.postgresql.org/gitweb?p=pgpool2.git;a=commitdiff;h=8886d4e65fbd96fd1cc5afb8422dc313a3e57...
Modified Files
--------------
src/watchdog/wd_json_data.c | 7 +++++++
1 file changed, 7 insertions(+)
^ permalink raw reply [nested|flat] 6+ messages in thread
* pgpool: Reject node count larger than MAX_NUM_BACKENDS in parse_wd_node
@ 2026-09-29 04:47 Taiki Koshino <koshino@sraoss.co.jp>
0 siblings, 0 replies; 6+ messages in thread
From: Taiki Koshino @ 2026-09-29 04:47 UTC (permalink / raw)
To: pgpool-committers@lists.postgresql.org
Reject node count larger than MAX_NUM_BACKENDS in parse_wd_node_function_json.
parse_wd_node_function_json() in src/watchdog/wd_json_data.c parses a
peer-supplied NodeCount and a NodeIdList array out of a watchdog JSON
message and palloc()s an int array of node_count entries to populate.
The downstream consumer degenerate_backend_set_ex() in
src/main/pool_internal_comms.c declares
int node_id[MAX_NUM_BACKENDS];
(128 ints, 512 bytes) on the stack and copies up to node_count entries
into it. A peer that sets NodeCount above MAX_NUM_BACKENDS therefore
writes past the stack buffer in the failover-command path, which is
reachable from WD_IPC_FAILOVER_COMMAND and wd_authkey is not set.
Bound node_count at the parser, before the palloc, so an out-of-range
value is rejected via ereport(ERROR) and never reaches the downstream
fixed-size stack array.
Reported-by: Emond Papegaaij <emond.papegaaij@topicus.nl>
Reported-by: Claude
Author: Tatsuo Ishii <ishii@postgresql.org>
CVE-2026-92870
Backpatch-through: v4.3
Branch
------
master
Details
-------
https://git.postgresql.org/gitweb?p=pgpool2.git;a=commitdiff;h=07ade8764324012d52cfe177d2a2a2544caba...
Modified Files
--------------
src/watchdog/wd_json_data.c | 7 +++++++
1 file changed, 7 insertions(+)
^ permalink raw reply [nested|flat] 6+ messages in thread
end of thread, other threads:[~2026-09-29 04:47 UTC | newest]
Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-09-29 04:41 pgpool: Reject node count larger than MAX_NUM_BACKENDS in parse_wd_node Taiki Koshino <koshino@sraoss.co.jp>
2026-09-29 04:43 pgpool: Reject node count larger than MAX_NUM_BACKENDS in parse_wd_node Taiki Koshino <koshino@sraoss.co.jp>
2026-09-29 04:43 pgpool: Reject node count larger than MAX_NUM_BACKENDS in parse_wd_node Taiki Koshino <koshino@sraoss.co.jp>
2026-09-29 04:43 pgpool: Reject node count larger than MAX_NUM_BACKENDS in parse_wd_node Taiki Koshino <koshino@sraoss.co.jp>
2026-09-29 04:44 pgpool: Reject node count larger than MAX_NUM_BACKENDS in parse_wd_node Taiki Koshino <koshino@sraoss.co.jp>
2026-09-29 04:47 pgpool: Reject node count larger than MAX_NUM_BACKENDS in parse_wd_node Taiki Koshino <koshino@sraoss.co.jp>
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