Commit Graph

113 Commits

Author SHA1 Message Date
Bob Owen
92db53b861 Bug 1432381: Replace sidestep resolvers with stubs as they are not actually used. r=aklotz
These cause compilation issues for MinGW.
It looks like these are a legacy from the original sandbox code before it was
integrated into chromium.
2018-02-06 08:52:26 +00:00
Tom Ritter
2d53d71b7b Bug 1431803 Disable a specific __try block on MinGW r=bobowen
This function is a technique to name a thread for debugging purposes,
and it always throws an exception (and then continues). On MinGW
we don't want it to throw an exception, so we do nothing.

This means on MinGW we won't get nice thread naming during debugging,
but we'll limp along.

MozReview-Commit-ID: JRKY4wp7sdu

--HG--
extra : rebase_source : 439205d83167dcde5306f9899244e7d336116111
2018-01-19 13:26:22 -06:00
Tom Ritter
2f2511d2e9 Bug 1431797 Correct the capitalization of headers inside the chromium code so MinGW can compile r=bobowen
MozReview-Commit-ID: DFlruq4iIUe

--HG--
extra : rebase_source : a883cb8264292143a90846f02a548c7da68fb168
2018-01-24 14:25:59 -06:00
Tom Ritter
2f8e7d0c85 Bug 1432790 Fix MinGW Sandbox linking error about not being able to find _ReturnAddress() r=bobowen
This reverts 6e41201152dd (Bug 1431621) which compiled but did not link.
It also fixes the original issue by removing the stray \ at the end of the
line that was causing the error.

MozReview-Commit-ID: LgaxYK3EOwR

--HG--
extra : rebase_source : 7de3b5126417ea99ff7fee3a809e556b5a2de4a6
2018-01-23 22:08:21 -06:00
Tom Ritter
b009e6cd23 Bug 1432295 Cast GetProcAddress to (void*) r=bobowen
error: invalid conversion from 'FARPROC {aka int (__attribute__((__stdcall__)) *)()}' to 'void*' [-fpermissive]

According to http://stackoverflow.com/questions/13958081/, msvc does the fixup

MozReview-Commit-ID: HTghe9uL0EP

--HG--
extra : rebase_source : b083b9247aa07ba58c23b3b3a2e5b19c7393dafb
2018-01-23 09:15:44 -06:00
Tom Ritter
7ae3c27af4 Bug 1432239 Declare operator new [](size_t, sandbox::AllocationType, void*) r=bobowen
MozReview-Commit-ID: GCKj5Ao2Y2n

--HG--
extra : rebase_source : d3f9b5cf14f60ba4c51375931b3de5b71b8312cc
2017-03-08 19:16:46 +00:00
Tom Ritter
0446563c16 Bug 1431825 Map _Copy_s to copy for basic_string compatibility on MinGW r=bobowen
MozReview-Commit-ID: 48P2G9nBfGf

--HG--
extra : rebase_source : ffeb7ce3c41964e245097c2dc7665e2e99ae7a43
2018-01-19 14:48:13 -06:00
Tom Ritter
9b36d73842 Bug 1431807 Allow MinGW and silence warning about Windows SDK version r=bobowen
MozReview-Commit-ID: 3aVeqSzRGXB

--HG--
extra : rebase_source : c63064e6ae843c4fd0f2fc121ea325acc7771664
2017-08-30 09:48:34 -05:00
Tom Ritter
854473e64c Bug 1431801 Don't declare duplicate instantiations. r=bobowen
On MinGW, these typedefs are the same, and mingw complains about duplicate instantiations.
Rather than use -fpermissive, just comment out the second instantiation.

MozReview-Commit-ID: 5prsrStgwKY

--HG--
extra : rebase_source : 843340df6e2ce835794b4f370f846b249babf93c
2017-03-07 18:23:57 +00:00
Tom Ritter
71c4b94aa4 Bug 1431621 Remove the gcc variant of BASE_WIN_GET_CALLER, because MinGW defines _ReturnAddress() r=bobowen
Note that MinGW defines it without __builtin_extract_return_addr which
means we're dropping that, but the gcc documentation indicates that
shouldn't be an issue. It is needed when a fixup is necessary:

> For example, on the 31-bit S/390 platform the highest bit has to
> be masked out, or on SPARC platforms an offset has to be added for
> the true next instruction to be executed.



MozReview-Commit-ID: 4D5bIT9Fei4

--HG--
extra : rebase_source : 3f959d72ab3a756e0d636b5eaaf3e883042e9865
2017-03-07 19:51:36 +00:00
Chris Peterson
37efe4d0e6 Bug 1428535 - Add missing override specifiers to overridden virtual functions. r=froydnj
MozReview-Commit-ID: DCPTnyBooIe

--HG--
extra : rebase_source : cfec2d96faeb11656d86d760a34e0a04cacddb13
extra : intermediate-source : 6176724d63788b0fe8caa3f91607c2d93dbaa7ec
extra : source : eebbb0600447f9b64aae3bcd47b4be66c02a51ea
2017-11-05 19:37:28 -08:00
Gian-Carlo Pascutto
61cf15cc85 Bug 1297740. r=jld 2018-01-08 10:07:16 +01:00
Coroiu Cristina
ebae541f60 Backed out 1 changesets (bug 1297740) for mingw32 build failure at src/ipc/chromium/src/base/process_util_win.cc r=backout on a CLOSED TREE
Backed out changeset e2501f2e295e (bug 1297740)
2018-01-06 00:59:25 +02:00
Gian-Carlo Pascutto
3178a4003d Bug 1297740. r=jld
--HG--
extra : rebase_source : 1d7bd987eed365bf442ed7eb856d8413af3205dc
2018-01-04 15:37:33 +01:00
Csoregi Natalia
c88d4f8c83 Backed out changeset 3bdd7743f057 (bug 1297740) for Build Bustage. r=backout on a CLOSED TREE 2017-12-21 16:21:48 +02:00
Gian-Carlo Pascutto
6821480454 Bug 1297740. r=jld
--HG--
extra : rebase_source : 5531d3902fc5916d9d205ed13d7d5c062bef8b27
2017-12-07 16:36:10 +01:00
Bob Owen
cd83addd77 Bug 1395187: Use STARTF_FORCEOFFFEEDBACK flag when starting Windows child processes to prevent app starting cursor. r=jimm 2017-12-07 10:24:38 +00:00
Bob Owen
ef5af7b0b1 Bug 1366701 Part 2: Roll-up patch to apply remaining mozilla changes to chromium sandbox. r=tabraldes,aklotz,jimm,bobowen
Patches re-applied from security/sandbox/chromium-shim/patches/after_update/.
See patch files for additional commit comments.
2014-11-29 17:12:18 +00:00
Bob Owen
6bd2ddcccd Bug 1366701 Part 1: Roll-up of chromium sandbox update and mozilla patches to get a running browser. r=jld,aklotz,jimm,bobowen
This updates security/sandbox/chromium/ files to chromium commit 937db09514e061d7983e90e0c448cfa61680f605.

Additional patches re-applied from security/sandbox/chromium-shim/patches/with_update/ to give a compiling and mostly working browser.
See patch files for additional commit comments.
2017-10-26 15:10:41 +01:00
Bob Owen
5e9dff873e Bug 1314801 Part 1: Compile chromium sandbox features that require at least UCRT SDK version 10.0.10586.0. r=jimm 2017-09-13 11:19:41 +01:00
Alex Gaynor
dc31e19e84 Bug 1229829 - Part 1 - Apply chromium sandbox patches from upstream which improves alternate desktop support; r=bobowen
This is 0cb5dadc2b1f84fbbd9c6f75056e38d05a5b07d3 and
db4c64b63d6098294ed255e962700fd2d465575e in the chromium repository.

This allows a single process to create sandboxed children with alternate
desktops on both an alternate winstation and the local winstation.

MozReview-Commit-ID: 8sS7LjoveOk

--HG--
extra : rebase_source : 6915af73743f87ed74ddefe04210dbdd95bb56ed
2017-08-16 09:54:31 -04:00
James Forshaw
0b3b189961 Bug 1385928: Take new implementation of GetProcessBaseAddress from chromium commit f398005bc4ca0cc2dab2198faa99d4ee8f4da60d. r=jimm
This should fix issues we have seen with running Firefox from short name paths or moved binaries.
2017-08-15 09:29:46 +00:00
Bob Owen
bbf27f0cae Bug 1377555 Part 2: Add option to Windows chromium sandbox policy to not use restricting SIDs. r=jimm 2017-07-11 09:44:20 +01:00
Bob Owen
01f2685a30 Bug 1377555 Part 1: Back out changesets 04edb03fb817 and d17ac655cc51. r=jimm
This backouts the previous change to detect and change the sandbox policy
when running from a network drive.
2017-07-11 09:44:20 +01:00
Bob Owen
1eb1c9091d Bug 1378061: Only set user's SID in USER_LIMITED as deny only when not using restricting SIDs. r=jimm 2017-07-05 21:00:55 +01:00
Bob Owen
a3df44ccee Bug 1323188: Don't use restricting SIDs in the sandbox access tokens when running from a network drive. r=jimm 2017-06-07 20:20:02 +01:00
Daniel Holbert
2a87f6e3c3 Bug 1369837: Add a void cast to silence clang Wcomma build warning, in sandbox's snapshot of chromium header. r=bobowen
The build warning is for "possible misuse of comma operator".

The comma operator is a bit of a footgun becasue its first operand's result
just gets dropped on the floor (in this case, the result of the DCHECK
expression).  It appears that Chromium's use of the comma operator here is
intentional, though -- so we might as well accept clang's suggestion and "cast
expression to void to silence warning".

This is also filed upstream as:
 https://bugs.chromium.org/p/chromium/issues/detail?id=729123

MozReview-Commit-ID: Al2xsYEo3p0

--HG--
extra : rebase_source : 68d01b50ff1f07b68ddc0eeb7280ac412ac92932
2017-06-02 12:45:01 -07:00
Bob Owen
22ff7c4117 Bug 1337331 Part 7: Re-apply - Allow a special all paths rule in the Windows process sandbox when using semantics FILES_ALLOW_READONLY. r=jimm
This also changes the read only related status checks in filesystem_interception.cc to include STATUS_NETWORK_OPEN_RESTRICTION (0xC0000201), which gets returned in some cases and fails because we never ask the broker.

Carrying r=jimm from original changeset:
https://hg.mozilla.org/mozilla-central/rev/1755a454e2de

MozReview-Commit-ID: 4tfygPiKG9Z
2017-03-28 08:36:16 +01:00
Bob Owen
6a5727b408 Bug 1337331 Part 6: Re-apply - Change USER_NON_ADMIN access token level from whitelist to blacklist containing Admin SIDs. r=jimm
Carrying r=jimm from original changeset:
https://hg.mozilla.org/mozilla-central/rev/0e6bf137521e

MozReview-Commit-ID: ExTtkUIPXH8
2017-03-29 14:23:17 +01:00
Bob Owen
927986bc20 Bug 1337331 Part 5: Re-apply - Add KEY_WOW64_64Key and KEY_WOW64_32KEY to the Chromium sandbox allowed registry read flags. r=aklotz
Carrying r=aklotz from previous changset:
https://hg.mozilla.org/mozilla-central/rev/d24db55deb85
2016-12-22 11:11:07 +00:00
Bob Owen
00ab6f4bb3 Bug 1337331 Part 4: Re-apply - Change to allow network drives in sandbox rules with non-file device fix. r=aklotz
Carrying r=aklotz from previous changeset:
https://hg.mozilla.org/mozilla-central/rev/c70d06fa5302
2016-02-01 08:59:00 +00:00
Gian-Carlo Pascutto
028f459d39 Bug 1337331 Part 3: Re-apply - Update chromium's list of linux-x86-32 syscalls. r=jld
Carrying r=jld from previous changset:
https://hg.mozilla.org/mozilla-central/rev/e834e810a3fa

MozReview-Commit-ID: KnrK8HisHiX
2016-06-08 20:36:04 +02:00
Bob Owen
1492af2edd Bug 1337331 Part 2: Re-apply - Logging changes to the Chromium interception code. r=tabraldes
Carrying r=tabraldes from previous changset:
https://hg.mozilla.org/mozilla-central/rev/a05726163a79
2014-11-29 17:12:18 +00:00
Bob Owen
94bf554716 Bug 1337331 Part 1: Update security/sandbox/chromium/ to commit b169b9a1cc402573843e8c952af14c4e43487e91. r=jld, r=aklotz, r=jimm
Also inclues follow-up to remove mitigations that require Windows 10 SDK.

MozReview-Commit-ID: HwqM4noIHmy
2017-03-29 14:23:17 +01:00
Bob Owen
0ee38abf35 Bug 1344453 Part 1: Allow a special all paths rule in the Windows process sandbox when using semantics FILES_ALLOW_READONLY. r=jimm
This also changes the read only related status checks in filesystem_interception.cc to include STATUS_NETWORK_OPEN_RESTRICTION (0xC0000201), which gets returned in some cases and fails because we never ask the broker.
2017-03-28 08:36:16 +01:00
Carsten "Tomcat" Book
0a1fc914ce Backed out changeset d9872fdd25f8 (bug 1337331) for causing build problems for others + on request on bob 2017-03-24 11:24:13 +01:00
Carsten "Tomcat" Book
50ef4d1d1b Backed out changeset 226c893c5d62 (bug 1337331) 2017-03-24 11:23:42 +01:00
Carsten "Tomcat" Book
3a931395eb Backed out changeset 438b6307c802 (bug 1337331) 2017-03-24 11:23:40 +01:00
Carsten "Tomcat" Book
8dd606e5ce Backed out changeset c4aa6b85411d (bug 1337331) 2017-03-24 11:23:37 +01:00
Carsten "Tomcat" Book
a69a0cc262 Backed out changeset 5cd2e692ee0c (bug 1337331) 2017-03-24 11:23:35 +01:00
Carsten "Tomcat" Book
ed6b3bc409 Backed out changeset 0dd9bae0b6b1 (bug 1337331) 2017-03-24 11:23:33 +01:00
Bob Owen
b99c6e7ae0 Bug 1337331 Part 6: Re-apply - Change USER_NON_ADMIN access token level from whitelist to blacklist containing Admin SIDs. r=jimm
Carrying r=jimm from original changeset:
https://hg.mozilla.org/mozilla-central/rev/0e6bf137521e

MozReview-Commit-ID: ExTtkUIPXH8
2017-03-23 10:29:05 +00:00
Bob Owen
b2f5aa5c23 Bug 1337331 Part 5: Re-apply - Add KEY_WOW64_64Key and KEY_WOW64_32KEY to the Chromium sandbox allowed registry read flags. r=aklotz
Carrying r=aklotz from previous changset:
https://hg.mozilla.org/mozilla-central/rev/d24db55deb85
2016-12-22 11:11:07 +00:00
Bob Owen
d3f4202804 Bug 1337331 Part 4: Re-apply - Change to allow network drives in sandbox rules with non-file device fix. r=aklotz
Carrying r=aklotz from previous changeset:
https://hg.mozilla.org/mozilla-central/rev/c70d06fa5302
2016-02-01 08:59:00 +00:00
Gian-Carlo Pascutto
3775b02a92 Bug 1337331 Part 3: Re-apply - Update chromium's list of linux-x86-32 syscalls. r=jld
Carrying r=jld from previous changset:
https://hg.mozilla.org/mozilla-central/rev/e834e810a3fa

MozReview-Commit-ID: KnrK8HisHiX
2016-06-08 20:36:04 +02:00
Bob Owen
d0866c1ee4 Bug 1337331 Part 2: Re-apply - Logging changes to the Chromium interception code. r=tabraldes
Carrying r=tabraldes from previous changset:
https://hg.mozilla.org/mozilla-central/rev/a05726163a79
2014-11-29 17:12:18 +00:00
Bob Owen
8995d28500 Bug 1337331 Part 1: Update security/sandbox/chromium/ to commit b169b9a1cc402573843e8c952af14c4e43487e91. r=jld, r=aklotz 2017-03-23 10:29:05 +00:00
Bob Owen
d30aee57bf Bug 1339729: Remove wow_helper from Windows process sandboxing. r=glandium 2017-03-01 10:41:07 +00:00
David Parks
672079f03f Bug 1329328 - Permit sandboxed processes to access Flash temporary files. r=bobowen
Allows the creation/use of temp files when the user has already green-lit
the use of a file for write purposes in that folder.
2017-02-27 14:15:52 -08:00
David Parks
7f64ae96ea Bug 1284897 - Add mechanism to libsandbox_s to track names of files that have been given special sandbox access permissions (PermissionsService). r=bobowen
Hook this into the browser via the XREAppData. This patch contains only the changes to Chromium source code.

--HG--
extra : rebase_source : f1ddd3bdfb52cef0a2dc8bfbae4ba5c78e7fd7eb
2017-01-20 08:27:57 -08:00