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

Issue 590213003: Linux sandbox: Allow restricting sched_* on other processes. (Closed)

Created:
6 years, 3 months ago by rickyz (no longer on Chrome)
Modified:
6 years, 2 months ago
CC:
chromium-reviews, darin-cc_chromium.org, jam, jln+watch_chromium.org, Kees Cook, mdempsky
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Linux sandbox: Allow restricting sched_* on other processes. Adds a RestrictSchedTarget parameter restriction which only allows sched_* syscalls if the pid argument is the sandboxed process's pid or if the pid is 0, which means the current thread. glibc's pthread implementation sometimes calls these syscalls with pid equal to the current tid. On these calls, the policy triggers a SIGSYS, and the SIGSYS handler reruns the syscall with a pid argument of 0. R=jln@chromium.org BUG=413855 Committed: https://crrev.com/282ba301cf990ce291c45a05b5226df6804ae271 Cr-Commit-Position: refs/heads/master@{#297059}

Patch Set 1 #

Total comments: 19

Patch Set 2 : Add missing space. #

Patch Set 3 : Add missing include. #

Patch Set 4 : Ugh, add another missing include. #

Patch Set 5 : More includse (sorry for the spam) #

Patch Set 6 : Respond to comments, switch test to sched_getparam #

Patch Set 7 : Oops, accidentally deleted an include. #

Patch Set 8 : Rebase #

Total comments: 1

Patch Set 9 : List the supported syscalls. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+160 lines, -0 lines) Patch
M sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.h View 1 2 3 4 5 6 7 8 2 chunks +11 lines, -0 lines 0 comments Download
M sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.cc View 1 2 3 4 5 6 3 chunks +42 lines, -0 lines 0 comments Download
M sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.h View 1 chunk +11 lines, -0 lines 0 comments Download
M sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc View 1 2 3 4 5 6 7 2 chunks +23 lines, -0 lines 0 comments Download
M sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions_unittests.cc View 1 2 3 4 5 2 chunks +73 lines, -0 lines 0 comments Download

Messages

Total messages: 14 (2 generated)
rickyz (no longer on Chrome)
6 years, 3 months ago (2014-09-22 20:40:52 UTC) #1
jln (very slow on Chromium)
Thanks for working on this Ricky! - I think there is a bug that will ...
6 years, 3 months ago (2014-09-22 21:56:45 UTC) #2
jln (very slow on Chromium)
> - mailto:nedeljko.babic@imgtec.com / Kees: I can't remember the status of seccomp-bpf > on MIPS ...
6 years, 3 months ago (2014-09-23 01:11:38 UTC) #3
rickyz (no longer on Chrome)
Thanks for the info on MIPS syscalls. None of the ones this touches takes 64-bit ...
6 years, 3 months ago (2014-09-23 06:03:21 UTC) #4
nedeljko
On 2014/09/23 01:11:38, jln (slow on IPC reviews) wrote: > > - mailto:nedeljko.babic@imgtec.com / Kees: ...
6 years, 2 months ago (2014-09-25 10:57:13 UTC) #5
jln (very slow on Chromium)
Thank you Nedeljko! On Thu, Sep 25, 2014 at 3:57 AM, <nedeljko.babic@imgtec.com> wrote: > On ...
6 years, 2 months ago (2014-09-25 15:32:05 UTC) #6
rickyz (no longer on Chrome)
Friendly ping - once this is checked in, I think we can start restricting these ...
6 years, 2 months ago (2014-09-26 18:59:23 UTC) #7
jln (very slow on Chromium)
Excellent, lgtm! Sorry for the long delay. https://chromiumcodereview.appspot.com/590213003/diff/130001/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.h File sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.h (right): https://chromiumcodereview.appspot.com/590213003/diff/130001/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.h#newcode53 sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.h:53: // current ...
6 years, 2 months ago (2014-09-26 20:21:51 UTC) #8
rickyz (Google)
Thanks! Will check CQ once try bots pass
6 years, 2 months ago (2014-09-26 20:44:26 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/590213003/150001
6 years, 2 months ago (2014-09-26 21:42:00 UTC) #12
commit-bot: I haz the power
Committed patchset #9 (id:150001) as 853ff832d8c3412b0c952417500b34b07cb44ded
6 years, 2 months ago (2014-09-26 22:33:18 UTC) #13
commit-bot: I haz the power
6 years, 2 months ago (2014-09-26 22:34:01 UTC) #14
Message was sent while issue was closed.
Patchset 9 (id:??) landed as
https://crrev.com/282ba301cf990ce291c45a05b5226df6804ae271
Cr-Commit-Position: refs/heads/master@{#297059}

Powered by Google App Engine
This is Rietveld 408576698