| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
for all processes. Instead have whoever creates a sandboxed process set this data. This allows us to clean a few NaCl related changes in content:
-remove NaCl sandbox rules from content
-remove the hack for ifdef'ing out the GPU policy since it didn't link for nacl64.exe
-remove the 1GB memory reservation for the NaCl loader process out of content
Other cleanup:
-renamed sandbox_policy.* to sandbox_win.* to match the other platform-specific sandbox files
-moved BrokerGetFileHandleForProcess to internal content files since it's not called from outside
-remove AddGpuDllEvictionPolicy since it was redundant (the one dll it removed was already listed in the generic list)
There's still more cleanup to be done in the sandbox code (i.e. remove chrome frame switch, nacl process type switch etc). I will do that in future changes.
BUG=191682
Review URL: https://codereview.chromium.org/12805004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@189175 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On Android, errno are only supported up to 255 and are not processed
otherwise. Fix a test to work around this issue.
BUG=181647,169416
NOTRY=true
TBR=markus
Review URL: https://chromiumcodereview.appspot.com/12638015
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@187410 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
In revision 143549 seccomp_bpf was moved to its own target, however the
line changing 'sandbox' to a static_library was left behind. This should
be removed as it is misleading and leads to odd build generator behavior
(like an empty build.ninja file).
Review URL: https://codereview.chromium.org/12340115
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@185143 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
"static" methods.
This change allows us to stack multiple instances of the sandbox.
Also, split up headers in a generally saner fashion.
BUG=130662
TEST=sandbox_linux_unittests
Review URL: https://chromiumcodereview.appspot.com/12223109
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@184541 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
| |
TBR=sky
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@184344 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a second attempt. The original CL was tracked at https://chromiumcodereview.appspot.com/11613016
BUG=130662
TEST=sandbox_linux_unittests
Review URL: https://chromiumcodereview.appspot.com/11648028
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@182698 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
Tests all pass and are getting enabled on the bots this week.
BUG=168414
Review URL: https://codereview.chromium.org/12221109
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@181924 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
These flags aren't supported on 64-bit and can throw an error on Win8 process creation.
BUG=147752
Review URL: https://chromiumcodereview.appspot.com/12207106
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@181840 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
| |
Review URL: https://codereview.chromium.org/12217101
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@181640 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
| |
DEP is already enabled by default and Win64 throws an
error when you try to manipulate the setting at all.
Review URL: https://codereview.chromium.org/12218061
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@181382 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
BUG=130662
TEST=sandbox_linux_unittests
Review URL: https://chromiumcodereview.appspot.com/12207029
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@181121 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
BUG=169416
NOTRY=true
Review URL: https://chromiumcodereview.appspot.com/12207004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@180747 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before this change, the renderer and other subprocesses never inherit
stdout and stderr when they are pipe handles. Stdout/stderr will be
pipe handles when chrome.exe/browser_tests.exe is running under
Buildbot or under Cygwin's default terminal, mintty.
We fix this by specifying PROC_THREAD_ATTRIBUTE_HANDLE_LIST in the
arguments to CreateProcess().
The fix only applies on Windows >=Vista.
Although it's probably safe for stdout/stderr to be inherited when it
is a pipe handle or file handle, we put this behind the flag
"--enable-logging". (This flag already makes stderr work when
chrome.exe/browser_tests.exe is running under a Windows console -- a
case which is not handled by the code path we're adding here because a
Windows console is not an inheritable kernel handle.)
Note that this relies on the fix committed in http://crrev.com/178656.
BUG=171836
TEST=manually add logging to renderer process and check that it appears
when running chrome.exe or browser_tests.exe
Review URL: https://chromiumcodereview.appspot.com/12033045
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@180303 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
| |
Make it possible to run the tests via run_tests.py --exe.
BUG=169416
NOTRY=true
Review URL: https://chromiumcodereview.appspot.com/12093055
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@180236 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We have to keep a few globally shared bits of data, because of the way the
kernel exposes the sandboxing API. In the past, we solved this problem by
having a monolithic "static" class for all of the sandboxing code.
This is sub-optimal and makes it difficult to implement stacking of multiple
BPF sandboxes -- a feature that we would like to have.
I believe, all that needs to be kept static is the handling of SIGSYS
traps. So, we are pulling those into their own class. In the next step, we'll
clean up the actual sandbox class.
This changelist introduces one new feature. Going forward, we won't allow
"unsafe" traps (e.g. used for grey listing) unless the user explicitly sets
the CHROME_SANDBOX_DEBUGGING environment variable. This prevents accidental
bugs from unintentionally disabling the entire sandbox.
BUG=130662
TEST=sandbox_linux_unittests
Review URL: https://chromiumcodereview.appspot.com/11929036
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@179026 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When building on windows with target_arch=x64, we no longer need win32 targets
forced to be 64-bit. This gates out these targets when target_arch!=ia32.
(Prior CL dropped the minimal set to break the dependency between these targets
and the rest of the build. This eliminates them completely.)
BUG=None
TEST=None
R=jschuh@chromium.org,thestig@chromium.org
TBR=darin@chromium.org,abodenha@chromium.org,apatrick@chromium.org,sra@chromium.org,wtc@chromium.org
Review URL: https://chromiumcodereview.appspot.com/11929039
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@177959 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Every SANDBOX_TEST derivative will now use poll() with a timeout
instead of a blocking write.
This is a second layer to make sure that our tests have a timeout.
BUG=169416
NOTRY=true
Review URL: https://chromiumcodereview.appspot.com/12018029
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@177875 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
| |
All derivatives of SANDBOX_TEST() will now have a 10s timeout.
BUG=169416
NOTRY=true
Review URL: https://chromiumcodereview.appspot.com/12021021
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@177771 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
TEST=sandbox_linux_unittests
NOTRY=true
Review URL: https://chromiumcodereview.appspot.com/11859020
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@177702 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a copy of https://codereview.chromium.org/11738003 by mnissler@chromium.org
SOCK_DGRAM fails in case the other end of the connection dies before
sending a reply. This causes recvmsg() calls on the socket to hang,
which results in stuck processes sticking around after running tests.
BUG=chromium:166528
TEST=No more stuck --type=zygote processes in browser_tests and content_browsertests.
Review URL: https://codereview.chromium.org/11823024
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@177638 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
BUG=166704
NOTRY=true
Review URL: https://chromiumcodereview.appspot.com/12025004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@177542 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=166704
TBR=markus
NOTRY=true
Review URL: https://chromiumcodereview.appspot.com/11958035
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@177371 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We now have a generic android_ucontext.h that should work on both
ARM and X86.
Note: if this needs to be reverted on X86, please only revert
the GYP file and send me the error message.
(Thanks to Yin Fengwei for his related work in
https://chromiumcodereview.appspot.com/11639038/)
BUG=166704
NOTRY=true
Review URL: https://chromiumcodereview.appspot.com/11971028
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@177321 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
of static tests on our filter policy and on the filter program. This extends
the test coverage of our unittests, even if it is still somewhat limited.
TEST=sandbox_linux_unittests
BUG=141545
Review URL: https://chromiumcodereview.appspot.com/11829013
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@176361 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We only support 2-parameters open in the broker process but we
didn't filter-out O_CREAT properly.
BUG=168944
NOTRY=true
Review URL: https://chromiumcodereview.appspot.com/11778056
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@175744 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
I've fixed the dependencies, so we can now support building the sandbox and running the tests as part of a normal Win64 build.
BUG=168414
Review URL: https://chromiumcodereview.appspot.com/11788002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@175278 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
to the span of the callsite.
BUG=none
TEST=base_unittests
Review URL: https://codereview.chromium.org/11636061
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@174998 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=166704
TBR=markus
NOTRY=true
Review URL: https://chromiumcodereview.appspot.com/11649044
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@174244 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
> SECCOMP-BPF: Added support for checking system call arguments against bit masks.
>
>
> BUG=130662
> TEST=sandbox_linux_unittests
>
>
> Review URL: https://chromiumcodereview.appspot.com/11613016
Tests fail on Linux Precise bot: http://build.chromium.org/p/chromium.linux/buildstatus?builder=Linux%20Precise%20%28dbg%29&number=410
TBR=markus@chromium.org
Review URL: https://codereview.chromium.org/11618035
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@174147 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
BUG=130662
TEST=sandbox_linux_unittests
Review URL: https://chromiumcodereview.appspot.com/11613016
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@174135 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
BUG=166888
TEST=none
Review URL: https://chromiumcodereview.appspot.com/11639024
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@174122 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
BUG=166704
NOTRY=true
Review URL: https://chromiumcodereview.appspot.com/11647024
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@174116 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously erros is struct sigcontext is not defined. Including the
header file now.
TBR=jln,markus
Android only include change. Android trybots pass compile.
NOTRY=true
BUG=
Review URL: https://chromiumcodereview.appspot.com/11636039
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@174104 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We define our own android_arm_ucontext.h file since
signal.h doesn't define ucontext_t on Android.
BUG=166704
NOTRY=true
Review URL: https://chromiumcodereview.appspot.com/11618010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@174070 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
Get a subset of sandbox/linux to compile under Android.
BUG=166704
NOTRY=true
Review URL: https://chromiumcodereview.appspot.com/11612014
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@173954 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
filters.
BUG=130662
TEST=sandbox_linux_unittests
NOTRY=true
Review URL: https://chromiumcodereview.appspot.com/11411254
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@173243 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We add a GPU broker process to make sure we can open certain files
once the sandbox is started.
We do not need to allow open() in the GPU policy in certain configuration
anymore, which creates an effective GPU sandbox.
BUG=166111
NOTRY=true
Review URL: https://chromiumcodereview.appspot.com/11569028
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@173233 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We add a new low-level broker process mechanism that can be
async signal safe and is suitable for use in the seccomp-bpf sandbox.
Also fix UnixDomainSocket::SendMsg() to never generate a SIGPIPE.
This is a re-land of https://chromiumcodereview.appspot.com/11557025/ (173064)
BUG=165837
TBR=markus,willchan
NOTRY=true
Review URL: https://chromiumcodereview.appspot.com/11564030
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@173128 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
> Linux sandbox: add a new low-level broker process mechanism.
>
> We add a new low-level broker process mechanism that can be
> async signal safe and is suitable for use in the seccomp-bpf sandbox.
>
> Also fix UnixDomainSocket::SendMsg() to never generate a SIGPIPE.
>
> BUG=165837
> NOTRY=true
>
> Review URL: https://chromiumcodereview.appspot.com/11557025
TBR=jln@chromium.org
Review URL: https://codereview.chromium.org/11573030
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@173065 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We add a new low-level broker process mechanism that can be
async signal safe and is suitable for use in the seccomp-bpf sandbox.
Also fix UnixDomainSocket::SendMsg() to never generate a SIGPIPE.
BUG=165837
NOTRY=true
Review URL: https://chromiumcodereview.appspot.com/11557025
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@173064 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
| |
In release mode, we don't fail on probe process failing on close() as an
attempt to circumvent a very puzzling bug.
BUG=152530
Review URL: https://chromiumcodereview.appspot.com/11446011
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@171351 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
| |
We use a BPF policy to create a reliable test for our SandboxSyscall()
facility.
BUG=163904, 162925
Review URL: https://chromiumcodereview.appspot.com/11428157
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@171157 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Eliminate variadic arguments in favor of C++ templates.
This makes ASAN and Valgrind much happier, as we are no
longer accessing more arguments than what has been passed
into our function (i.e. in the past, we'd always forward
six arguments to the kernel, even if the system call
needed fewer; now, we explicitly pass zeros).
- In the past, callers had to be very careful when passing
NULL, as the C++ compiler was likely to treat this macro
as a 32bit integer value rather than a 64bit pointer. We
now always perform sign extension for expanding arguments
to the full native word width.
- On x86-64, we could clobber up to eight (in some cases 16)
bytes in the red zone. This would typically only happen
when high optimization levels were turned on, and in many
cases it ended up overwriting data that was no longer
needed. But we have seen at least one case where we ended
up clobbering a system call parameter. We now explicitly
avoid the red zone and this problem can no longer happen.
BUG=163904,162925
TEST=sandbox_linux_unittests
NOTRY=true
Review URL: https://chromiumcodereview.appspot.com/11416326
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@170896 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Make it easier to reproduce simple bugs and issues by adding a trivial
test for system calls with one argument.
BUG=163904
NOTRY=true
Review URL: https://chromiumcodereview.appspot.com/11434088
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@170804 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
SandboxSyscall uses variadic arguments from the stack and it seems to confuse
ASAN.
BUG=162925
NOTRY=true
Review URL: https://chromiumcodereview.appspot.com/11416209
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@169733 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
| |
BUG=162073
TEST=none
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@169545 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix a race where we could end-up opening the wrong /proc/pid/fd because
we were using absolute paths.
BUG=162489
NOTRY=true
Review URL: https://chromiumcodereview.appspot.com/11418160
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@169541 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
Review URL: https://chromiumcodereview.appspot.com/11419121
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@169213 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
Print the size of pointers in the CallSupports test.
BUG=
NOTRY=true
Review URL: https://chromiumcodereview.appspot.com/11416143
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@169125 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reason: SigBus test failure
-- LOG --
SandboxBpf.SigBus:
sandbox/linux/tests/unit_tests.cc:65: Failure
Value of: subprocess_exit_status
Actual: 1
Expected: kExpectedValue
Which is: 42
---------
BUG=130662
TEST=sandbox_linux_unittests
Review URL: https://chromiumcodereview.appspot.com/11363212
TBR=markus@chromium.org
Review URL: https://codereview.chromium.org/11418112
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@168993 0039d316-1c4b-4281-b951-d872f2087c98
|