Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1xR5j1-00000000fn7-45QS for pgsql-bugs@arkaria.postgresql.org; Wed, 11 Nov 2026 10:38:43 +0000 Received: from localhost ([127.0.0.1]:44518 helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.98.2) (envelope-from ) id 1xR5iz-0000000AE0t-1XQp for pgsql-bugs@arkaria.postgresql.org; Wed, 11 Nov 2026 10:38:41 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]:50504) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1xR1Ao-00000008sHT-0U1Q for pgsql-bugs@lists.postgresql.org; Wed, 11 Nov 2026 05:47:06 +0000 Received: from mahout.postgresql.org ([2001:4800:3e1:1::227]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1xR1An-00000000JuQ-0wqi for pgsql-bugs@lists.postgresql.org; Wed, 11 Nov 2026 05:47:05 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=postgresql.org; s=20171124; h=Message-ID:Date:Reply-To:Cc:From:To:Subject: Content-Transfer-Encoding:MIME-Version:Content-Type:Sender:Content-ID: Content-Description:In-Reply-To:References; bh=SvAUNqlAkkTIcV6jY4F/eHJrJyEJg7bEmYh4rsdkIQg=; b=qOJDrO1Hvy+Hclo7UMBPGkquPo w2oL4E70QFB2vu48K7Vu0Wvr/99aUZkpImeBhGOq+RLJXZm8CgPuROffJZJ9/J/7CDyAsOxfm7KkA KjW9ZQkX7Q88vlw2OyJLfD21HOvbyj0TnaBvwIHxgxibTBwwAhyRiWiLLXVqBG6A5cBwAUfFFlbhn KZUWm9cI1lQoZnRolYCeEefm2KkClnXAOPlv5MsM21E0MjhDHycvH8h+iJYrbxOPkwAmN49b7UUGY Hx3GCcgKEgUpPGkMcXQQWnDqhCZBM/g/QIPyqOd0YuXtsp6fWMXCzlTI2BIvZxOz+Pnr5g8+RFxB/ +rbVbPRA==; Received: from wrigleys.postgresql.org ([2a02:16a8:dc51::60]) by mahout.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1xR1Am-00000000t8N-1MKP for pgsql-bugs@lists.postgresql.org; Wed, 11 Nov 2026 05:47:04 +0000 Received: from localhost ([127.0.0.1] helo=wrigleys.postgresql.org) by wrigleys.postgresql.org with esmtp (Exim 4.98.2) (envelope-from ) id 1xR1Al-00000002JHn-1NiS for pgsql-bugs@lists.postgresql.org; Wed, 11 Nov 2026 05:47:03 +0000 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Subject: BUG #19867: pg_verifybackup accepts out-of-range Timeline in backup manifest To: pgsql-bugs@lists.postgresql.org From: PG Bug reporting form Cc: imchifan@mail.com Reply-To: imchifan@mail.com, pgsql-bugs@lists.postgresql.org Date: Wed, 11 Nov 2026 05:46:08 +0000 Message-ID: <19867-e274a8f5cd6d63f8@postgresql.org> X-Auto-Response-Suppress: All Auto-Submitted: auto-generated List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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: =20 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=3D"backup-test" pg_basebackup -h /tmp -D "$d" -X none --no-sync --manifest-checksums=3DNONE 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.