Update //security/sandbox/chromium/ to Chromium's latest stable version
Categories
(Core :: Security: Process Sandboxing, enhancement, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox80 | --- | fixed |
People
(Reporter: toshi, Assigned: toshi)
References
(Blocks 1 open bug)
Details
Attachments
(3 files, 16 obsolete files)
The current target is 81.0.4044.138.
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 1•5 years ago
|
||
This patch updates exising files under //security/sandbox/chromium/base and
//security/sandbox/chromium/build to Chromium 81.0.4044.138:
https://chromium.googlesource.com/chromium/src.git/+/0085b3faa4477bd52f03aeb1ee1097fa54a1bd55
Newly-introduced files will be brought by subsequent patches.
Assignee | ||
Comment 2•5 years ago
|
||
This patch updates exising files under //security/sandbox/chromium/sandbox/win
to Chromium 81.0.4044.138:
https://chromium.googlesource.com/chromium/src.git/+/0085b3faa4477bd52f03aeb1ee1097fa54a1bd55
Newly-introduced files will be brought by subsequent patches.
Depends on D76220
Assignee | ||
Comment 3•5 years ago
|
||
This patch updates exising files under //security/sandbox/chromium/sandbox/linux
to Chromium 81.0.4044.138:
https://chromium.googlesource.com/chromium/src.git/+/0085b3faa4477bd52f03aeb1ee1097fa54a1bd55
Depends on D76222
Assignee | ||
Comment 4•5 years ago
|
||
Why do we need //base/hash/hash.h&cc and //base/third_party/cityhash?
The hash code was moved from //base to //base/hash by
https://source.chromium.org/chromium/chromium/src/+/c13e94667e4ad876254356a57093afdee8a69ea7
We also need CityHash as it was introduced by
https://source.chromium.org/chromium/chromium/src/+/a34848741044c02d8730f9948ef82d4fb11c8a6c
and it is used from //base/win/scoped_handle_verifier.h, added by
https://source.chromium.org/chromium/chromium/src/+/028b47fba8bf0ec17f8dbb234ebf3a9c4d352071
Why do we need //base/third_party/double_conversion?
It replaced //base/third_party/dmg_fp as
https://source.chromium.org/chromium/chromium/src/+/75b27377203ce5aff439ef3387ae82d4054611c3
Why do we need //sandbox/win/src/signed_* files?
It's an essential part to achieve CIG whitelist, delegating NtCreateSection
to the browser process.
Why do we need //base/memory/* files?
It's a new Shared Memory API.
base::SharedMemory and base::SharedMemoryHandle were removed by
https://source.chromium.org/chromium/chromium/src/+/cf96655e1678b212cb696b5e8ed4095cc2fd6052
instead, a new Shared Memory API was introduced by
https://source.chromium.org/chromium/chromium/src/+/cdd8661f3f35d7075020ead0492cd83e18f795e9
We need this because ProcessMitigationsWin32KDispatcher consumes it by
https://source.chromium.org/chromium/chromium/src/+/68e88163e04dc2158df5f76ea4a7fa8293109437
Depends on D76223
Assignee | ||
Comment 5•5 years ago
|
||
Why adding include base/macros.h in //base/feature_list.h?
Now feature_list.h is compiled and DISALLOW_COPY_AND_ASSIGN needs to be available.
Why is //base/observer_list.h empty?
It was added by the following commit, but it's actually unnecessary. Just need a file to compile.
https://source.chromium.org/chromium/chromium/src/+/2538661e0790480b58b14d9c7ac29eb7741ab8d8
What is //base/logging_buildflags.h?
It is a new generated header introduced by the following commit.
https://source.chromium.org/chromium/chromium/src/+/3553b590b10065867cc4d349e1485e5c8478e68a
Why adding BUILDFLAG_INTERNAL_USE_TCMALLOC in //base/allocator/buildflags.h?
It replaced the global flag defined in //build/build_config.h as
https://source.chromium.org/chromium/chromium/src/+/b80b085bfabdbeccf5688a1c0291812c577b854a
We use this switch in //base/debug/profiler.cc.
Depends on D76224
Assignee | ||
Comment 6•5 years ago
|
||
Removing the following patches from with_update no longer needed.
-
update_chromium_linux_x86_syscalls.patch is included in
https://chromium.googlesource.com/chromium/src.git/+/b4f3df4e77ba1f79717d44b5068cb36f7537332f -
ifdef_out_ApplyMitigationsToCurrentThread.patch cannot be used because
we use ApplyMitigationsToCurrentThread since the following commit.
https://chromium.googlesource.com/chromium/src.git/+/4bed2eb502974fe665ff7750a1ba4e45132524ad -
mingw_base_win_get_caller.patch is included in
https://chromium.googlesource.com/chromium/chromium/src/+/d8b73eb8f0321bf37931b69c66fdad82ff7063c5 -
fix_incorrect_int_use_in_Kernel32BaseVersion.patch is fixed by
https://hg.mozilla.org/mozilla-central/rev/dc9d71fb3bac807a37dbfba35d609ac4ffff1980 -
revert_removal_of_AlterEnvironment_on_Windows.patch is altered by adding
environment_internal.h/cc as a different commit. -
mingw_undefine_MemoryBarrier.patch is no longer needed as
base::subtle::MemoryBarrier was removed by
https://chromium.googlesource.com/chromium/chromium/src/+/bdbaaf4e7e0318fca0cadd1407de810a71309625 -
public_siginfo_fields.patch is included in
https://chromium.googlesource.com/chromium/chromium/src/+/6bd491daaf28a8281136931133504c23a18f819f
Depends on D76225
Assignee | ||
Comment 7•5 years ago
|
||
AddTargetPeer() was removed by
https://chromium.googlesource.com/chromium/src.git/+/996b42db5296bd3d11b3d7fde1a4602bbcefed2c
IsActiveTarget() was removed by
https://chromium.googlesource.com/chromium/src.git/+/e615a1152ac6e10f1a91f0629fb8b5ca223ffbdc
This patch re-implements these methods using the new ProcessTracker introduced by
https://chromium.googlesource.com/chromium/src.git/+/3d8382cf9dd44cf9c05e43e42c500f4825e1fed8
Depends on D76226
Assignee | ||
Comment 8•5 years ago
|
||
This patch reverts the commit removing sandbox::TargetServices::BrokerDuplicateHandle
and applies the new IpcTag type.
https://chromium.googlesource.com/chromium/src.git/+/569193665184525ca366e65d0735f5c851106e43
https://chromium.googlesource.com/chromium/src.git/+/c8cff7f9663ce6d1ef35e5c717f43c867c3906eb
Depends on D76227
Assignee | ||
Comment 9•5 years ago
|
||
This patch removes the use of base::ScopedNativeLibrary from
sandbox::ApplyMitigationsToCurrentThread to avoid new dependencies.
Depends on D76228
Assignee | ||
Comment 10•5 years ago
|
||
Undoing the following commit as it brings more dependency but unused in our code.
https://chromium.googlesource.com/chromium/src.git/+/ffe1d0eb42d1d75f2b6a3b4145eff69f235a19ee
Assignee | ||
Comment 11•5 years ago
|
||
Depends on D76233
Assignee | ||
Comment 12•5 years ago
|
||
Need the following commit to compile with Mingw, which has not reached
the stable channel yet.
https://chromium.googlesource.com/chromium/src.git/+/1620fe70c299f1f18b2f2c652d16739f6e3c5f78
Depends on D76235
Assignee | ||
Comment 13•5 years ago
|
||
The following commit caused an Mingw build failure because delayimp.h is included twice,
from pe_image.h and pe_image.cc. This patch removes the second include.
https://chromium.googlesource.com/chromium/src.git/+/5c23d46846111ea16aaf2a9b45355cca5ddbf6d8
Depends on D76236
Assignee | ||
Comment 14•5 years ago
|
||
We still use 10.0.17134.0 SDK while Chromium requires 10.0.18362.0 or higher.
Depends on D76237
Assignee | ||
Comment 15•5 years ago
|
||
This is required by the following change on Chromium.
https://source.chromium.org/chromium/chromium/src/+/212bf951fba5397123903f67c4a5c04652288c09
Depends on D76238
Assignee | ||
Comment 16•5 years ago
|
||
This patch is to temporality bypass Clang's bug.
https://bugs.llvm.org/show_bug.cgi?id=45858.
Depends on D76239
Assignee | ||
Comment 17•5 years ago
|
||
Below is the list of patches needs to be reviewed, and the latest Try job is this. When review is done, I'll merge these into a few patches so that any commit can be compiled.
Outside chromium
- Bug 1639030 - Don't use clang's new pass manager for filesystem_interception.cc. r=dmajor
- Bug 1639030 - Make sure setting MITIGATION_WIN32K_DISABLE before adding SUBSYS_WIN32K_LOCKDOWN. r=bobowen
New with_update patches
- Bug 1639030 - [with_update] Lower SDK version requirement from 19H1 to RS4. r=bobowen
- Bug 1639030 - [with_update] Don't include delayimp.h twice from //base/win/pe_image.cc to compile with Mingw. r=bobowen
- Bug 1639030 - [with_update] Remove Extraneous Backslash Introduced by clang-tidy in ScopedHandle. r=bobowen
- Bug 1639030 - [with_update] Remove unused functions from //base/third_party/double_conversion to compile. r=bobowen
- Bug 1639030 - [with_update] Revert unused base::Token serialization to minimize dependency. r=bobowen
Updated with_update patches
- Bug 1639030 - [with_update] Use GetModuleHandle/GetProcAddress in ApplyMitigationsToCurrentThread. r=bobowen
- Bug 1639030 - [with_update] Reinstate sandbox::TargetServices::BrokerDuplicateHandle. r=bobowen
- Bug 1639030 - [with_update] Reinstate BrokerServicesBase::IsActiveTarget and AddTargetPeer. r=bobowen
Add/Remove files
- Bug 1639030 - Part 6: Update with_update and after_update patches. r=bobowen
- Bug 1639030 - Part 5: Update chromium-shim files. r=bobowen
- Bug 1639030 - Part 4: Add new files and remove unused files from Chromium. r=bobowen
- Bug 1639030 - Part 3: Roll-up of chromium sandbox files under //sandbox/linux. r=jld
- Bug 1639030 - Part 2: Roll-up of chromium sandbox files under //sandbox/win. r=bobowen
- Bug 1639030 - Part 1: Roll-up of chromium sandbox files under //base/ and //build/. r=bobowen
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Assignee | ||
Comment 18•4 years ago
|
||
This commit updates files under security/sandbox/chromium-shim/patches/
to prepare our codebase for Chromium sandbox update. See patch files for
the details of each patch.
This also removes the following patches from with_update no longer needed.
- update_chromium_linux_x86_syscalls.patch is included in
https://chromium.googlesource.com/chromium/src.git/+/b4f3df4e77ba1f79717d44b5068cb36f7537332f - ifdef_out_ApplyMitigationsToCurrentThread.patch cannot be used because
we use ApplyMitigationsToCurrentThread since the following commit.
https://chromium.googlesource.com/chromium/src.git/+/4bed2eb502974fe665ff7750a1ba4e45132524ad - mingw_base_win_get_caller.patch is included in
https://chromium.googlesource.com/chromium/chromium/src/+/d8b73eb8f0321bf37931b69c66fdad82ff7063c5 - fix_incorrect_int_use_in_Kernel32BaseVersion.patch is fixed by
https://hg.mozilla.org/mozilla-central/rev/dc9d71fb3bac807a37dbfba35d609ac4ffff1980 - revert_removal_of_AlterEnvironment_on_Windows.patch is altered by adding
environment_internal.h/cc as a different commit. - mingw_undefine_MemoryBarrier.patch is no longer needed as
base::subtle::MemoryBarrier was removed by
https://chromium.googlesource.com/chromium/chromium/src/+/bdbaaf4e7e0318fca0cadd1407de810a71309625 - public_siginfo_fields.patch is included in
https://chromium.googlesource.com/chromium/chromium/src/+/6bd491daaf28a8281136931133504c23a18f819f
Assignee | ||
Comment 19•4 years ago
|
||
This commit does:
- Sync files under security/sandbox/chromium/ with Chromium 81.0.4044.138
- Update files under security/sandbox/chromium-shim/
- Apply patches under security/sandbox/chromium-shim/patches/with_update/
- Apply a workaround for Clang's bug to compile filesystem_interception.cc
- Add mozilla::AddWin32kLockdownPolicy to apply MITIGATION_WIN32K_DISABLE before SUBSYS_WIN32K_LOCKDOWN
Depends on D79558
Assignee | ||
Comment 20•4 years ago
|
||
This commit applies patches under security/sandbox/chromium-shim/patches/after_update/.
Depends on D79560
Comment 21•4 years ago
|
||
Comment 22•4 years ago
|
||
Backed out 3 changesets (bug 1639030) for sandbox related bustages.
Backout link: https://hg.mozilla.org/integration/autoland/rev/50324c6ce855b56eb4bd4712ff7924023f045d49
Failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=306392581&repo=autoland&lineNumber=18792
[task 2020-06-15T17:36:32.780Z] 17:36:32 INFO - make[4]: Entering directory '/builds/worker/workspace/obj-build/security/sandbox'
[task 2020-06-15T17:36:32.780Z] 17:36:32 INFO - /builds/worker/fetches/sccache/sccache /builds/worker/fetches/clang/bin/clang-cl -Xclang -std=c++17 --target=aarch64-windows-msvc -Fowin_utils.obj -c -guard:cf -DNDEBUG=1 -DTRIMMED=1 -DUNICODE -D_UNICODE -DNS_NO_XPCOM -D_CRT_RAND_S -DCHROMIUM_SANDBOX_BUILD -DSANDBOX_EXPORTS -I/builds/worker/checkouts/gecko/security/sandbox -I/builds/worker/workspace/obj-build/security/sandbox -I/builds/worker/checkouts/gecko/security/sandbox/chromium-shim -I/builds/worker/checkouts/gecko/security/sandbox/chromium -I/builds/worker/checkouts/gecko/nsprpub -I/builds/worker/workspace/obj-build/dist/include -I/builds/worker/workspace/obj-build/dist/include/nspr -I/builds/worker/workspace/obj-build/dist/include/nss -MD -FI /builds/worker/workspace/obj-build/mozilla-config.h -DMOZILLA_CLIENT -Qunused-arguments -Qunused-arguments -fcrash-diagnostics-dir=/builds/worker/artifacts -TP -Zc:sizedDealloc- -D_HAS_EXCEPTIONS=0 -W3 -Gy -Zc:inline -Gw -Wno-inline-new-delete -Wno-invalid-offsetof -Wno-microsoft-enum-value -Wno-microsoft-include -Wno-unknown-pragmas -Wno-ignored-pragmas -Wno-deprecated-declarations -Wno-invalid-noreturn -Wno-inconsistent-missing-override -Wno-implicit-exception-spec-mismatch -Wno-microsoft-exception-spec -Wno-unused-local-typedef -Wno-ignored-attributes -Wno-used-but-marked-unused -D_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING -GR- -Z7 -Xclang -load -Xclang /builds/worker/workspace/obj-build/build/clang-plugin/libclang-plugin.so -Xclang -add-plugin -Xclang moz-check -O2 -Oy- -Werror -Wno-deprecated-declarations -Xclang -MP -Xclang -dependency-file -Xclang .deps/win_utils.obj.pp -Xclang -MT -Xclang win_utils.obj /builds/worker/checkouts/gecko/security/sandbox/chromium/sandbox/win/src/win_utils.cc
[task 2020-06-15T17:36:32.780Z] 17:36:32 INFO - /builds/worker/checkouts/gecko/security/sandbox/chromium/sandbox/win/src/win_utils.cc(562,32): error: static_cast from 'PRTL_USER_PROCESS_PARAMETERS' (aka '_RTL_USER_PROCESS_PARAMETERS *') to 'uint8_t *' (aka 'unsigned char *') is not allowed
[task 2020-06-15T17:36:32.780Z] 17:36:32 INFO - uint8_t* processParameters = static_cast<uint8_t*>(peb.ProcessParameters);
[task 2020-06-15T17:36:32.780Z] 17:36:32 INFO - ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[task 2020-06-15T17:36:32.780Z] 17:36:32 INFO - 1 error generated.
[task 2020-06-15T17:36:32.780Z] 17:36:32 ERROR - make[4]: *** [/builds/worker/checkouts/gecko/config/rules.mk:748: win_utils.obj] Error 1
[task 2020-06-15T17:36:32.780Z] 17:36:32 INFO - make[4]: Leaving directory '/builds/worker/workspace/obj-build/security/sandbox'
[task 2020-06-15T17:36:32.780Z] 17:36:32 ERROR - make[3]: *** [/builds/worker/checkouts/gecko/config/recurse.mk:74: security/sandbox/target-objects] Error 2
[task 2020-06-15T17:36:32.780Z] 17:36:32 INFO - make[3]: *** Waiting for unfinished jobs....
Comment 23•4 years ago
•
|
||
Also seeing these failures starting with the backed out changes:
https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=306394944&repo=autoland&lineNumber=740
https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=306399558&repo=autoland&lineNumber=811
https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=306397735&repo=autoland&lineNumber=823
https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=306397751&repo=autoland&lineNumber=845
Assignee | ||
Comment 24•4 years ago
|
||
Thank you for letting me know. Both issues, build error on Arm64 and crash on ASAN, have been resolved.
Let us hold off landing for a while and target version 80.
Assignee | ||
Comment 25•4 years ago
|
||
We're hitting a new compiler issue on the x64 shippable build, that has nothing to do with the new pass manager.
Assignee | ||
Updated•4 years ago
|
Comment 26•4 years ago
|
||
Comment 27•4 years ago
|
||
Backed out 3 changesets (bug 1639030) for build bustage. CLOSED TREE
Log:
https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=308529448&repo=autoland&lineNumber=28428
Push with failures:
https://treeherder.mozilla.org/#/jobs?repo=autoland&group_state=expanded&selectedTaskRun=JEZxP3iaQpSrSCl3IKQf6w.0&revision=d7bd92ae8de6c75d8a9cce2b8309108ac3bc2e9d
Backout:
https://hg.mozilla.org/integration/autoland/rev/8d47aed2f6cd4939b633ed9c5553817859fb0f32
Assignee | ||
Comment 28•4 years ago
|
||
Needed to update security/sandbox/linux/moz.build.
Comment 29•4 years ago
|
||
Comment 30•4 years ago
|
||
Backed out 3 changesets (bug 1639030) for MDA failures in dom/media/test/test_eme_autoplay.html. CLOSED TREE
Log:
https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=308669171&repo=autoland&lineNumber=3609
Push with failures:
https://treeherder.mozilla.org/#/jobs?repo=autoland&group_state=expanded&revision=e614d160ab92e8ea455f2a38a9925468d7547252
Backout:
https://hg.mozilla.org/integration/autoland/rev/2a8f9251d877f66b46cea42993ec03cf628999d6
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Updated•4 years ago
|
Comment 31•4 years ago
|
||
Comment 32•4 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/8d50ff6a9f05
https://hg.mozilla.org/mozilla-central/rev/0b1d280dee6f
https://hg.mozilla.org/mozilla-central/rev/4f038b3c182d
Comment 33•4 years ago
|
||
It looks like this requires a clobber; at least on my Windows system, I'm seeing a build failure in security/sandbox/chromium/base, apparently because hash.cc moved into a subdirectory. (Maybe other reasons too, but that's where it dies for me.)
It would have been nice to touch the CLOBBER file as part of the landing here.
Assignee | ||
Comment 34•4 years ago
|
||
(In reply to Jonathan Kew (:jfkthame) from comment #33)
It looks like this requires a clobber; at least on my Windows system, I'm seeing a build failure in security/sandbox/chromium/base, apparently because hash.cc moved into a subdirectory. (Maybe other reasons too, but that's where it dies for me.)
It would have been nice to touch the CLOBBER file as part of the landing here.
Right, thank you heads-up. Another solution is to remove all files under $MOZ_OBJDIR/security/sandbox manually. I think that's faster than CLOBBER :).
Comment 35•4 years ago
•
|
||
I'm making this block mach-busted since that's the first place to look for known build failures.
Description
•