| From: | Taiki Koshino <koshino(at)sraoss(dot)co(dot)jp> |
|---|---|
| To: | pgpool-committers(at)lists(dot)postgresql(dot)org |
| Subject: | pgpool: Reject short heartbeat datagrams in heartbeat receiver. |
| Date: | 2026-09-29 04:43:39 |
| Message-ID: | E1xBPgp-00000002ge2-2i75@gothos.postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgpool-committers |
Reject short heartbeat datagrams in heartbeat receiver.
wd_hb_recv() called recvfrom() into a stack-local WdHbPacket and only
rejected negative or zero-length results. A datagram shorter than
sizeof(WdHbPacket) leaves the buffer partially initialised, so the
subsequent ntoh_wd_hb_packet() (strcmp/snprintf on pkt->from, pkt->hash,
etc.) reads uninitialised stack bytes. That is undefined behaviour and
can leak stack contents into the pgpool log.
Treat any datagram smaller than the full packet as an error, matching
the existing zero-length idiom (ereport(ERROR) longjmps out of the
receiver loop).
Reported-by: Emond Papegaaij <emond(dot)papegaaij(at)topicus(dot)nl>
Reported-by: Claude
Author: Tatsuo Ishii <ishii(at)postgresql(dot)org>
CVE-2026-92872
Backpatch-through: v4.3
Branch
------
V4_5_STABLE
Details
-------
https://git.postgresql.org/gitweb?p=pgpool2.git;a=commitdiff;h=7b0c714f667b57397fc43107204dcdc92b280abe
Modified Files
--------------
src/watchdog/wd_heartbeat.c | 4 ++++
1 file changed, 4 insertions(+)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Taiki Koshino | 2026-09-29 04:43:57 | pgpool: Fix operator precedence in parse_wd_node_function_json NodeIdLi |
| Previous Message | Taiki Koshino | 2026-09-29 04:43:11 | pgpool: Bound wd_nodes JSON array parsing in get_pool_config_from_json. |