pgpool: Fix watchdog WD_INFO_MESSAGE processing to check wd_authkey.

From: Taiki Koshino <koshino(at)sraoss(dot)co(dot)jp>
To: pgpool-committers(at)lists(dot)postgresql(dot)org
Subject: pgpool: Fix watchdog WD_INFO_MESSAGE processing to check wd_authkey.
Date: 2026-09-29 04:44:17
Message-ID: E1xBPhR-00000002h2b-1GeR@gothos.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgpool-committers

Fix watchdog WD_INFO_MESSAGE processing to check wd_authkey.

While processing WD_INFO_MESSAGE, standard_packet_processor() failed
to check wd_authkey before copying peer supplied fields (state,
startup_time, wd_priority, current_state_time, escalated,
standby_nodes_count, quorum_status, lifecheck_started, nodeName) into
the local WatchdogNode *before* validating the packet's authhash. As
a result, an attacker was able to influence leader election with
invalid wd_authkey.

To fix this, call verify_authhash_for_node() before copying
peer-supplied state into the local WatchdogNode. If the verification
fails, emit a warning meesage and return.

Note that empty wd_authkey is still valid because
verify_authhash_for_node() returns success (true) if wd_authkey is an
empty string.

Reported-by: Emond Papegaaij <emond(dot)papegaaij(at)topicus(dot)nl>
Reported-by: Claude
Author: Tatsuo Ishii <ishii(at)postgresql(dot)org>
CVE-2026-92873
Backpatch-through: v4.3

Branch
------
V4_3_STABLE

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

Modified Files
--------------
src/watchdog/watchdog.c | 17 +++++++++++++++++
1 file changed, 17 insertions(+)

Browse pgpool-committers by date

  From Date Subject
Next Message Taiki Koshino 2026-09-29 04:47:05 pgpool: Bound wd_nodes JSON array parsing in get_pool_config_from_json.
Previous Message Taiki Koshino 2026-09-29 04:43:57 pgpool: Fix operator precedence in parse_wd_node_function_json NodeIdLi