News for hackers. Stuff that matters.
Re:Remote code execution vulnerability in SQLite by saagarjha on Friday December 14, 2018 @05:26PM (#18685460)
Unfortunately this announcement is light on details; does anybody know what the actual vulnerability was?
Re:Remote code execution vulnerability in SQLite by btilly on Friday December 14, 2018 @05:42PM (#18685567)
Reading through https://www.sqlite.org/releaselog/3_26_0.html which they linked to, I'm presuming that it is tied to items 3 and 4. Which is highly suggestive that the problem is that ordinary SQL is able to write to internal virtual tables in a way that corrupts the database. And presumably from there, once you can introduce corruption you can get it to exploit a payload that you provide.

The fact that Chromium also saw fit to patch this suggests further that there was likely some way that it could be tricked into issuing queries that did this, allowing some compromise of the browser. If this could have been triggered by a web page, then that explains why they are light on details.

It should be noted that a lot of applications embed SQLite internally. If one as well studied as Chromium could be tricked in this way, I'm sure that others can as well. And since the upgrade has to happen to an embedded component, we're probably going to hear about this one for a while.

Please note, this is all educated guesswork from knowing the software ecosystem and reading release notes. I have absolutely no knowledge of the vulnerability.

Re:Remote code execution vulnerability in SQLite by blattimwind on Friday December 14, 2018 @06:05PM (#18685728)
> The fact that Chromium also saw fit to patch this suggests further that there was likely some way that it could be tricked into issuing queries that did this, allowing some compromise of the browser. If this could have been triggered by a web page, then that explains why they are light on details.

Chromium still supports WebSQL, though, which gives you essentially free reign on a SQLite database. This is quite different from the way most applications expose SQLite to untrusted data (i.e. only through parameter binding).

Re:Remote code execution vulnerability in SQLite by SayoYasuda on Friday December 14, 2018 @07:23PM (#18686144)
From what some others have posted, I suspect the underlying bug here is that a database corrupted in the right way can cause arbitrary code execution. Since Sqlite suggests use cases that require loading untrusted databases, this is a bug in its own right.

Then, the rest is "to be safe" measures, because it was possible for carefully crafted SQL to intentionally corrupt the database in controllable ways, including triggering the former bug. This isn't really the bug fix, but rather a measure to reduce the attack surface against similar undiscovered bugs.

This is speculation, though.

Re:Remote code execution vulnerability in SQLite by SQLite on Friday December 14, 2018 @09:02PM (#18686572)
Correct. The primary error is that corrupt "shadow tables" used by the FTS3 full-text search extension could cause RCE. The fix for that specific problem is here: https://www.sqlite.org/src/info/d44318f59044162e

The new SQLITE_DBCONFIG_DEFENSIVE features is more of a defense-in-depth, designed to head off future vulnerabilities by making shadow-tables read-only to ordinary SQL, along with some other restrictions. If you have an application that allows potential attackers to run arbitrary SQL, then the use of SQLITE_DBCONFIG_DEFENSIVE is recommended. It is not required. We still consider it a serious bug if somebody is able to find an exploit even with SQLITE_DBCONFIG_DEFENSIVE turned off. But that setting reduces the attack surface, making future bugs less likely.

Re:Remote code execution vulnerability in SQLite by jdright on Friday December 14, 2018 @05:43PM (#18685577)
They are giving time to more SQLite users to patch and waiting the CVE to be assigned. Looking at the chromium patch, this has something to do with ALTER TABLE. Looking at SQLite release notes they clearly are hiding the real nature of the issue there. For instance, see this: https://www.sqlite.org/lang_altertable.html

"Compatibility Note: The behavior of ALTER TABLE when renaming a table was enhanced in versions 3.25.0 (2018-09-15) and 3.26.0 (2018-12-01) in order to carry the rename operation forward into triggers and views that reference the renamed table. This is considered an improvement. Applications that depend on the older (and arguably buggy)..."

A problem that (well tailored) enables a RCE is just "arguably buggy" in their view?

Re:Remote code execution vulnerability in SQLite by EvanAnderson on Friday December 14, 2018 @06:14PM (#18685791)
I think it relates to "ALTER TABLE" too-- specially: https://www.sqlite.org/src/info/6e1330545e7b74fe

The comments in checkin a61ed147 for "renameColumnFunc()" give me the willies.

Re:Remote code execution vulnerability in SQLite by cdelsolar on Friday December 14, 2018 @05:36PM (#18685525)
They say to update to this SQLite version: https://www.sqlite.org/releaselog/3_26_0.html

Skimming that log doesn't give me any ideas.. maybe the diff would help elucidate?

Re:Remote code execution vulnerability in SQLite by Serow225 on Friday December 14, 2018 @05:39PM (#18685544)
Maybe related to this, as a guess? https://www.sqlite.org/c3ref/c_dbconfig_defensive.html#sqlit...

SQLITE_DBCONFIG_DEFENSIVE The SQLITE_DBCONFIG_DEFENSIVE option activates or deactivates the "defensive" flag for a database connection. When the defensive flag is enabled, language features that allow ordinary SQL to deliberately corrupt the database file are disabled. The disabled features include but are not limited to the following: The PRAGMA writable_schema=ON statement. Writes to the sqlite_dbpage virtual table. Direct writes to shadow tables.

Re:Remote code execution vulnerability in SQLite by schlarpc on Friday December 14, 2018 @05:43PM (#18685578)
The Chrome update only bumped to 3.25.3, so it's likely a commit between 3.24.0 and 3.25.3:

https://chromium.googlesource.com/chromium/src/+/c368e30ae55...

Re:Remote code execution vulnerability in SQLite by testplzignore on Friday December 14, 2018 @05:47PM (#18685610)
Maybe related to https://www.sqlite.org/src/info/8576ccb479fc4b76 ?

Edit: Yes, this is probably it.

Re:Remote code execution vulnerability in SQLite by chx on Friday December 14, 2018 @05:55PM (#18685661)
No way, this commit is Windows only.
Re:Remote code execution vulnerability in SQLite by tedivm on Friday December 14, 2018 @06:00PM (#18685689)
That commit seems to imply that it's a bug when running on Windows, but the Tencent Blade folks have said they've exploited this on Google Home devices. My guess is that this commit is one of many that helped resolve the vulnerability.
Re:Remote code execution vulnerability in SQLite by robocat on Friday December 14, 2018 @07:33PM (#18686204)
"Google Home" is either:

the app installed on your phone to control say a Chromecast,

or a smart speaker.

Re:Remote code execution vulnerability in SQLite by devy on Friday December 14, 2018 @05:28PM (#18685471)
Yeah, I was hoping to find a CVE number but couldn't
Re:Remote code execution vulnerability in SQLite by saagarjha on Friday December 14, 2018 @05:31PM (#18685496)
Has there been a CVE number assigned yet?
Re:Remote code execution vulnerability in SQLite by dorianm on Friday December 14, 2018 @05:35PM (#18685516)
I don't see any: https://www.cvedetails.com/vulnerability-list/vendor_id-9237...

Edit: it's "To be allocated": "[$TBD][900910] High To be allocated: Multiple issues in SQLite via WebSQL. Reported by Wenxiang Qian of Tencent Blade Team on 2018-11-01" (from https://chromereleases.googleblog.com/2018/12/stable-channel...)

Re:Remote code execution vulnerability in SQLite by wglb on Saturday December 15, 2018 @09:03AM (#18688413)
Re:Remote code execution vulnerability in SQLite by klarrimore on Friday December 14, 2018 @10:41PM (#18686904)
Welcome to the security apparatus hype machine.