Bug 2553514 - tdlib: sqlite: stack overflow via VALUES clause with WITH and UNION ALL fallback [fedora-all]
Summary: tdlib: sqlite: stack overflow via VALUES clause with WITH and UNION ALL fallb...
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: tdlib
Version: rawhide
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
Assignee: alexfails
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: {"flaws": ["5ca4783a-e35d-4829-bba5-5...
Depends On:
Blocks: 2552464
TreeView+ depends on / blocked
 
Reported: 2026-10-15 14:57 UTC by Laura Pardo
Modified: 2026-10-15 14:57 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Laura Pardo 2026-10-15 14:57:13 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).


Note You need to log in before you can comment on or make changes to this bug.