From: Taiki Koshino <koshino@sraoss.co.jp>
To: pgpool-committers@lists.postgresql.org
Subject: pgpool: Reject short heartbeat datagrams in heartbeat receiver.
Date: Tue, 29 Sep 2026 04:43:39 +0000
Message-ID: <E1xBPgp-00000002ge2-2i75@gothos.postgresql.org> (raw)
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.papegaaij@topicus.nl>
Reported-by: Claude
Author: Tatsuo Ishii <ishii@postgresql.org>
CVE-2026-92872
Backpatch-through: v4.3
Branch
------
V4_5_STABLE
Details
-------
https://git.postgresql.org/gitweb?p=pgpool2.git;a=commitdiff;h=7b0c714f667b57397fc43107204dcdc92b280...
Modified Files
--------------
src/watchdog/wd_heartbeat.c | 4 ++++
1 file changed, 4 insertions(+)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgpool-committers@postgresql.org
Cc: koshino@sraoss.co.jp
Subject: Re: pgpool: Reject short heartbeat datagrams in heartbeat receiver.
In-Reply-To: <E1xBPgp-00000002ge2-2i75@gothos.postgresql.org>
References: <E1xBPgp-00000002ge2-2i75@gothos.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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