[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Incomplete fix for CVE-2019-20218/sqlite3



Hi,
CVE-2019-20218 isn't fixed in Stretch/LTS. Running the reproducer:

----------------------------------------------------------------
CREATE TABLE v0 (a);
CREATE VIEW v2 (v3) AS WITH x1 AS (SELECT * FROM v2) SELECT v3 AS x, v3 AS y FROM v2;
SELECT * FROM v2;
----------------------------------------------------------------

still trigger an infinite loop. On Buster it correctly bails out:

----------------------------------------------------------------
sqlite> CREATE TABLE v0 (a);
sqlite> CREATE VIEW v2 (v3) AS WITH x1 AS (SELECT * FROM v2) SELECT v3 AS x, v3 AS y FROM v2;
sqlite> SELECT * FROM v2;
Error: view v2 is circularly defined
----------------------------------------------------------------

For the Buster update I also backported 

>From 46a31cdf6b7c1197e01627f91af601479cd99940 Mon Sep 17 00:00:00 2001
From: drh <drh@noemail.net>
Date: Sat, 9 Nov 2019 14:38:58 +0000
Subject: [PATCH] Make sure the WITH stack in the Parse object is disabled
 following an error.

which seems missing in Stretch. Not sure if that's all or if 3.16 needs other changes
as well, though.

Cheers,
        Moritz


Reply to: