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

Issue 11419121: SECCOMP-BPF: Added support for greylisting of system calls. (Closed)

Created:
8 years, 1 month ago by Markus (顧孟勤)
Modified:
8 years, 1 month ago
CC:
chromium-reviews, agl, jln+watch_chromium.org
Visibility:
Public.

Description

SECCOMP-BPF: Added support for greylisting of system calls. In addition to a Sandbox::Trap() handler, we now have a Sandbox::UnsafeTrap() handler. This feature should only be used for debugging purposes as it subverts the security of the sandbox. But it is useful to track down problems with the sandboxing policy. Within an unsafe trap handler, all sandbox restrictions are lifted. This, for example, allows us to allow system calls that would normally be denied by the policy, but to log their arguments, return value, and call stack. N.B.: this is the second attempt at submitting this CL. See https://chromiumcodereview.appspot.com/11363212/ for previous code reviews BUG=130662 TEST=sandbox_linux_unittests NOTRY=true Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=169213

Patch Set 1 : #

Patch Set 2 : Fixed system call forwarding on 32bit architectures #

Total comments: 9

Patch Set 3 : More unittest coverage #

Total comments: 1

Patch Set 4 : Simplified sandbox policy in unittest #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1074 lines, -67 lines) Patch
M sandbox/linux/sandbox_linux.gypi View 2 chunks +3 lines, -0 lines 0 comments Download
M sandbox/linux/seccomp-bpf/Makefile View 1 chunk +1 line, -1 line 0 comments Download
M sandbox/linux/seccomp-bpf/codegen.h View 1 chunk +9 lines, -0 lines 0 comments Download
M sandbox/linux/seccomp-bpf/codegen.cc View 2 chunks +36 lines, -0 lines 0 comments Download
M sandbox/linux/seccomp-bpf/die.h View 3 chunks +12 lines, -0 lines 0 comments Download
M sandbox/linux/seccomp-bpf/die.cc View 6 chunks +17 lines, -5 lines 0 comments Download
M sandbox/linux/seccomp-bpf/errorcode.h View 2 chunks +2 lines, -1 line 0 comments Download
M sandbox/linux/seccomp-bpf/errorcode.cc View 1 chunk +3 lines, -1 line 0 comments Download
M sandbox/linux/seccomp-bpf/sandbox_bpf.h View 4 chunks +65 lines, -6 lines 0 comments Download
M sandbox/linux/seccomp-bpf/sandbox_bpf.cc View 1 13 chunks +287 lines, -53 lines 0 comments Download
M sandbox/linux/seccomp-bpf/sandbox_bpf_unittest.cc View 1 2 3 2 chunks +215 lines, -0 lines 0 comments Download
A sandbox/linux/seccomp-bpf/syscall.h View 1 chunk +23 lines, -0 lines 0 comments Download
A sandbox/linux/seccomp-bpf/syscall.cc View 1 2 1 chunk +288 lines, -0 lines 0 comments Download
A sandbox/linux/seccomp-bpf/syscall_unittest.cc View 1 chunk +113 lines, -0 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
Markus (顧孟勤)
8 years, 1 month ago (2012-11-21 21:16:05 UTC) #1
jln (very slow on Chromium)
A few minor comments and a request for a better ForwardSyscall test. If I understand ...
8 years, 1 month ago (2012-11-21 23:04:46 UTC) #2
Markus (顧孟勤)
PTAL https://chromiumcodereview.appspot.com/11419121/diff/5001/sandbox/linux/seccomp-bpf/sandbox_bpf.cc File sandbox/linux/seccomp-bpf/sandbox_bpf.cc (right): https://chromiumcodereview.appspot.com/11419121/diff/5001/sandbox/linux/seccomp-bpf/sandbox_bpf.cc#newcode855 sandbox/linux/seccomp-bpf/sandbox_bpf.cc:855: static_cast<intptr_t>(args.args[0]), On 2012/11/21 23:04:46, Julien Tinnes wrote: > ...
8 years, 1 month ago (2012-11-22 00:29:23 UTC) #3
jln (very slow on Chromium)
LGTM with one nit: simplify PrctlPolicy https://chromiumcodereview.appspot.com/11419121/diff/5001/sandbox/linux/seccomp-bpf/sandbox_bpf.cc File sandbox/linux/seccomp-bpf/sandbox_bpf.cc (right): https://chromiumcodereview.appspot.com/11419121/diff/5001/sandbox/linux/seccomp-bpf/sandbox_bpf.cc#newcode855 sandbox/linux/seccomp-bpf/sandbox_bpf.cc:855: static_cast<intptr_t>(args.args[0]), On 2012/11/22 ...
8 years, 1 month ago (2012-11-22 01:12:39 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/markus@chromium.org/11419121/14001
8 years, 1 month ago (2012-11-22 02:05:27 UTC) #5
jln (very slow on Chromium)
I'm adding NOTRY=true, since this is failing on win_rel for unrelated reasons. Re-sending to the ...
8 years, 1 month ago (2012-11-22 03:50:24 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/markus@chromium.org/11419121/14001
8 years, 1 month ago (2012-11-22 03:50:42 UTC) #7
commit-bot: I haz the power
8 years, 1 month ago (2012-11-22 03:51:08 UTC) #8
Change committed as 169213

Powered by Google App Engine
This is Rietveld 408576698