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

Issue 1211173002: add restricted filesystem access to sel_ldr

Created:
5 years, 6 months ago by jtolds
Modified:
5 years, 4 months ago
Reviewers:
Mark Seaborn, Petr Hosek, JF
CC:
native-client-reviews_googlegroups.com
Base URL:
https://chromium.googlesource.com/native_client/src/native_client.git@master
Target Ref:
refs/heads/master
Project:
nacl
Visibility:
Public.

Description

add restricted filesystem access to sel_ldr As discussed on https://groups.google.com/forum/#!topic/native-client-discuss/5UFlj0e5fvw Overall strategy: simply add one new command line option (-m), for specifying a chroot-style folder to use as the root for the untrusted process. If provided, the untrusted process will be able to read and write data (trusted OS filesystem permissions permitting) to the provided folder as if it were the root. Looking for critical feedback

Patch Set 1 #

Total comments: 11

Patch Set 2 : add restricted filesystem access to sel_ldr #

Patch Set 3 : add restricted filesystem access to sel_ldr #

Unified diffs Side-by-side diffs Delta from patch set Stats (+607 lines, -38 lines) Patch
A documentation/filesystem_access.txt View 1 1 chunk +145 lines, -0 lines 0 comments Download
M src/trusted/service_runtime/nacl_syscall_common.h View 1 1 chunk +18 lines, -0 lines 0 comments Download
M src/trusted/service_runtime/nacl_syscall_common.c View 1 3 chunks +167 lines, -1 line 0 comments Download
M src/trusted/service_runtime/sel_main.c View 1 8 chunks +24 lines, -2 lines 0 comments Download
M src/trusted/service_runtime/sys_fdio.c View 1 2 chunks +2 lines, -2 lines 0 comments Download
M src/trusted/service_runtime/sys_filename.c View 1 2 19 chunks +251 lines, -33 lines 0 comments Download

Messages

Total messages: 16 (2 generated)
jtolds
just some questions and comments https://codereview.chromium.org/1211173002/diff/1/src/trusted/service_runtime/nacl_syscall_common.c File src/trusted/service_runtime/nacl_syscall_common.c (right): https://codereview.chromium.org/1211173002/diff/1/src/trusted/service_runtime/nacl_syscall_common.c#newcode101 src/trusted/service_runtime/nacl_syscall_common.c:101: * end with a ...
5 years, 6 months ago (2015-06-25 23:05:06 UTC) #3
Mark Seaborn
High-level feedback: * Can you add a text file under documentation/ to explain the feature? ...
5 years, 6 months ago (2015-06-25 23:55:09 UTC) #4
Mark Seaborn
By the way, one piece of admin is that you would need to need to ...
5 years, 6 months ago (2015-06-25 23:59:33 UTC) #5
jtolds
signed the CLA (thought I already had, but I guess the Go and Android ones ...
5 years, 5 months ago (2015-06-26 22:07:11 UTC) #6
jtolds
Uh oh, new wrinkle I stupidly didn't realize at first: Of course of course, paths ...
5 years, 5 months ago (2015-06-27 16:27:37 UTC) #7
jtolds
> 2) I could give up on lexical path sanitization and just use realpath calls ...
5 years, 5 months ago (2015-06-27 16:30:01 UTC) #8
Mark Seaborn
On 26 June 2015 at 15:07, <jtolds@gmail.com> wrote: > signed the CLA (thought I already ...
5 years, 5 months ago (2015-06-28 20:51:15 UTC) #9
Mark Seaborn
On 27 June 2015 at 09:27, <jtolds@gmail.com> wrote: > Uh oh, new wrinkle I stupidly ...
5 years, 5 months ago (2015-06-28 21:06:28 UTC) #10
jtolds
> For a first version, for simplicity, it would be reasonable to not support > ...
5 years, 5 months ago (2015-06-30 02:56:55 UTC) #11
Mark Seaborn
On 29 June 2015 at 19:56, <jtolds@gmail.com> wrote: > > Tests still coming. It looks ...
5 years, 5 months ago (2015-06-30 07:20:59 UTC) #12
jtolds
Hey, just wanted to post and apologize for getting this 90% of the way there ...
5 years, 5 months ago (2015-07-07 16:18:44 UTC) #13
Mark Seaborn
On 7 July 2015 at 09:18, <jtolds@gmail.com> wrote: > Hey, just wanted to post and ...
5 years, 5 months ago (2015-07-20 18:01:00 UTC) #14
jtolds
> Thanks for the update, and apologies for being slow to reply myself. > > ...
5 years, 4 months ago (2015-07-29 05:49:10 UTC) #15
Sean Klein
5 years, 4 months ago (2015-08-07 20:58:10 UTC) #16
On 2015/07/29 05:49:10, jtolds wrote:
> > Thanks for the update, and apologies for being slow to reply myself.
> > 
> > Do you think you would be able to add tests?  I can do another review pass
> > if you want, but checking for test coverage is a large part of what I
> > review for.
> 
> I just wrapped up running the http://hackthe.computer/ coding competition just
> yesterday, which is what I was originally writing this change for (switched to
> using https://github.com/google/nsjail instead), and now I'm off on vacation
for
> 10 days.
> 
> I'm so sorry for having dropped and ran like this. I do think I can add tests
> when I get back, but I'm not sure if you want to wait that long.
> 
> > What I would recommend for end-to-end testing is to add a Python script
> > that:
> >  * creates a temporary directory and populates it with some files;
> >  * runs sel_ldr on a nexe that checks that files inside the granted
> > directory are accessible and that files outside aren't accessible.
> 
> Yeah that sounds like a great testing plan. I'll get to it when I can, but in
> the meantime I do believe the changeset is otherwise feature complete, so up
to
> you what you want to do.
> 
> Sorry again, I realize I'm being the most terrible kind of contributor by
having
> gotten this 90% of the way there and then bailing.
> 
> If you're okay waiting I'll get to it, but I'm also totally fine if you want
to
> find an adoptive owner.
> 
> -JT

I'll pick up this issue (and also add tests).

Powered by Google App Engine
This is Rietveld 408576698