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

Issue 652188: Be more restrictive when finding file names for libraries that need patching.... (Closed)

Created:
10 years, 10 months ago by Markus (顧孟勤)
Modified:
9 years, 7 months ago
Reviewers:
agl, Evan Martin
CC:
chromium-reviews
Visibility:
Public.

Description

Be more restrictive when finding file names for libraries that need patching. This avoids false positives if the directory name matches one of the well-known library names (e.g. ld). False positives not only result in a performance hit at startup, because we are now trying to instrument libraries that don't actually contain any system calls; but even worse than this, we could try to instrument system calls in the sandboxing code itself. And those system calls are deliberately coded so that they will not get rewritten. Fortunately, none of this is a security problem. If we accidentally rewrite system calls that weren't supposed to be rewritten, we will just crash on startup. TEST=the sandbox now works on the buildbots BUG=36133 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=39839

Patch Set 1 #

Total comments: 1

Patch Set 2 : '' #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+17 lines, -2 lines) Patch
M sandbox/linux/seccomp/sandbox.cc View 1 1 chunk +17 lines, -2 lines 4 comments Download

Messages

Total messages: 6 (0 generated)
Markus (顧孟勤)
The heuristic for finding the libraries that need patching was overly liberal. I intentional made ...
10 years, 10 months ago (2010-02-24 00:49:55 UTC) #1
agl
http://codereview.chromium.org/652188/diff/1/2 File sandbox/linux/seccomp/sandbox.cc (right): http://codereview.chromium.org/652188/diff/1/2#newcode482 sandbox/linux/seccomp/sandbox.cc:482: for (const char *delim = " /"; *delim; ++delim) ...
10 years, 10 months ago (2010-02-24 01:27:53 UTC) #2
Markus (顧孟勤)
http://codereview.chromium.org/652188/diff/5/1003 File sandbox/linux/seccomp/sandbox.cc (right): http://codereview.chromium.org/652188/diff/5/1003#newcode484 sandbox/linux/seccomp/sandbox.cc:484: // 08:01 2289011 /lib/libc-2.7.so Is this better? I hope ...
10 years, 10 months ago (2010-02-24 01:43:08 UTC) #3
agl
http://codereview.chromium.org/652188/diff/5/1003 File sandbox/linux/seccomp/sandbox.cc (right): http://codereview.chromium.org/652188/diff/5/1003#newcode484 sandbox/linux/seccomp/sandbox.cc:484: // 08:01 2289011 /lib/libc-2.7.so On 2010/02/24 01:43:08, Markus (顧孟勤) ...
10 years, 10 months ago (2010-02-24 01:58:15 UTC) #4
Markus (顧孟勤)
http://codereview.chromium.org/652188/diff/5/1003 File sandbox/linux/seccomp/sandbox.cc (right): http://codereview.chromium.org/652188/diff/5/1003#newcode484 sandbox/linux/seccomp/sandbox.cc:484: // 08:01 2289011 /lib/libc-2.7.so It's explicitly supposed to be ...
10 years, 10 months ago (2010-02-24 02:02:10 UTC) #5
agl
10 years, 10 months ago (2010-02-24 02:04:22 UTC) #6
http://codereview.chromium.org/652188/diff/5/1003
File sandbox/linux/seccomp/sandbox.cc (right):

http://codereview.chromium.org/652188/diff/5/1003#newcode484
sandbox/linux/seccomp/sandbox.cc:484: // 08:01 2289011 /lib/libc-2.7.so
On 2010/02/24 02:02:11, Markus (顧孟勤) wrote:
> It's explicitly supposed to be able to deal with strings that don't contain
any
> of the delimiters. If strrchr() returns NULL, we will leave "mapping"
unchanged.
> Did I miss anything?

No I'm just a muppet. You should commit this before I 'review' it any more :)

Powered by Google App Engine
This is Rietveld 408576698