| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
BUG=130662
TEST=sandbox_linux_unittests
Review URL: https://chromiumcodereview.appspot.com/11363212
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@168969 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
This means that external timeouts (the test framework) are now the
dominant factor to detect a hung test.
BUG=137652
TEST=none
Review URL: https://codereview.chromium.org/11299052
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@168336 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
| |
Review URL: https://codereview.chromium.org/11366229
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@167739 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
PolicyRule copy ctor was not taking into account that the source policy rule
could be using some 'constants' memory at the bottom, so adding further
opcodes to the new policy rule would overwrite the copied ones.
In other words, this pattern
PolicyRule pr_orig(ASK_BROKER);
pr_orig.AddStringMatch(...);
PolicyRule pr_copy(pr_orig);
pr_copy.AddStringMatch(...);
Was broken. This was not impacting the chrome sbox code because we don't
mutate the new rule after copy construction.
Acknoledgments to Ashutosh Mehra from Adobe Corp for pointing the bug
and providing a test case.
BUG=160890
TEST=new unittest added
Review URL: https://codereview.chromium.org/11275301
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@167571 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This data can be used by the policy to communicate with the method that set up policy.
In BPF_TEST()s it allows us to avoid global variables.
BUG=130662
TEST=sandbox_linux_unittests
Review URL: https://chromiumcodereview.appspot.com/11230048
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@165123 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When we set-up the probe process to test seccomp-bpf availability, setting
a pipe on stderr can sometimes fail. Presumably if this descriptor is backed
by a file on a file system that will return an error on close().
We don't consider not being able to set-up the pipe on stderr as a fatal error
anymore.
BUG=152530
NOTRY=true
Review URL: https://chromiumcodereview.appspot.com/11300014
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@164850 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Now that OWNERS supports per-file owners, we can limit the scope of the
top-level wildcard to just DEPS, and make darin and ben owners for
everything else and remove the broad use of "set noparent".
R=ben@chromium.org, darin@chromium.org
BUG=88315
Review URL: https://codereview.chromium.org/11191038
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@163069 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
| |
Added explicit type conversion in initilization list.
BUG=None
TEST=Built using gcc 4.7.
Review URL: https://chromiumcodereview.appspot.com/11193050
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@162945 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
New code generator that is more generic and can automatically reorder
instructions to meet the constraints of BPF programs.
Previously, we were very careful to emit instructions in just the
right order so that there would only ever be forward jumps. As we add
more features to our BPF programs, this code is getting fragile.
So, instead, we now use standard compiler techniques; we first build a
graph of all the instructions, then we split them into basic blocks,
we perform some basic optimizations (at the moment, this is just the
merging of common tails of instructions), we sort the basic blocks
topologically, and then we reassemble all the blocks into a BPF
program.
There should be no functional change, but this code is the
pre-requisite for upcoming changes.
BUG=130662
TEST=sandbox_linux_unittests
Review URL: https://chromiumcodereview.appspot.com/10690011
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@162924 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We can't enable DEP at launch prior to Win7, but we can queue an APC to enable immediately after the loader finishes.
BUG=147752
Review URL: https://chromiumcodereview.appspot.com/10944015
TBR=jschuh@chromium.org
Review URL: https://codereview.chromium.org/11194027
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@162300 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
We can't enable DEP at launch prior to Win7, but we can queue an APC to enable immediately after the loader finishes.
BUG=147752
Review URL: https://chromiumcodereview.appspot.com/10944015
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@162293 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Avoid needlessly expensive scanning of system call ranges.
This CL improves how we deal with discontiguous ranges of system call numbers.
(Original CL by markus@chromium.org)
TEST=sandbox_linux_unittests on x86_64 and ARM
BUG=148856
Review URL: https://chromiumcodereview.appspot.com/11096012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@161943 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Wrap dup2 with HANDLE_EINTR in the error reporting set-up for the BPF
support detection process.
We also print errno as an attempt to obtain more information on this puzzling
bug.
BUG=152530
Review URL: https://chromiumcodereview.appspot.com/11103021
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@161443 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The new tests do aral end-to-end testing that the JOB_NONE flag works
as expected.
BUG=79091
TEST=sbox_integration_tests
Review URL: https://chromiumcodereview.appspot.com/11017012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@161245 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a temporary change to narrow down failures enabling mitigations on Win8. I'll revert once the cause is determined.
BUG=153399
Review URL: https://codereview.chromium.org/11040046
TBR=jschuh@chromium.org
Review URL: https://codereview.chromium.org/11026071
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@160419 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
This is a temporary change to narrow down failures enabling mitigations on Win8. I'll revert once the cause is determined.
BUG=153399
Review URL: https://codereview.chromium.org/11040046
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@160252 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These tests are failing due to timing issues on the slower bots after
crrev.com/160133 landed. Julian will fiddle with the timings and re-
enable the tests tomorrow.
BUG=79091
TBR=pastarmovj@chromium.org
Review URL: https://codereview.chromium.org/11030028
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@160137 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
outside of a job and wire it to a cmd line flag.
This is needed for running chrome in Citrix or RemoteApp (Terminal Services) environments.
These envoronments both start the main process inside a job spawned by rdpinit.exe
(at least in the RemoteApp case) and the process are not allowed to escape it
therefore when the job assignment is attempted it failes with ERROR_PERMISSION_DENIED.
This is not a problem in Windows 8/Server 2012 because these allow nested jobs so we
should only respect this flag for versions older than that.
BUG=79091
TEST=Start Chrome as a published app with --allow-no-job and observe it spawning renderer processes properly.
Review URL: https://chromiumcodereview.appspot.com/10908171
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@160133 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
of Chrome (Windows only).
BUG=131699,153148
Enabling handle tracing for the whole lifetime of a process uncovers to many bugs, causing lots of crashes. A supression or selective enablement mechanism is required to make it work.
Review URL: https://chromiumcodereview.appspot.com/11035012
TBR=alexeypa@chromium.org
Review URL: https://codereview.chromium.org/11043021
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@159914 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
(Windows only).
BUG=131699,153148
Review URL: https://chromiumcodereview.appspot.com/11035012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@159850 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
| |
BUG=153399
Review URL: https://codereview.chromium.org/11036009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@159632 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
| |
BUG=152814
Review URL: https://chromiumcodereview.appspot.com/10981061
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@159215 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
don't support).
BUG=none
TEST=none
Review URL: https://codereview.chromium.org/10951038
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@158165 0039d316-1c4b-4281-b951-d872f2087c98
|