pg.ddx.io  pgpool-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgpool: Fix operator precedence in parse_wd_node_function_json NodeIdLi
6+ messages / 1 participants
[nested] [flat]

* pgpool: Fix operator precedence in parse_wd_node_function_json NodeIdLi
@ 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

Fix operator precedence in parse_wd_node_function_json NodeIdList write.

In src/watchdog/wd_json_data.c parse_wd_node_function_json(), the loop
body wrote

    *node_id_set[i] = value->u.array.values[i]->u.integer;

which by C precedence parses as *(node_id_set[i]). node_id_set is an
int ** that aliases the caller's &node_id_list pointer. For i == 0 the
write happens to land on the palloc'd destination buffer; for i >= 1 the
indexing walks sizeof(int*) * i bytes past the int ** parameter into
adjacent memory, dereferences the resulting garbage pointer, and stores
a peer-controlled 32-bit integer there.

Add the missing parentheses so the subscript applies to the dereferenced
array: (*node_id_set)[i] = ...

This is almost certainly the original intent - the single-node
failover path (the common production case) hits only i == 0 and so the
bug has not been observed in normal operation. Any NodeIdList of length
two or more immediately fires the misbehaviour.

Reported-by: Emond Papegaaij <emond.papegaaij@topicus.nl>
Reported-by: Claude
Author: Bo Peng <pengbo@sraoss.co.jp>
CVE-2026-92867
Backpatch-through: v4.3

Branch
------
V4_7_STABLE

Details
-------
https://git.postgresql.org/gitweb?p=pgpool2.git;a=commitdiff;h=a58fe0c708f1a27e3e6c36fcbb483fe03bb1d...

Modified Files
--------------
src/watchdog/wd_json_data.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)



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

* pgpool: Fix operator precedence in parse_wd_node_function_json NodeIdLi
@ 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

Fix operator precedence in parse_wd_node_function_json NodeIdList write.

In src/watchdog/wd_json_data.c parse_wd_node_function_json(), the loop
body wrote

    *node_id_set[i] = value->u.array.values[i]->u.integer;

which by C precedence parses as *(node_id_set[i]). node_id_set is an
int ** that aliases the caller's &node_id_list pointer. For i == 0 the
write happens to land on the palloc'd destination buffer; for i >= 1 the
indexing walks sizeof(int*) * i bytes past the int ** parameter into
adjacent memory, dereferences the resulting garbage pointer, and stores
a peer-controlled 32-bit integer there.

Add the missing parentheses so the subscript applies to the dereferenced
array: (*node_id_set)[i] = ...

This is almost certainly the original intent - the single-node
failover path (the common production case) hits only i == 0 and so the
bug has not been observed in normal operation. Any NodeIdList of length
two or more immediately fires the misbehaviour.

Reported-by: Emond Papegaaij <emond.papegaaij@topicus.nl>
Reported-by: Claude
Author: Bo Peng <pengbo@sraoss.co.jp>
CVE-2026-92867
Backpatch-through: v4.3

Branch
------
V4_6_STABLE

Details
-------
https://git.postgresql.org/gitweb?p=pgpool2.git;a=commitdiff;h=38811a9012bdd6efafbd21e60b45eedf9e950...

Modified Files
--------------
src/watchdog/wd_json_data.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)



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

* pgpool: Fix operator precedence in parse_wd_node_function_json NodeIdLi
@ 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

Fix operator precedence in parse_wd_node_function_json NodeIdList write.

In src/watchdog/wd_json_data.c parse_wd_node_function_json(), the loop
body wrote

    *node_id_set[i] = value->u.array.values[i]->u.integer;

which by C precedence parses as *(node_id_set[i]). node_id_set is an
int ** that aliases the caller's &node_id_list pointer. For i == 0 the
write happens to land on the palloc'd destination buffer; for i >= 1 the
indexing walks sizeof(int*) * i bytes past the int ** parameter into
adjacent memory, dereferences the resulting garbage pointer, and stores
a peer-controlled 32-bit integer there.

Add the missing parentheses so the subscript applies to the dereferenced
array: (*node_id_set)[i] = ...

This is almost certainly the original intent - the single-node
failover path (the common production case) hits only i == 0 and so the
bug has not been observed in normal operation. Any NodeIdList of length
two or more immediately fires the misbehaviour.

Reported-by: Emond Papegaaij <emond.papegaaij@topicus.nl>
Reported-by: Claude
Author: Bo Peng <pengbo@sraoss.co.jp>
CVE: CVE-2026-92867
Backpatch-through: v4.3

Branch
------
V4_5_STABLE

Details
-------
https://git.postgresql.org/gitweb?p=pgpool2.git;a=commitdiff;h=9eeec4cd827a1b5db5fdfe26d10b1cd4213e6...

Modified Files
--------------
src/watchdog/wd_json_data.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)



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

* pgpool: Fix operator precedence in parse_wd_node_function_json NodeIdLi
@ 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

Fix operator precedence in parse_wd_node_function_json NodeIdList write.

In src/watchdog/wd_json_data.c parse_wd_node_function_json(), the loop
body wrote

    *node_id_set[i] = value->u.array.values[i]->u.integer;

which by C precedence parses as *(node_id_set[i]). node_id_set is an
int ** that aliases the caller's &node_id_list pointer. For i == 0 the
write happens to land on the palloc'd destination buffer; for i >= 1 the
indexing walks sizeof(int*) * i bytes past the int ** parameter into
adjacent memory, dereferences the resulting garbage pointer, and stores
a peer-controlled 32-bit integer there.

Add the missing parentheses so the subscript applies to the dereferenced
array: (*node_id_set)[i] = ...

This is almost certainly the original intent - the single-node
failover path (the common production case) hits only i == 0 and so the
bug has not been observed in normal operation. Any NodeIdList of length
two or more immediately fires the misbehaviour.

Reported-by: Emond Papegaaij <emond.papegaaij@topicus.nl>
Reported-by: Claude
Author: Bo Peng <pengbo@sraoss.co.jp>
CVE-2026-92867
Backpatch-through: v4.3

Branch
------
V4_4_STABLE

Details
-------
https://git.postgresql.org/gitweb?p=pgpool2.git;a=commitdiff;h=cf9b1fc28031757078d4aafa01a39e6a85ed8...

Modified Files
--------------
src/watchdog/wd_json_data.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)



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

* pgpool: Fix operator precedence in parse_wd_node_function_json NodeIdLi
@ 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

Fix operator precedence in parse_wd_node_function_json NodeIdList write.

In src/watchdog/wd_json_data.c parse_wd_node_function_json(), the loop
body wrote

    *node_id_set[i] = value->u.array.values[i]->u.integer;

which by C precedence parses as *(node_id_set[i]). node_id_set is an
int ** that aliases the caller's &node_id_list pointer. For i == 0 the
write happens to land on the palloc'd destination buffer; for i >= 1 the
indexing walks sizeof(int*) * i bytes past the int ** parameter into
adjacent memory, dereferences the resulting garbage pointer, and stores
a peer-controlled 32-bit integer there.

Add the missing parentheses so the subscript applies to the dereferenced
array: (*node_id_set)[i] = ...

This is almost certainly the original intent - the single-node
failover path (the common production case) hits only i == 0 and so the
bug has not been observed in normal operation. Any NodeIdList of length
two or more immediately fires the misbehaviour.

Reported-by: Emond Papegaaij <emond.papegaaij@topicus.nl>
Reported-by: Claude
Author: Bo Peng <pengbo@sraoss.co.jp>
CVE-2026-92867
Backpatch-through: v4.3

Branch
------
V4_3_STABLE

Details
-------
https://git.postgresql.org/gitweb?p=pgpool2.git;a=commitdiff;h=3d956ecd7d5823464adcee386971ff0e51c5f...

Modified Files
--------------
src/watchdog/wd_json_data.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)



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

* pgpool: Fix operator precedence in parse_wd_node_function_json NodeIdLi
@ 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

Fix operator precedence in parse_wd_node_function_json NodeIdList write.

In src/watchdog/wd_json_data.c parse_wd_node_function_json(), the loop
body wrote

    *node_id_set[i] = value->u.array.values[i]->u.integer;

which by C precedence parses as *(node_id_set[i]). node_id_set is an
int ** that aliases the caller's &node_id_list pointer. For i == 0 the
write happens to land on the palloc'd destination buffer; for i >= 1 the
indexing walks sizeof(int*) * i bytes past the int ** parameter into
adjacent memory, dereferences the resulting garbage pointer, and stores
a peer-controlled 32-bit integer there.

Add the missing parentheses so the subscript applies to the dereferenced
array: (*node_id_set)[i] = ...

This is almost certainly the original intent - the single-node
failover path (the common production case) hits only i == 0 and so the
bug has not been observed in normal operation. Any NodeIdList of length
two or more immediately fires the misbehaviour.

Reported-by: Emond Papegaaij <emond.papegaaij@topicus.nl>
Reported-by: Claude
Author: Bo Peng <pengbo@sraoss.co.jp>
CVE-2026-92867
Backpatch-through: v4.3

Branch
------
master

Details
-------
https://git.postgresql.org/gitweb?p=pgpool2.git;a=commitdiff;h=0388652d1b6f970a18c0b8ccaae9d9c79cece...

Modified Files
--------------
src/watchdog/wd_json_data.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)



^ 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: Fix operator precedence in parse_wd_node_function_json NodeIdLi Taiki Koshino <koshino@sraoss.co.jp>
2026-09-29 04:43 pgpool: Fix operator precedence in parse_wd_node_function_json NodeIdLi Taiki Koshino <koshino@sraoss.co.jp>
2026-09-29 04:43 pgpool: Fix operator precedence in parse_wd_node_function_json NodeIdLi Taiki Koshino <koshino@sraoss.co.jp>
2026-09-29 04:43 pgpool: Fix operator precedence in parse_wd_node_function_json NodeIdLi Taiki Koshino <koshino@sraoss.co.jp>
2026-09-29 04:44 pgpool: Fix operator precedence in parse_wd_node_function_json NodeIdLi Taiki Koshino <koshino@sraoss.co.jp>
2026-09-29 04:47 pgpool: Fix operator precedence in parse_wd_node_function_json NodeIdLi 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