From 0be31af068b766e9eefa49a9d99dd612ec61aa3c Mon Sep 17 00:00:00 2001 From: LucaCappelletti94 Date: Thu, 15 Oct 2026 22:20:31 +0200 Subject: [PATCH] Exempt backups below SQLite3MC's assumed legacy page size --- ...aes128-legacy-page-size-below-legacy-page-size | Bin 0 -> 645 bytes fuzz/src/run.rs | 11 ++++++----- 2 files changed, 6 insertions(+), 5 deletions(-) create mode 100644 fuzz/corpus/findings/backup-aes128-legacy-page-size-below-legacy-page-size diff --git a/fuzz/corpus/findings/backup-aes128-legacy-page-size-below-legacy-page-size b/fuzz/corpus/findings/backup-aes128-legacy-page-size-below-legacy-page-size new file mode 100644 index 0000000000000000000000000000000000000000..b148d50055da3b997d01e911f059859ede22c5ed GIT binary patch literal 645 zcmdN@V33sj4+ZQDV9)^LgXr4~42&yRuG9sogM$AlFcunJ57Ist3|6iNYN9^?I+zjS z2^M5efPH}?0OwdQ_S_EV{QtjrK*0b1@e5zvg@ha$2@X>R1{SoS-d18Du>6G76b%DG zWtM5NrQanj$}=bQsnsW_fqlcfP(|%kC2#C~hHI!gk0PQQ$=m-WWl@!p%8S0_FyTp< y$t#e)>Jw|YgP2XqC+kSIi7x;->K`zW)h;=-g-rm-i-QPB$$K{qb)GB$NdW-TL`k^- literal 0 HcmV?d00001 diff --git a/fuzz/src/run.rs b/fuzz/src/run.rs index 536ab70..b45666e 100644 --- a/fuzz/src/run.rs +++ b/fuzz/src/run.rs @@ -558,9 +558,9 @@ fn exercise_attached( /// cleanly with the destination's own true key after the backup reports full success. A failure /// there is the defect `utelle/SQLite3MultipleCiphers` issue #158 described, and exactly what this /// harness exists to catch a recurrence of. The one identically laid out pair exempt is a -/// destination that hides its page size and is sized below 4096-byte pages by `PRAGMA page_size` -/// alone, which SQLite3MC cannot reopen at all, backup or not -/// (`upstream/sqlite3mc-rc4-short-read-skips-decryption.md`). +/// destination that hides its page size and has `PRAGMA page_size` below the page size SQLite3MC +/// assumes on reopen, `legacy_page_size` or 4096 bytes, which it cannot reopen at all, backup or +/// not (`upstream/sqlite3mc-rc4-short-read-skips-decryption.md`). /// /// # Panics /// @@ -587,8 +587,9 @@ pub fn run_backup(case: &BackupCase) { && case.src_page_size == case.dest_page_size && case.src.same_layout(&case.dest) && !(case.dest.hides_page_size() - && case.dest.page_size.is_none() - && case.dest_page_size.is_some_and(|size| size.get() < 4096)) + && case + .dest_page_size + .is_some_and(|size| size.get() < case.dest.page_size.unwrap_or(4096))) { drop(src); drop(dest);