pg.ddx.io pgpool-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgpool: Bound wd_nodes JSON array parsing in get_pool_config_from_json. 6+ messages / 1 participants [nested] [flat]
* pgpool: Bound wd_nodes JSON array parsing in get_pool_config_from_json. @ 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 Bound wd_nodes JSON array parsing in get_pool_config_from_json. In src/watchdog/wd_json_data.c get_pool_config_from_json(), the loop over the peer-supplied "wd_nodes" JSON array writes into config->wd_nodes.wd_node_info[i] using the array length declared by the peer. The destination is a fixed-size array of MAX_WATCHDOG_NUM (128) WdNodeInfo entries (see WdNodesConfig in src/include/pool_config.h), but no upper bound is enforced before the loop, so a peer that ships a wd_nodes array of length > 128 walks the loop index past the end of the array and writes peer-controlled host/port data into adjacent heap memory. This is the wd_nodes half of PGP-0001 (the backend_desc half is addressed in a sibling patch). Reject any wd_nodes array whose declared length exceeds MAX_WATCHDOG_NUM via ereport(ERROR, ...) so the JSON is dropped before any out-of-bounds write occurs. Inline bound check (rather than a shared parse_peer_count helper) so this patch is self-contained and back-portable independently of any helper migration. Reported-by: Emond Papegaaij <emond.papegaaij@topicus.nl> Reported-by: Claude Author: Bo Peng <pengbo@sraoss.co.jp> CVE-2026-92869 Backpatch-through: v4.3 Branch ------ V4_7_STABLE Details ------- https://git.postgresql.org/gitweb?p=pgpool2.git;a=commitdiff;h=04b0f26edcad5e404942dcc1e9256f73e1972... Modified Files -------------- src/watchdog/wd_json_data.c | 6 ++++++ 1 file changed, 6 insertions(+) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgpool: Bound wd_nodes JSON array parsing in get_pool_config_from_json. @ 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 Bound wd_nodes JSON array parsing in get_pool_config_from_json. In src/watchdog/wd_json_data.c get_pool_config_from_json(), the loop over the peer-supplied "wd_nodes" JSON array writes into config->wd_nodes.wd_node_info[i] using the array length declared by the peer. The destination is a fixed-size array of MAX_WATCHDOG_NUM (128) WdNodeInfo entries (see WdNodesConfig in src/include/pool_config.h), but no upper bound is enforced before the loop, so a peer that ships a wd_nodes array of length > 128 walks the loop index past the end of the array and writes peer-controlled host/port data into adjacent heap memory. This is the wd_nodes half of PGP-0001 (the backend_desc half is addressed in a sibling patch). Reject any wd_nodes array whose declared length exceeds MAX_WATCHDOG_NUM via ereport(ERROR, ...) so the JSON is dropped before any out-of-bounds write occurs. Inline bound check (rather than a shared parse_peer_count helper) so this patch is self-contained and back-portable independently of any helper migration. Reported-by: Emond Papegaaij <emond.papegaaij@topicus.nl> Reported-by: Claude Author: Bo Peng <pengbo@sraoss.co.jp> CVE-2026-92869 Backpatch-through: v4.3 Branch ------ V4_6_STABLE Details ------- https://git.postgresql.org/gitweb?p=pgpool2.git;a=commitdiff;h=5e6774fda6182d806b4539f92bd60d7f938a4... Modified Files -------------- src/watchdog/wd_json_data.c | 6 ++++++ 1 file changed, 6 insertions(+) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgpool: Bound wd_nodes JSON array parsing in get_pool_config_from_json. @ 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 Bound wd_nodes JSON array parsing in get_pool_config_from_json. In src/watchdog/wd_json_data.c get_pool_config_from_json(), the loop over the peer-supplied "wd_nodes" JSON array writes into config->wd_nodes.wd_node_info[i] using the array length declared by the peer. The destination is a fixed-size array of MAX_WATCHDOG_NUM (128) WdNodeInfo entries (see WdNodesConfig in src/include/pool_config.h), but no upper bound is enforced before the loop, so a peer that ships a wd_nodes array of length > 128 walks the loop index past the end of the array and writes peer-controlled host/port data into adjacent heap memory. This is the wd_nodes half of PGP-0001 (the backend_desc half is addressed in a sibling patch). Reject any wd_nodes array whose declared length exceeds MAX_WATCHDOG_NUM via ereport(ERROR, ...) so the JSON is dropped before any out-of-bounds write occurs. Inline bound check (rather than a shared parse_peer_count helper) so this patch is self-contained and back-portable independently of any helper migration. Reported-by: Emond Papegaaij <emond.papegaaij@topicus.nl> Reported-by: Claude Author: Bo Peng <pengbo@sraoss.co.jp> CVE-2026-92869 Backpatch-through: v4.3 Branch ------ V4_5_STABLE Details ------- https://git.postgresql.org/gitweb?p=pgpool2.git;a=commitdiff;h=a8ce0fdd9ebb9fcd5507f169f76cf875233e4... Modified Files -------------- src/watchdog/wd_json_data.c | 6 ++++++ 1 file changed, 6 insertions(+) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgpool: Bound wd_nodes JSON array parsing in get_pool_config_from_json. @ 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 Bound wd_nodes JSON array parsing in get_pool_config_from_json. In src/watchdog/wd_json_data.c get_pool_config_from_json(), the loop over the peer-supplied "wd_nodes" JSON array writes into config->wd_nodes.wd_node_info[i] using the array length declared by the peer. The destination is a fixed-size array of MAX_WATCHDOG_NUM (128) WdNodeInfo entries (see WdNodesConfig in src/include/pool_config.h), but no upper bound is enforced before the loop, so a peer that ships a wd_nodes array of length > 128 walks the loop index past the end of the array and writes peer-controlled host/port data into adjacent heap memory. This is the wd_nodes half of PGP-0001 (the backend_desc half is addressed in a sibling patch). Reject any wd_nodes array whose declared length exceeds MAX_WATCHDOG_NUM via ereport(ERROR, ...) so the JSON is dropped before any out-of-bounds write occurs. Inline bound check (rather than a shared parse_peer_count helper) so this patch is self-contained and back-portable independently of any helper migration. Reported-by: Emond Papegaaij <emond.papegaaij@topicus.nl> Reported-by: Claude Author: Bo Peng <pengbo@sraoss.co.jp> CVE-2026-92869 Backpatch-through: v4.3 Branch ------ V4_4_STABLE Details ------- https://git.postgresql.org/gitweb?p=pgpool2.git;a=commitdiff;h=566de57e8bc101b82fa28bde42f51102dba15... Modified Files -------------- src/watchdog/wd_json_data.c | 6 ++++++ 1 file changed, 6 insertions(+) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgpool: Bound wd_nodes JSON array parsing in get_pool_config_from_json. @ 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 Bound wd_nodes JSON array parsing in get_pool_config_from_json. In src/watchdog/wd_json_data.c get_pool_config_from_json(), the loop over the peer-supplied "wd_nodes" JSON array writes into config->wd_nodes.wd_node_info[i] using the array length declared by the peer. The destination is a fixed-size array of MAX_WATCHDOG_NUM (128) WdNodeInfo entries (see WdNodesConfig in src/include/pool_config.h), but no upper bound is enforced before the loop, so a peer that ships a wd_nodes array of length > 128 walks the loop index past the end of the array and writes peer-controlled host/port data into adjacent heap memory. This is the wd_nodes half of PGP-0001 (the backend_desc half is addressed in a sibling patch). Reject any wd_nodes array whose declared length exceeds MAX_WATCHDOG_NUM via ereport(ERROR, ...) so the JSON is dropped before any out-of-bounds write occurs. Inline bound check (rather than a shared parse_peer_count helper) so this patch is self-contained and back-portable independently of any helper migration. Reported-by: Emond Papegaaij <emond.papegaaij@topicus.nl> Reported-by: Claude Author: Bo Peng <pengbo@sraoss.co.jp> CVE-2026-92869 Backpatch-through: v4.3 Branch ------ V4_3_STABLE Details ------- https://git.postgresql.org/gitweb?p=pgpool2.git;a=commitdiff;h=83034bdbd8401630796bbf9d6d45da41a93a8... Modified Files -------------- src/watchdog/wd_json_data.c | 6 ++++++ 1 file changed, 6 insertions(+) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgpool: Bound wd_nodes JSON array parsing in get_pool_config_from_json. @ 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 Bound wd_nodes JSON array parsing in get_pool_config_from_json. In src/watchdog/wd_json_data.c get_pool_config_from_json(), the loop over the peer-supplied "wd_nodes" JSON array writes into config->wd_nodes.wd_node_info[i] using the array length declared by the peer. The destination is a fixed-size array of MAX_WATCHDOG_NUM (128) WdNodeInfo entries (see WdNodesConfig in src/include/pool_config.h), but no upper bound is enforced before the loop, so a peer that ships a wd_nodes array of length > 128 walks the loop index past the end of the array and writes peer-controlled host/port data into adjacent heap memory. This is the wd_nodes half of PGP-0001 (the backend_desc half is addressed in a sibling patch). Reject any wd_nodes array whose declared length exceeds MAX_WATCHDOG_NUM via ereport(ERROR, ...) so the JSON is dropped before any out-of-bounds write occurs. Inline bound check (rather than a shared parse_peer_count helper) so this patch is self-contained and back-portable independently of any helper migration. Reported-by: Emond Papegaaij <emond.papegaaij@topicus.nl> Reported-by: Claude Author: Bo Peng <pengbo@sraoss.co.jp> CVE-2026-92869 Backpatch-through: v4.3 Branch ------ master Details ------- https://git.postgresql.org/gitweb?p=pgpool2.git;a=commitdiff;h=c4239f51280d1ccd3265eddf630542535fad5... Modified Files -------------- src/watchdog/wd_json_data.c | 6 ++++++ 1 file changed, 6 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: Bound wd_nodes JSON array parsing in get_pool_config_from_json. Taiki Koshino <koshino@sraoss.co.jp> 2026-09-29 04:43 pgpool: Bound wd_nodes JSON array parsing in get_pool_config_from_json. Taiki Koshino <koshino@sraoss.co.jp> 2026-09-29 04:43 pgpool: Bound wd_nodes JSON array parsing in get_pool_config_from_json. Taiki Koshino <koshino@sraoss.co.jp> 2026-09-29 04:43 pgpool: Bound wd_nodes JSON array parsing in get_pool_config_from_json. Taiki Koshino <koshino@sraoss.co.jp> 2026-09-29 04:44 pgpool: Bound wd_nodes JSON array parsing in get_pool_config_from_json. Taiki Koshino <koshino@sraoss.co.jp> 2026-09-29 04:47 pgpool: Bound wd_nodes JSON array parsing in get_pool_config_from_json. 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