Bug 2553512

Summary: sqlite: sqlite: stack overflow via VALUES clause with WITH and UNION ALL fallback [fedora-all]
Product: [Fedora] Fedora Reporter: Laura Pardo <lpardo>
Component: sqliteAssignee: Petr Khartskhaev <pkhartsk>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: rawhideCC: db-sig, fjanus, pkhartsk, pkubat
Target Milestone: ---Keywords: Security, SecurityTracking
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: {"flaws": ["5ca4783a-e35d-4829-bba5-5e6a5e832ef8"]}
Fixed In Version: sqlite-3.50.2-4.fc43 sqlite-3.51.2-3.fc44 Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2026-11-24 01:47:35 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2552464    

Description Laura Pardo 2026-10-15 14:55:23 UTC
Disclaimer: Community trackers are created by Red Hat Product Security team on a best effort basis. Package maintainers are required to ascertain if the flaw indeed affects their package, before starting the update process.

A vulnerability was found in SQLite's SQL parser. A VALUES clause with many rows combined with a WITH (CTE) clause forces a UNION ALL compound-SELECT fallback. The compound-SELECT depth limit is bypassed when SF_Values is set, creating an arbitrarily deep AST. When expression depth limits reject the tree, recursive cleanup could overflow the stack. The fix makes clearSelect() iterate the pPrior chain instead of recursing.

PoC: https://github.com/abraxas/sqlite-values-union

Fixed in SQLite 3.54.0 (fix in src/select.c — clearSelect() now iterative).

Comment 1 Fedora Update System 2026-11-20 10:43:05 UTC
FEDORA-2026-95f1a4f58d (sqlite-3.51.2-3.fc44) has been submitted as an update to Fedora 44.
https://bodhi.fedoraproject.org/updates/FEDORA-2026-95f1a4f58d

Comment 2 Fedora Update System 2026-11-20 10:43:42 UTC
FEDORA-2026-fc7eaee44a (sqlite-3.50.2-4.fc43) has been submitted as an update to Fedora 43.
https://bodhi.fedoraproject.org/updates/FEDORA-2026-fc7eaee44a

Comment 3 Fedora Update System 2026-11-21 02:30:45 UTC
FEDORA-2026-95f1a4f58d has been pushed to the Fedora 44 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2026-95f1a4f58d`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2026-95f1a4f58d

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 4 Fedora Update System 2026-11-21 02:56:35 UTC
FEDORA-2026-fc7eaee44a has been pushed to the Fedora 43 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2026-fc7eaee44a`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2026-fc7eaee44a

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 5 Fedora Update System 2026-11-24 01:47:35 UTC
FEDORA-2026-fc7eaee44a (sqlite-3.50.2-4.fc43) has been pushed to the Fedora 43 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 6 Fedora Update System 2026-11-25 01:51:10 UTC
FEDORA-2026-95f1a4f58d (sqlite-3.51.2-3.fc44) has been pushed to the Fedora 44 stable repository.
If problem still persists, please make note of it in this bug report.