agora inbox for pgsql-committers@postgresql.org
help / color / mirror / Atom feedFrom: Robert Haas <rhaas@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Add additional sanity checks when reading a blkreftable.
Date: Wed, 15 Jul 2026 18:02:32 +0000
Message-ID: <E1wk3wF-000Kam-17@gemulon.postgresql.org> (raw)
Add additional sanity checks when reading a blkreftable.
Code elsewhere in the system assumes that fork numbers and chunk sizes
are within bounds, so the code that reads those quantities from disk
should validate that they are. Without these additional checks, a
corrupted file can cause us to index off the end of fork number or chunk
entry arrays, potentially resulting in a crash.
Reported-by: oxsignal <awo@kakao.com> (chunk sizes)
Reported-by: Robert Haas <rhaas@postgresql.org> (fork numbers)
Reviewed-by: Daniel Gustafsson <daniel@yesql.se>
Discussion: http://postgr.es/m/CA+TgmoYP8RKoBGosS7C6Fdr-GNCfyz_W1zmK=Tx1Fe0ZvzGh0g@mail.gmail.com
Backpatch-through: 17
Branch
------
REL_17_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/0c5516a0df97e1e707ea5e9e08712e29ce4ee047
Modified Files
--------------
src/common/blkreftable.c | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
view thread (4+ messages)
Message-ID: <E1wk3wF-000Kam-17@gemulon.postgresql.org>
Permalink: ../E1wk3wF-000Kam-17@gemulon.postgresql.org/
Also on: postgresql.org/message-id/E1wk3wF-000Kam-17@gemulon.postgresql.org
reply
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 using the --to and --cc options:
reply via email
To: pgsql-committers@postgresql.org
Cc: rhaas@postgresql.org, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Add additional sanity checks when reading a blkreftable.
In-Reply-To: <E1wk3wF-000Kam-17@gemulon.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 agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox