New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 676563 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Last visit > 30 days ago
Closed: Mar 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Bug



Sign in to add a comment

Integer-overflow in parseModifier

Project Member Reported by ClusterFuzz, Dec 22 2016

Issue description

Detailed report: https://cluster-fuzz.appspot.com/testcase?key=6237856210354176

Fuzzer: libfuzzer_sqlite3_ossfuzz_fuzzer
Job Type: libfuzzer_chrome_ubsan
Platform Id: linux

Crash Type: Integer-overflow
Crash Address: 
Crash State:
  parseModifier
  isDate
  timeFunc
  
Regressed: https://cluster-fuzz.appspot.com/revisions?job=libfuzzer_chrome_ubsan&range=433990:434098

Minimized Testcase (0.04 Kb):
Download: https://cluster-fuzz.appspot.com/download/AMIfv97ga-EgmDDm3QjjJyU9SXyQHamGVSunRebe986yZC_63eHXv9PfzsBXFtlxvswqtWFGNY5Tn-RU12RTwBFceyofwwNJKMVdiJhev8yfSgAdwHZt2xuMHux5yF7BEFxRk2O2Kr1GZnQDffc_YXhPdMzeSNiBXA?testcase_id=6237856210354176
SELECT  time(1,8||"0E065 year");|"SC


Issue filed automatically.

See https://chromium.googlesource.com/chromium/src/+/master/testing/libfuzzer/reproducing.md for more information.
 
Cc: msrchandra@chromium.org
Components: Infra>Git
Labels: Test-Predator-Wrong-CLs
Owner: mmoroz@chromium.org
Status: Assigned (was: Untriaged)
Find it did not provide any possible suspect.
Assigning to the concern owner from CL --
https://chromium.googlesource.com/chromium/src/+log/4af1869e97cdf585994c422c22423f6d6fcf68ce..9be83c0490323e941cabd41da1edf5b6079a954b?pretty=fuller

Suspecting Commit#
https://chromium.googlesource.com/chromium/src/+/656b55356751d12fd8c643f927691275ef10dded

@mmoroz -- Could you please look into the issue, kindly re-assign if this is not related to your changes.
Thank You.

Comment 2 by mmoroz@chromium.org, Dec 22 2016

Cc: mmoroz@chromium.org kcc@chromium.org sh...@chromium.org aizatsky@chromium.org
Owner: michaeln@chromium.org
Status: Available (was: Assigned)
Passing this over to sqlite3 OWNERS.

FYI, I don't see the same crash on OSS-Fuzz (maybe different versions matter), but I've uploaded a testcase manually, let's see: https://clusterfuzz-external.appspot.com/testcase?key=5641089482489856&noredirect=1

Comment 3 by mmoroz@chromium.org, Dec 22 2016

Looks like upstream version is not affected.

Comment 5 by sh...@chromium.org, Jan 4 2017

SELECT  time(1,8||"0E065 year");|"SC
-> SELECT time(1, "80E65 year");

80E65 is parsed into a double r, so it should be representable.  So then p->Y += (int)r is going to be undefined either in the cast, or in the addition.  I'm not sure how this is reporting -2^31.

Upstream "fixes" this by defining ranges for different transforms, with "year" at 14713.

I'm not sure this is actionable, we'll get a fix if/when we do an upgrade, meanwhile I don't think it's exploitable (if we have code relying on SQLite's time handling rather than base/time, we're doing things very incorrectly).
Project Member

Comment 6 by ClusterFuzz, Mar 21 2017

Project Member

Comment 7 by ClusterFuzz, Mar 21 2017

Labels: ClusterFuzz-Verified
Status: Verified (was: Available)
ClusterFuzz testcase 6237856210354176 is verified as fixed, so closing issue.

If this is incorrect, please add ClusterFuzz-Wrong label and re-open the issue.

Sign in to add a comment