pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #19867: pg_verifybackup accepts out-of-range Timeline in backup manifest
3+ messages / 3 participants
[nested] [flat]

* BUG #19867: pg_verifybackup accepts out-of-range Timeline in backup manifest
@ 2026-11-11 05:46  PG Bug reporting form <noreply@postgresql.org>
  0 siblings, 2 replies; 3+ messages in thread

From: PG Bug reporting form @ 2026-11-11 05:46 UTC (permalink / raw)
  To: pgsql-bugs@lists.postgresql.org; +Cc: imchifan@mail.com

The following bug has been logged on the website:

Bug reference:      19867
Logged by:          Faye
Email address:      imchifan@mail.com
PostgreSQL version: 18.6
Operating system:   Linux/amd64
Description:        

pg_verifybackup accepts a backup-manifest Timeline value of 4294967297,
which is outside the range of PostgreSQL timeline identifiers, and proceeds
to manifest checksum validation. It should reject the value as out of range
while parsing the manifest because a PostgreSQL timeline identifier cannot
represent it. The reproducer requires a disposable local PostgreSQL instance
that permits pg_basebackup.

How to repeat:

    d="backup-test"
    pg_basebackup -h /tmp -D "$d" -X none --no-sync
--manifest-checksums=NONE
    sed -i '0,/"Timeline": [0-9][0-9]*/s//"Timeline": 4294967297/'
"$d/backup_manifest"
    grep -o '"Timeline": [0-9]*' "$d/backup_manifest" | head -1
    pg_verifybackup --no-parse-wal "$d"

The recorded output is:

    "Timeline": 4294967297
    pg_verifybackup: error: manifest checksum mismatch

The checksum error shows that the out-of-range Timeline value passed
manifest parsing and verification continued to checksum validation. No crash
or data corruption was observed. The external numeric value appears to be
narrowed without first validating the destination type's range.

The issue was reproduced on PostgreSQL 20devel, PostgreSQL 18.6, and
PostgreSQL 17.11 on Linux/AMD64. This occurs when pg_verifybackup checks a
backup manifest whose Timeline value exceeds the range of PostgreSQL
timeline identifiers.








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

* Re: BUG #19867: pg_verifybackup accepts out-of-range Timeline in backup manifest
@ 2026-11-11 11:02  Daniel Gustafsson <daniel@yesql.se>
  parent: PG Bug reporting form <noreply@postgresql.org>
  1 sibling, 0 replies; 3+ messages in thread

From: Daniel Gustafsson @ 2026-11-11 11:02 UTC (permalink / raw)
  To: imchifan@mail.com; pgsql-bugs@lists.postgresql.org

> On 11 Nov 2026, at 06:46, PG Bug reporting form <noreply@postgresql.org> wrote:

>    sed -i '0,/"Timeline": [0-9][0-9]*/s//"Timeline": 4294967297/'

>    "Timeline": 4294967297
>    pg_verifybackup: error: manifest checksum mismatch

This seems to have been working as intended no?  You corrupted the manifest and
the checksum verification failed due to the corruption.  Tightening the parsing
in the absence of issues doesn't strike me as high on the prioritization list
right now.

--
Daniel Gustafsson







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

* Re: BUG #19867: pg_verifybackup accepts out-of-range Timeline in backup manifest
@ 2026-11-11 13:15  Laurenz Albe <laurenz.albe@cybertec.at>
  parent: PG Bug reporting form <noreply@postgresql.org>
  1 sibling, 0 replies; 3+ messages in thread

From: Laurenz Albe @ 2026-11-11 13:15 UTC (permalink / raw)
  To: imchifan@mail.com; pgsql-bugs@lists.postgresql.org

On Wed, 2026-11-11 at 05:46 +0000, PG Bug reporting form wrote:
> pg_verifybackup accepts a backup-manifest Timeline value of 4294967297,
> which is outside the range of PostgreSQL timeline identifiers, and proceeds
> to manifest checksum validation.

Why is that a problem?

Yours,
Laurenz Albe






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


end of thread, other threads:[~2026-11-11 13:15 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-11-11 05:46 BUG #19867: pg_verifybackup accepts out-of-range Timeline in backup manifest PG Bug reporting form <noreply@postgresql.org>
2026-11-11 11:02 ` Daniel Gustafsson <daniel@yesql.se>
2026-11-11 13:15 ` Laurenz Albe <laurenz.albe@cybertec.at>

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