From 3e7b32b1172bc0f6d922c44ae2aca9a1c9db8336 Mon Sep 17 00:00:00 2001 From: Petr Khartskhaev Date: Thu, 6 Aug 2026 15:16:20 +0200 Subject: [PATCH] Unite CVE patches from Ymir, fix release, fix test fts5corruptA.test uses more verbose error messages than they were pre 3.50 --- ...sqlite-cve-2026-11822-cve-2026-11824.patch | 25 +++++-------------- sqlite-cve-2026-11822.patch | 25 ------------------- sqlite.spec | 15 +++++------ 3 files changed, 12 insertions(+), 53 deletions(-) rename sqlite-cve-2026-11824.patch => sqlite-cve-2026-11822-cve-2026-11824.patch (74%) delete mode 100644 sqlite-cve-2026-11822.patch diff --git a/sqlite-cve-2026-11824.patch b/sqlite-cve-2026-11822-cve-2026-11824.patch similarity index 74% rename from sqlite-cve-2026-11824.patch rename to sqlite-cve-2026-11822-cve-2026-11824.patch index ed9c4bd..c0b020d 100644 --- a/sqlite-cve-2026-11824.patch +++ b/sqlite-cve-2026-11822-cve-2026-11824.patch @@ -1,18 +1,5 @@ -From 65479ef73bfae4164083823ff591985e181119bc Mon Sep 17 00:00:00 2001 -From: dan -Date: Mon, 11 May 2026 11:12:06 +0000 -Subject: [PATCH] Fix potential buffer overwrite that could occur in fts5 when - processing corrupt records. - -FossilOrigin-Name: 4a5ad516ea93926c0d5206b4d72c3675905d2bf666b27a649256b93eb95c671b ---- - ext/fts5/fts5_index.c | 2 +- - ext/fts5/test/fts5corruptA.test | 72 +++++++++++++++++++++++++++++++++ - 2 files changed, 73 insertions(+), 1 deletion(-) - create mode 100644 ext/fts5/test/fts5corruptA.test - -diff --git a/ext/fts5/fts5_index.c b/ext/fts5/fts5_index.c -index 333fefa2d..c6ca83afb 100644 +Index: ext/fts5/fts5_index.c +================================================================== --- a/ext/fts5/fts5_index.c +++ b/ext/fts5/fts5_index.c @@ -873,7 +873,7 @@ static void fts5DataRelease(Fts5Data *pData){ @@ -24,9 +11,9 @@ index 333fefa2d..c6ca83afb 100644 p->rc = FTS5_CORRUPT; fts5DataRelease(pRet); pRet = 0; -diff --git a/ext/fts5/test/fts5corruptA.test b/ext/fts5/test/fts5corruptA.test -new file mode 100644 -index 000000000..838cded57 +ADDED ext/fts5/test/fts5corruptA.test +Index: ext/fts5/test/fts5corruptA.test +================================================================== --- /dev/null +++ b/ext/fts5/test/fts5corruptA.test @@ -0,0 +1,72 @@ @@ -98,7 +85,7 @@ index 000000000..838cded57 + +do_catchsql_test 1.5 { + SELECT rowid FROM t WHERE t MATCH 'a' -+} {1 {fts5: corruption found reading blob 137438953481 from table "t"}} ++} {1 {database disk image is malformed}} + +sqlite3_fts5_may_be_corrupt 0 +finish_test diff --git a/sqlite-cve-2026-11822.patch b/sqlite-cve-2026-11822.patch deleted file mode 100644 index 4512252..0000000 --- a/sqlite-cve-2026-11822.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 11db730d5c75df27722064c7a62c46ab2b16501d Mon Sep 17 00:00:00 2001 -From: dan -Date: Mon, 11 May 2026 11:53:07 +0000 -Subject: [PATCH] Improve detection of corrupt database records in fts5. - -FossilOrigin-Name: 87b653731171a26396f9796b0a5c436593571d39e991d8d040ef4473cf459b67 ---- - ext/fts5/fts5_index.c | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/ext/fts5/fts5_index.c b/ext/fts5/fts5_index.c -index c6ca83afb..7d193d529 100644 ---- a/ext/fts5/fts5_index.c -+++ b/ext/fts5/fts5_index.c -@@ -2520,6 +2520,10 @@ static void fts5LeafSeek( - if( nKeepn ){ -+ p->rc = FTS5_CORRUPT; -+ return; -+ } - - assert( nKeep>=nMatch ); - if( nKeep==nMatch ){ diff --git a/sqlite.spec b/sqlite.spec index 7d37ca6..3204951 100644 --- a/sqlite.spec +++ b/sqlite.spec @@ -12,7 +12,7 @@ Summary: Library that implements an embeddable SQL database engine Name: sqlite Version: %{rpmver} -Release: 5%{?dist}.2 +Release: 6%{?dist} License: blessing URL: http://www.sqlite.org/ @@ -23,8 +23,8 @@ Source2: http://www.sqlite.org/%{year}/sqlite-autoconf-%{realver}.tar.gz Patch1: sqlite-3.6.23-lemon-system-template.patch Patch2: sqlite-cve-2025-3277.patch Patch3: sqlite-cve-2025-6965.patch -Patch4: sqlite-cve-2026-11824.patch -Patch5: sqlite-cve-2026-11822.patch +# https://sqlite.org/src/info/4a5ad516ea93 +Patch4: sqlite-cve-2026-11822-cve-2026-11824.patch BuildRequires: make BuildRequires: gcc @@ -131,7 +131,6 @@ This package contains the analysis program for %{name}. %patch -P 2 -p1 %patch -P 3 -p1 %patch -P 4 -p1 -%patch -P 5 -p1 # The atof test is failing on the i686 architecture, when binary configured with # --enable-rtree option. Failing part is text->real conversion and @@ -268,12 +267,10 @@ make test %endif %changelog -* Wed Jul 29 2026 RHEL Packaging Agent - 3.46.1-5.2 -- Fix CVE-2026-11822 +* Wed Jul 29 2026 RHEL Packaging Agent - 3.46.1-6 +- Fixes CVE-2026-11822 +- Fixes CVE-2026-11824 - Resolves: RHEL-218240 - -* Wed Jul 29 2026 RHEL Packaging Agent - 3.46.1-5.1 -- Fix CVE-2026-11824 - Resolves: RHEL-218275 * Wed Jul 16 2025 Ales Nezbeda - 3.46.1-5