From patchwork Tue Nov 24 22:51:09 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yoann Congal X-Patchwork-Id: 105458 X-Patchwork-Delegate: yoann.congal@smile.fr Received: from mail-wr1-f49.google.com (mail-wr1-f49.google.com [209.85.221.49]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.31014.1795560742873711588 for ; Tue, 24 Nov 2026 14:52:23 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@smile.fr header.s=google2 header.b=d8Sybdkw; spf=pass (domain: smile.fr, ip: 209.85.221.49, mailfrom: yoann.congal@smile.fr) Received: by mail-wr1-f49.google.com with SMTP id ffacd0b85a97d-4acb44dcd7bso4413404f8f.0 for ; Tue, 24 Nov 2026 14:52:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=smile.fr; s=google2; t=1795560741; x=1796165541; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to:content-type; bh=p9CrfEJevykuNHhskl+5Bt3grWxrPKbceBfvUcNSvLg=; b=d8SybdkwukQh2SLooAQASgwSxgEVSy2QWpN01gQhGGReVEdkpBrL1vv33MFD9dodeh BFdQUK//mTP1PCA6Haa+FyxTn27l/gobMi8qck2f/pZFZI2K4mHVgLm0mLVCoLlZ2OLH w5VeGRORT6fSqlRoFAjcgjthZycfi0hBCy7EZGYDQK2mnPSS1EEF2zgmU/chfUWlQFQ0 A0o/xvK8Q9StPDz/PXRp7cPANgkRhJJ7rFxGQrMsKN1sSdxoO9SMuFRes1lZ8MXsdV5U Rs/wHtzxBsR5UHjZ95OSkLTTdYW3eoyrPa2rm7WPU9dSYJdIHLSro2Hsx2RiaeLbTyGy g2DA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1795560741; x=1796165541; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to:content-type; bh=p9CrfEJevykuNHhskl+5Bt3grWxrPKbceBfvUcNSvLg=; b=Q+CEVXpISOvt7i6N7RURJ4q+roTFDzkRrS/0v3C/4rbmTiMOnfm/+WXmKsETStmLB7 1occ7A+CKNkWOEYamadO21h2XCFOIXOOg/zYoeoo9BgIg7ddXZWKxjWFEszlUWsWAy7o JYGgIFBzpDbY7J41vyNisXLs/Tk0sNUdLooeGqPAua9rM0OiwGyX4XJMbK3YJG3rLHi9 d3wLVxwEij6Xdc3JZQAE9QvwfAii8L5imZIjswJBVJ1ZexTlacjhmROFUjegSqgVtNNC rIHTfbTvsrmM6DGH6yUgUj1MlnlzJO7h1nCtYkQMbrXRHw/+dNIny990heWtYcIP91GT unZQ== X-Gm-Message-State: APuU4Z8yoMEWJ0UvoyywS57ZmW3PWeynFlD4krA1AkEyqW++OST8jFBX 4DrJj1v8ePYLpA204cljgHJJQJvJvzwS+9/GtKimjLPbpHgA6vFkqkOO3B12G4kgqUHhkzgf/b8 +0a+TyCc= X-Gm-Gg: AZFdTZfCptcvNalNheAb99tsvnl04O3M2cMpz7CkVw9QfX74SMt7iWTsbX/rKul5qyE STrxZ2MKi6pSBqjqL9S/BlA+/CJMqNqwZdvoi9YV7h+T8CBLa+t10a0lf9HM3VwN5cbEUnAg5rd h/9ZzpT+rOO4jYQ1nEwzNLcysBuk6omD9xChZvEVqW6W4nu5mZ9hQil4oK8oo1oh4W5oFf0r6ep /g+5zivQQPds4+6o6WCtojrzyO9ZJXb3KOprCF5UFqf9W55fCS3NTwXGJBUyhSLX8d0BGRnqAxH bHvcP0EexG6nxrmiDi0JyXMXXszWK0MDW8X+C7n1BAReeemZb+e6aiheup/puIa/U7TfvHScZPM A/Ym2OyIAZzV3/Eh/8ZavoyMgT9KgRbEt+Eft4b6bBZOEz8yGxN7udoLv6LPKESlxX+FbUuvF20 DBw6l/i+1m9Wm4MQod92d4P80A1WV2t2zekCObnnCtcKvj7iVnUqI/G/uNJaU3U1ZREZEQz/fvU BHUoBMnuUzcCHKWNazGG7cyBk8v0XzMZFL3VDQ8MVm8huK8M/sGTCGPbcAeSNJY6aWe0fndE6pT zBtrXpdN0ux8Igc+stP1TxNOMYADrTLsSgqxsc/BsklyorHOsHtlGdHY1Cw38YListRhJWFYpDc HtGU92HNCn/2IAg/6MUizlXhRekH7 X-Received: by 2002:a05:600c:1c08:b0:4bb:7757:fe6d with SMTP id 5b1f17b1804b1-4bb88804c5fmr404197275e9.11.1795560740696; Tue, 24 Nov 2026 14:52:20 -0800 (PST) Return-Path: Received: from FRSMI25-LASER.home (2a01cb001331aa00a2e4fb7b0d887544.ipv6.abo.wanadoo.fr. [2a01:cb00:1331:aa00:a2e4:fb7b:d88:7544]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4ab6bb989e3sm30462488f8f.52.2026.11.24.14.52.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Nov 2026 14:52:20 -0800 (PST) From: Yoann Congal To: openembedded-core@lists.openembedded.org Subject: [OE-core][blacksail 02/21] sqlite3: Fix CVE-2026-119377 Date: Tue, 24 Nov 2026 23:51:09 +0100 Message-ID: <50a8dde55e8ac4d52c672d3f34f0d33a8e21948b.1795560335.git.yoann.congal@smile.fr> X-Mailer: git-send-email 2.55.0 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by lin-tor-korg-lkml-alma10-1 with HTTPS for ; Tue, 24 Nov 2026 22:52:26 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/251082 From: Arpit Patel This patch applies the upstream fix series [1], [3], [5], and [7] for the authorizer bypass. Commits [1] and [3] are dependent commits. Commit [5] adds authorizer checks for RIGHT JOIN USING terms, and commit [7] corrects the loop so every term is checked. The GitHub mirror commits correspond to the SQLite Fossil check-ins shown in [2], [4], [6], and [8], respectively. [1] https://github.com/sqlite/sqlite/commit/c70fbd39f9c130bbe1cc45269c3b490dfdf7f259 [2] https://sqlite.org/src/info/625f78a630bb [3] https://github.com/sqlite/sqlite/commit/ddea119f825bf07f145c55f623022286bc644664 [4] https://sqlite.org/src/info/4ef88a36f9d9 [5] https://github.com/sqlite/sqlite/commit/7ff247c5b9ead3ad8a69c26d3fd264878e127237 [6] https://sqlite.org/src/info/bbd69ce27462 [7] https://github.com/sqlite/sqlite/commit/5694c3bb2a6a40770ecd2f65910eea756734dfd8 [8] https://sqlite.org/src/info/2cb228776836 Reference: https://nvd.nist.gov/vuln/detail/CVE-2026-119377 Signed-off-by: Arpit Patel Signed-off-by: Yoann Congal --- .../CVE-2026-119377-dependent_p1.patch | 86 +++++++++++++++++++ .../CVE-2026-119377-dependent_p2.patch | 61 +++++++++++++ .../sqlite/sqlite3/CVE-2026-119377_p1.patch | 52 +++++++++++ .../sqlite/sqlite3/CVE-2026-119377_p2.patch | 51 +++++++++++ meta/recipes-support/sqlite/sqlite3_3.53.4.bb | 8 +- 5 files changed, 256 insertions(+), 2 deletions(-) create mode 100644 meta/recipes-support/sqlite/sqlite3/CVE-2026-119377-dependent_p1.patch create mode 100644 meta/recipes-support/sqlite/sqlite3/CVE-2026-119377-dependent_p2.patch create mode 100644 meta/recipes-support/sqlite/sqlite3/CVE-2026-119377_p1.patch create mode 100644 meta/recipes-support/sqlite/sqlite3/CVE-2026-119377_p2.patch diff --git a/meta/recipes-support/sqlite/sqlite3/CVE-2026-119377-dependent_p1.patch b/meta/recipes-support/sqlite/sqlite3/CVE-2026-119377-dependent_p1.patch new file mode 100644 index 00000000000..57f44bc645e --- /dev/null +++ b/meta/recipes-support/sqlite/sqlite3/CVE-2026-119377-dependent_p1.patch @@ -0,0 +1,86 @@ +From c3cab0322ae36fe6ca21df300c670af379c0a423 Mon Sep 17 00:00:00 2001 +From: drh <> +Date: Sat, 2 May 2026 17:30:33 +0000 +Subject: [PATCH] Minor optimization to the authorizer. + +FossilOrigin-Name: 625f78a630bbf897f945065f1b85a92fe26e426302c8f6edc4d26a817ff62358 + +CVE: CVE-2026-119377 +Upstream-Status: Backport [https://github.com/sqlite/sqlite/commit/c70fbd39f9c130bbe1cc45269c3b490dfdf7f259] + +Backport Changes: +- Applied the src/auth.c and src/resolve.c changes to sqlite3.c because + the Yocto sqlite-autoconf source uses the amalgamated SQLite layout. +- Kept SQLITE_PRIVATE on sqlite3AuthCheck() to match the amalgamated + source. +- Omitted manifest and manifest.uuid because they are repository + metadata and are not needed for this sqlite3.c backport. + +Signed-off-by: Arpit Patel +--- + sqlite3.c | 27 ++++++++++++++++++++++----- + 1 file changed, 22 insertions(+), 5 deletions(-) + +diff --git a/sqlite3.c b/sqlite3.c +index 0644a39..6a795f7 100644 +--- a/sqlite3.c ++++ b/sqlite3.c +@@ -111320,9 +111320,7 @@ lookupname_end: + if( cnt==1 ){ + assert( pNC!=0 ); + #ifndef SQLITE_OMIT_AUTHORIZATION +- if( pParse->db->xAuth +- && (pExpr->op==TK_COLUMN || pExpr->op==TK_TRIGGER) +- ){ ++ if( db->xAuth && (pExpr->op==TK_COLUMN || pExpr->op==TK_TRIGGER) ){ + sqlite3AuthRead(pParse, pExpr, pSchema, pNC->pSrcList); + } + #endif +@@ -126468,8 +126466,14 @@ SQLITE_PRIVATE void sqlite3AuthRead( + ** either SQLITE_OK (zero) or SQLITE_IGNORE or SQLITE_DENY. If SQLITE_DENY + ** is returned, then the error count and error message in pParse are + ** modified appropriately. ++** ++** Divided into two routines. realAuthCheck() does the work. The ++** sqlite3AuthCheck() routine is usually a fast no-op but invokes ++** realAuthCheck() (and spends time doing some stack pushes and pops ++** as a result) in the uncommon case where an authorization check is ++** actually needed. + */ +-SQLITE_PRIVATE int sqlite3AuthCheck( ++static int SQLITE_NOINLINE realAuthCheck( + Parse *pParse, + int code, + const char *zArg1, +@@ -126483,7 +126487,7 @@ SQLITE_PRIVATE int sqlite3AuthCheck( + ** or if the parser is being invoked from within sqlite3_declare_vtab. + */ + assert( !IN_RENAME_OBJECT || db->xAuth==0 ); +- if( db->xAuth==0 || db->init.busy || IN_SPECIAL_PARSE ){ ++ if( IN_SPECIAL_PARSE ){ + return SQLITE_OK; + } + +@@ -126508,6 +126512,19 @@ SQLITE_PRIVATE int sqlite3AuthCheck( + } + return rc; + } ++SQLITE_PRIVATE int sqlite3AuthCheck( ++ Parse *pParse, ++ int code, ++ const char *zArg1, ++ const char *zArg2, ++ const char *zArg3 ++){ ++ if( pParse->db->xAuth!=0 && pParse->db->init.busy==0 ){ ++ return realAuthCheck(pParse,code,zArg1,zArg2,zArg3); ++ }else{ ++ return SQLITE_OK; ++ } ++} + + /* + ** Push an authorization context. After this routine is called, the +-- +2.35.6 + diff --git a/meta/recipes-support/sqlite/sqlite3/CVE-2026-119377-dependent_p2.patch b/meta/recipes-support/sqlite/sqlite3/CVE-2026-119377-dependent_p2.patch new file mode 100644 index 00000000000..121424308e2 --- /dev/null +++ b/meta/recipes-support/sqlite/sqlite3/CVE-2026-119377-dependent_p2.patch @@ -0,0 +1,61 @@ +From 4ad8d0b4f4de75182a835bfadf0dc14c1c8c1a70 Mon Sep 17 00:00:00 2001 +From: drh <> +Date: Mon, 1 Jun 2026 16:49:39 +0000 +Subject: [PATCH] Make sure the authenticator is called for columns that are + part of a USING in a FULL JOIN. [bugs:/info/2026-05-31T02:00:37Z|Bug + 2026-05-31T02:00:37Z]. + +FossilOrigin-Name: 4ef88a36f9d9669b0d74c58f79ad497803885ff6078e5f9685f13c96eab397cc + +CVE: CVE-2026-119377 +Upstream-Status: Backport [https://github.com/sqlite/sqlite/commit/ddea119f825bf07f145c55f623022286bc644664] + +Backport Changes: +- Applied the src/resolve.c change to sqlite3.c because this recipe + uses the amalgamated SQLite source. +- Omitted manifest and manifest.uuid updates because they are Fossil + repository metadata and are not needed in this backport. + +Signed-off-by: Arpit Patel +--- + sqlite3.c | 17 +++++++++++++--- + 1 file changed, 13 insertions(+), 4 deletions(-) + +diff --git a/sqlite3.c b/sqlite3.c +index 6a795f7..9353a03 100644 +--- a/sqlite3.c ++++ b/sqlite3.c +@@ -111237,7 +111237,7 @@ static int lookupName( + ** cnt>1 means there were two or more matches. + ** + ** cnt==0 is always an error. cnt>1 is often an error, but might +- ** be multiple matches for a NATURAL LEFT JOIN or a LEFT JOIN USING. ++ ** be multiple matches for a NATURAL OUTER JOIN or a OUTER JOIN USING. + */ + assert( pFJMatch==0 || cnt>0 ); + assert( !ExprHasProperty(pExpr, EP_xIsSelect|EP_IntValue) ); +@@ -111320,9 +111320,18 @@ + if( cnt==1 ){ + assert( pNC!=0 ); + #ifndef SQLITE_OMIT_AUTHORIZATION +- if( db->xAuth && (pExpr->op==TK_COLUMN || pExpr->op==TK_TRIGGER) ){ +- sqlite3AuthRead(pParse, pExpr, pSchema, pNC->pSrcList); +- } ++ if( db->xAuth ){ ++ if( pFJMatch ){ ++ assert( pExpr->op==TK_FUNCTION ); ++ assert( sqlite3_stricmp(pExpr->u.zToken,"coalesce")==0 ); ++ assert( pExpr->x.pList==pFJMatch ); ++ assert( pFJMatch->nExpr>0 ); ++ pExpr = pFJMatch->a[0].pExpr; ++ } ++ if( pExpr->op==TK_COLUMN || pExpr->op==TK_TRIGGER ){ ++ sqlite3AuthRead(pParse, pExpr, pSchema, pNC->pSrcList); ++ } ++ } + #endif + /* Increment the nRef value on all name contexts from TopNC up to + ** the point where the name matched. */ +-- +2.35.6 + diff --git a/meta/recipes-support/sqlite/sqlite3/CVE-2026-119377_p1.patch b/meta/recipes-support/sqlite/sqlite3/CVE-2026-119377_p1.patch new file mode 100644 index 00000000000..4ab2f652bf0 --- /dev/null +++ b/meta/recipes-support/sqlite/sqlite3/CVE-2026-119377_p1.patch @@ -0,0 +1,52 @@ +From 7e76b79f06869f46def99a3ec08d9dfb53a346b1 Mon Sep 17 00:00:00 2001 +From: drh <> +Date: Sun, 5 Jul 2026 16:06:33 +0000 +Subject: [PATCH] Be sure to invoke the authorizer callback on all terms of the + USING clause in a RIGHT JOIN. [bugs:/info/2026-07-05T08:15:45Z|Bug + 2026-07-05T08:15:45Z] + +FossilOrigin-Name: bbd69ce27462000873af053bfebdd305c53deac85c426b1e7dbd927b5f17d622 + +CVE: CVE-2026-119377 +Upstream-Status: Backport [https://github.com/sqlite/sqlite/commit/7ff247c5b9ead3ad8a69c26d3fd264878e127237] + +Backport Changes: +- Applied the src/resolve.c change in sqlite3.c because the Yocto + sqlite-autoconf source uses the amalgamated layout. +- Omitted test/auth.test because the extracted recipe source lacks the + upstream Tcl test tree. +- Omitted manifest and manifest.uuid because they are repository + metadata and are not needed in this source patch. + +Signed-off-by: Arpit Patel +--- + sqlite3.c | 9 ++++++--- + 1 file changed, 6 insertions(+), 3 deletions(-) + +diff --git a/sqlite3.c b/sqlite3.c +index 9353a03..411a39a 100644 +--- a/sqlite3.c ++++ b/sqlite3.c +@@ -111322,13 +111322,16 @@ lookupname_end: + #ifndef SQLITE_OMIT_AUTHORIZATION + if( db->xAuth ){ + if( pFJMatch ){ ++ int ii; + assert( pExpr->op==TK_FUNCTION ); + assert( sqlite3_stricmp(pExpr->u.zToken,"coalesce")==0 ); + assert( pExpr->x.pList==pFJMatch ); + assert( pFJMatch->nExpr>0 ); +- pExpr = pFJMatch->a[0].pExpr; +- } +- if( pExpr->op==TK_COLUMN || pExpr->op==TK_TRIGGER ){ ++ for(ii=0; iinExpr; ii++){ ++ assert( pFJMatch->a[0].pExpr->op==TK_COLUMN ); ++ sqlite3AuthRead(pParse, pFJMatch->a[0].pExpr, pSchema, pNC->pSrcList); ++ } ++ }else if( pExpr->op==TK_COLUMN || pExpr->op==TK_TRIGGER ){ + sqlite3AuthRead(pParse, pExpr, pSchema, pNC->pSrcList); + } + } +-- +2.35.6 + diff --git a/meta/recipes-support/sqlite/sqlite3/CVE-2026-119377_p2.patch b/meta/recipes-support/sqlite/sqlite3/CVE-2026-119377_p2.patch new file mode 100644 index 00000000000..827d5fe7501 --- /dev/null +++ b/meta/recipes-support/sqlite/sqlite3/CVE-2026-119377_p2.patch @@ -0,0 +1,51 @@ +From a98f25c8a88d1e0e24f677279ac90b30567f93ee Mon Sep 17 00:00:00 2001 +From: drh <> +Date: Fri, 24 Jul 2026 14:53:59 +0000 +Subject: [PATCH] Fix a bug in the check-in [bbd69ce274620008] causing that + bug-fix check-in to fail to completely fix the original bug. This fix is in + response to the follow-up report at [bugs:/info/2026-07-24T02:52:08Z|Bug + 2026-07-24T02:52:08Z]. + +FossilOrigin-Name: 2cb22877683680c1f89bcc9edb47bd1a4a8755d4a6b846a1a20136a657dacdcc + +CVE: CVE-2026-119377 +Upstream-Status: Backport [https://github.com/sqlite/sqlite/commit/5694c3bb2a6a40770ecd2f65910eea756734dfd8] + +Backport Changes: +- Applied the src/resolve.c correction to sqlite3.c because the Yocto + recipe source uses the amalgamated SQLite layout. +- Omitted test/auth.test because the extracted recipe source lacks the + upstream Tcl test tree. +- Omitted manifest and manifest.uuid because they are Fossil + repository metadata and are not needed in the source patch. + +Signed-off-by: Arpit Patel +--- + sqlite3.c | 7 +++---- + 1 file changed, 3 insertions(+), 4 deletions(-) + +diff --git a/sqlite3.c b/sqlite3.c +index 273ef4a..6130466 100644 +--- a/sqlite3.c ++++ b/sqlite3.c +@@ -111322,14 +111322,13 @@ lookupname_end: + #ifndef SQLITE_OMIT_AUTHORIZATION + if( db->xAuth ){ + if( pFJMatch ){ +- int ii; + assert( pExpr->op==TK_FUNCTION ); + assert( sqlite3_stricmp(pExpr->u.zToken,"coalesce")==0 ); + assert( pExpr->x.pList==pFJMatch ); + assert( pFJMatch->nExpr>0 ); +- for(ii=0; iinExpr; ii++){ +- assert( pFJMatch->a[0].pExpr->op==TK_COLUMN ); +- sqlite3AuthRead(pParse, pFJMatch->a[0].pExpr, pSchema, pNC->pSrcList); ++ for(i=0; inExpr; i++){ ++ assert( pFJMatch->a[i].pExpr->op==TK_COLUMN ); ++ sqlite3AuthRead(pParse,pFJMatch->a[i].pExpr,pSchema,pNC->pSrcList); + } + }else if( pExpr->op==TK_COLUMN || pExpr->op==TK_TRIGGER ){ + sqlite3AuthRead(pParse, pExpr, pSchema, pNC->pSrcList); +-- +2.35.6 + diff --git a/meta/recipes-support/sqlite/sqlite3_3.53.4.bb b/meta/recipes-support/sqlite/sqlite3_3.53.4.bb index 007a823dc59..c7c081b3935 100644 --- a/meta/recipes-support/sqlite/sqlite3_3.53.4.bb +++ b/meta/recipes-support/sqlite/sqlite3_3.53.4.bb @@ -20,8 +20,12 @@ S = "${UNPACKDIR}/sqlite-autoconf-${SQLITE_PV}" B = "${WORKDIR}/build" SRC_URI = "http://www.sqlite.org/2026/sqlite-autoconf-${SQLITE_PV}.tar.gz" -SRC_URI += "file://0001-Add-option-to-disable-zlib.patch" - +SRC_URI += "file://0001-Add-option-to-disable-zlib.patch \ + file://CVE-2026-119377-dependent_p1.patch \ + file://CVE-2026-119377-dependent_p2.patch \ + file://CVE-2026-119377_p1.patch \ + file://CVE-2026-119377_p2.patch \ +" SRC_URI[sha256sum] = "0e9483900e92cd5de8fd48d16bf9200145a61f7fd5be542a5ac81d8a9516eb9c" UPSTREAM_CHECK_URI = "http://www.sqlite.org/"