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

Issue 2484393004: Linux Sandbox: Whitelist prlimit64 when used as getrlimit (Closed)

Created:
4 years, 1 month ago by Daniel Kurtz
Modified:
4 years ago
CC:
chromium-reviews, darin-cc_chromium.org, jam, jln+watch_chromium.org, rickyz+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

From http://man7.org/linux/man-pages/man2/getrlimit.2.html: The Linux-specific prlimit() system call combines and extends the functionality of setrlimit() and getrlimit(). It can be used to both set and get the resource limits of an arbitrary process. Since version 2.13, the glibc getrlimit() and setrlimit() wrapper functions no longer invoke the corresponding system calls, but instead employ prlimit(), for the reasons described in BUGS. If new_limit is not NULL, then the rlimit structure to which it points is used to set new values. If it is NULL, then prlimit() acts as getrlimit(). So, allow prlimit() with new_limit=NULL, and pid is the current process (or 0), so the glib implementation of getrlimit can succeed. BUG=chromium:662450 TEST=boot on ChromeOS w/ sandbox enabled No messages like: getrlimit(RLIMIT_NOFILE) failed R=rickyz,jcliang,vapier Committed: https://crrev.com/5ce3b357d4cb9906b57f5758ef271cb69dbb664b Cr-Commit-Position: refs/heads/master@{#434872}

Patch Set 1 #

Patch Set 2 : Linux Sandbox: Whitelist prlimit64 when used as getrlimit #

Total comments: 1

Patch Set 3 : Linux Sandbox: Whitelist prlimit64 when used as getrlimit #

Total comments: 3

Patch Set 4 : Fixed new_limit Arg and comment typos #

Total comments: 2

Patch Set 5 : Add '.' to comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+15 lines, -1 line) Patch
M content/common/sandbox_linux/bpf_renderer_policy_linux.cc View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.h View 1 2 3 1 chunk +5 lines, -0 lines 0 comments Download
M sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc View 1 2 3 4 1 chunk +8 lines, -0 lines 0 comments Download

Messages

Total messages: 32 (15 generated)
rickyz (no longer on Chrome)
lgtm
4 years, 1 month ago (2016-11-11 06:20:23 UTC) #1
Daniel Kurtz
On 2016/11/11 06:20:23, rickyz wrote: > lgtm Updated per comments by jorgelo & vapier to ...
4 years, 1 month ago (2016-11-21 09:11:31 UTC) #5
Jorge Lucangeli Obes
https://codereview.chromium.org/2484393004/diff/20001/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc File sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc (right): https://codereview.chromium.org/2484393004/diff/20001/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc#newcode366 sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc:366: return If(new_limit == 0, Allow()).Else(Error(EPERM)); Should this also restrict ...
4 years, 1 month ago (2016-11-21 14:18:43 UTC) #6
Daniel Kurtz
On 2016/11/21 14:18:43, Jorge Lucangeli Obes wrote: > https://codereview.chromium.org/2484393004/diff/20001/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc > File sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc > (right): > ...
4 years, 1 month ago (2016-11-21 23:48:34 UTC) #7
Jorge Lucangeli Obes
On 2016/11/21 23:48:34, Daniel Kurtz wrote: > On 2016/11/21 14:18:43, Jorge Lucangeli Obes wrote: > ...
4 years, 1 month ago (2016-11-22 02:56:04 UTC) #8
Daniel Kurtz
On 2016/11/22 02:56:04, Jorge Lucangeli Obes wrote: > On 2016/11/21 23:48:34, Daniel Kurtz wrote: > ...
4 years, 1 month ago (2016-11-22 04:08:25 UTC) #9
Daniel Kurtz
On 2016/11/22 04:08:25, Daniel Kurtz wrote: > On 2016/11/22 02:56:04, Jorge Lucangeli Obes wrote: > ...
4 years, 1 month ago (2016-11-22 09:07:57 UTC) #11
Jorge Lucangeli Obes
On 2016/11/22 09:07:57, Daniel Kurtz wrote: > On 2016/11/22 04:08:25, Daniel Kurtz wrote: > > ...
4 years, 1 month ago (2016-11-22 15:59:47 UTC) #12
Jorge Lucangeli Obes
https://codereview.chromium.org/2484393004/diff/40001/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc File sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc (right): https://codereview.chromium.org/2484393004/diff/40001/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc#newcode366 sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc:366: const Arg<uintptr_t> new_limit(0); They cannot both be argument index ...
4 years, 1 month ago (2016-11-22 16:06:39 UTC) #13
Daniel Kurtz
https://codereview.chromium.org/2484393004/diff/40001/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc File sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc (right): https://codereview.chromium.org/2484393004/diff/40001/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc#newcode366 sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc:366: const Arg<uintptr_t> new_limit(0); On 2016/11/22 16:06:39, Jorge Lucangeli Obes ...
4 years, 1 month ago (2016-11-23 00:21:14 UTC) #14
Jorge Lucangeli Obes
lgtm w/nits. https://codereview.chromium.org/2484393004/diff/60001/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc File sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc (right): https://codereview.chromium.org/2484393004/diff/60001/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc#newcode367 sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc:367: // Only allow 'get' operations, and only ...
4 years ago (2016-11-28 15:10:04 UTC) #19
Daniel Kurtz
https://codereview.chromium.org/2484393004/diff/60001/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc File sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc (right): https://codereview.chromium.org/2484393004/diff/60001/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc#newcode367 sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc:367: // Only allow 'get' operations, and only for the ...
4 years ago (2016-11-28 18:38:44 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2484393004/80001
4 years ago (2016-11-28 18:39:53 UTC) #23
commit-bot: I haz the power
Try jobs failed on following builders: blimp_linux_dbg on master.tryserver.chromium.linux (JOB_TIMED_OUT, no build URL) cast_shell_linux on ...
4 years ago (2016-11-28 20:41:36 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2484393004/80001
4 years ago (2016-11-29 03:32:53 UTC) #27
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years ago (2016-11-29 03:39:24 UTC) #30
commit-bot: I haz the power
4 years ago (2016-11-29 03:43:26 UTC) #32
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/5ce3b357d4cb9906b57f5758ef271cb69dbb664b
Cr-Commit-Position: refs/heads/master@{#434872}

Powered by Google App Engine
This is Rietveld 408576698