Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(44)

Issue 11782005: Don't allow path traversal paths on the base file helpers (Closed)

Created:
7 years, 11 months ago by cpu_(ooo_6.6-7.5)
Modified:
7 years, 11 months ago
Reviewers:
jschuh, brettw, Nico
CC:
chromium-reviews, erikwright+watch_chromium.org, sail+watch_chromium.org
Visibility:
Public.

Description

Don't allow path traversal paths on the base file helpers This forces explicit normalization of paths and make path escaping security bugs much harder to exploit. See for example bug 167122 BUG=168890 TEST=included tests Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=175642

Patch Set 1 : #

Total comments: 2

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Total comments: 2

Patch Set 5 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+58 lines, -30 lines) Patch
M base/file_util.h View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M base/file_util.cc View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M base/platform_file.h View 1 2 3 4 1 chunk +12 lines, -2 lines 0 comments Download
M base/platform_file.cc View 1 2 3 4 1 chunk +11 lines, -0 lines 0 comments Download
M base/platform_file_posix.cc View 1 2 3 4 3 chunks +17 lines, -15 lines 0 comments Download
M base/platform_file_win.cc View 1 2 3 4 2 chunks +11 lines, -12 lines 0 comments Download
M chrome/test/base/v8_unit_test.cc View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M skia/ext/vector_canvas_unittest.cc View 1 2 3 4 1 chunk +3 lines, -1 line 0 comments Download

Messages

Total messages: 12 (0 generated)
cpu_(ooo_6.6-7.5)
7 years, 11 months ago (2013-01-05 03:11:04 UTC) #1
brettw
lgtm https://codereview.chromium.org/11782005/diff/11002/base/file_util.cc File base/file_util.cc (right): https://codereview.chromium.org/11782005/diff/11002/base/file_util.cc#newcode155 base/file_util.cc:155: if (path.ReferencesParent()) Maybe this warrants a mention in ...
7 years, 11 months ago (2013-01-07 20:50:26 UTC) #2
jschuh
lgtm on the security side.
7 years, 11 months ago (2013-01-07 20:57:25 UTC) #3
cpu_(ooo_6.6-7.5)
changes made, given the column limit I had to change the name of the function ...
7 years, 11 months ago (2013-01-08 00:18:13 UTC) #4
cpu_(ooo_6.6-7.5)
Nico, owners check for the skia/ext file please.
7 years, 11 months ago (2013-01-08 19:06:59 UTC) #5
Nico
skia owners lgtm https://codereview.chromium.org/11782005/diff/8010/base/file_util.cc File base/file_util.cc (right): https://codereview.chromium.org/11782005/diff/8010/base/file_util.cc#newcode155 base/file_util.cc:155: if (path.ReferencesParent()) Should this DCHECK(), so ...
7 years, 11 months ago (2013-01-08 19:20:03 UTC) #6
dglazkov
Could this change have caused massive fails on WebKit canaries? There are tons of tests ...
7 years, 11 months ago (2013-01-09 16:36:18 UTC) #7
Nico
On 2013/01/09 16:36:18, Dimitri Glazkov wrote: > Could this change have caused massive fails on ...
7 years, 11 months ago (2013-01-09 19:21:45 UTC) #8
cpu_(ooo_6.6-7.5)
On 2013/01/09 19:21:45, Nico wrote: > On 2013/01/09 16:36:18, Dimitri Glazkov wrote: > > Could ...
7 years, 11 months ago (2013-01-09 22:57:56 UTC) #9
Noel Gordon
This change caused https://bugs.webkit.org/show_bug.cgi?id=106631 Refer to http://trac.webkit.org/browser/trunk/Source/WebKit/chromium/tests/WebImageTest.cpp?rev=130268#L47 readFile() static PassRefPtr<SharedBuffer> readFile(const char* fileName) { String ...
7 years, 11 months ago (2013-01-18 14:15:51 UTC) #10
Nico
On Fri, Jan 18, 2013 at 6:15 AM, <noel@chromium.org> wrote: > This change caused https://bugs.webkit.org/show_bug.cgi?id=106631 ...
7 years, 11 months ago (2013-01-18 17:56:05 UTC) #11
Noel Gordon
7 years, 11 months ago (2013-01-21 01:19:00 UTC) #12
Message was sent while issue was closed.
On 2013/01/18 17:56:05, Nico wrote:
> 
> I think the fix is to convert the paths to an absolute path first. See
> https://codereview.chromium.org/11817018 and
> https://codereview.chromium.org/11829014 for an example.

Yeap, https://codereview.chromium.org/12038003

Powered by Google App Engine
This is Rietveld 408576698