agora inbox for pgsql-committers@postgresql.org  
help / color / mirror / Atom feed
pgsql: Add additional sanity checks when reading a blkreftable.
4+ messages / 1 participants
[nested] [flat]

* pgsql: Add additional sanity checks when reading a blkreftable.
@ 2026-07-15 18:02 Robert Haas <rhaas@postgresql.org>
  0 siblings, 0 replies; 4+ messages in thread

From: Robert Haas @ 2026-07-15 18:02 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/ee654419d5fe7a37b230b865018dc8c1f6b9fc08

Modified Files
--------------
src/common/blkreftable.c | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)



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

* pgsql: Add additional sanity checks when reading a blkreftable.
@ 2026-07-15 18:02 Robert Haas <rhaas@postgresql.org>
  0 siblings, 0 replies; 4+ messages in thread

From: Robert Haas @ 2026-07-15 18:02 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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_19_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/95c1b8ec7773817d8626d0aad6e7424b3c5ef04d

Modified Files
--------------
src/common/blkreftable.c | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)



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

* pgsql: Add additional sanity checks when reading a blkreftable.
@ 2026-07-15 18:02 Robert Haas <rhaas@postgresql.org>
  0 siblings, 0 replies; 4+ messages in thread

From: Robert Haas @ 2026-07-15 18:02 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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_18_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/bcc428a23a69ee6f3bcc2ce20655da68eed0e7aa

Modified Files
--------------
src/common/blkreftable.c | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)



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

* pgsql: Add additional sanity checks when reading a blkreftable.
@ 2026-07-15 18:02 Robert Haas <rhaas@postgresql.org>
  0 siblings, 0 replies; 4+ messages in thread

From: Robert Haas @ 2026-07-15 18:02 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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(+)



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


end of thread, other threads:[~2026-07-15 18:02 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-07-15 18:02 pgsql: Add additional sanity checks when reading a blkreftable. Robert Haas <rhaas@postgresql.org>
2026-07-15 18:02 pgsql: Add additional sanity checks when reading a blkreftable. Robert Haas <rhaas@postgresql.org>
2026-07-15 18:02 pgsql: Add additional sanity checks when reading a blkreftable. Robert Haas <rhaas@postgresql.org>
2026-07-15 18:02 pgsql: Add additional sanity checks when reading a blkreftable. Robert Haas <rhaas@postgresql.org>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox