fune/security/sandbox
Yannis Juglaret c1aac4f429 Bug 1851889 - Create the broker alive mutex during sandbox initialization. r=bobowen
The sandbox IPC client/server communication protocol relies on a mutex
that clients can use to check if the broker process is still alive; e.g.
when a response takes more than one second to come. This mutex is owned
by a thread of the broker process and will be marked as abandoned when
that thread dies.

Clients assume that the broker alive mutex being abandoned means that
the whole broker process crashed. Therefore it is necessary that the
thread that owns the broker alive mutex lives as long as the whole
broker process, since clients cannot distinguish between the death of
this thread and the death of the whole broker process.

In upstream code, the broker alive mutex gets created during the first
call to SpawnTarget, which means that it is implicitly required that
this call occurs from a thread that lives as long as the broker process
will. Since we call SpawnTarget from the IPC launcher thread, which dies
during XPCOM shutdown, we are breaking this implicit requirement.

Therefore, this patch makes us create the broker alive mutex from the
main thread, during sandbox initialization. This ensures that clients
will not get disturbed by the death of the IPC launcher thread anymore.

Differential Revision: https://phabricator.services.mozilla.com/D197423
2024-01-04 10:34:43 +00:00
..
chromium Bug 1851889 - Create the broker alive mutex during sandbox initialization. r=bobowen 2024-01-04 10:34:43 +00:00
chromium-shim Bug 1851889 - Create the broker alive mutex during sandbox initialization. r=bobowen 2024-01-04 10:34:43 +00:00
common Backed out changeset 30210e0efac1 (bug 1867360) for causing failures at PIPDLUnitTestChild.cpp. CLOSED TREE 2023-12-19 02:28:52 +02:00
linux Bug 1866606 - Support TaggedAnonymousMemory on all Linux r=jld 2023-12-23 03:36:52 +00:00
mac Bug 1851529 - Set clang-format ColumnLimit consistently. r=sylvestre,necko-reviewers,kershaw 2023-09-05 11:23:01 +00:00
test Bug 1859905 - convert .ini manifests to .toml: batch 19 browser_*.ini r=jmaher,webdriver-reviewers,necko-reviewers,extension-reviewers,devtools-reviewers,anti-tracking-reviewers,valentin,robwu,pbz 2023-10-25 21:47:25 +00:00
win Bug 1851889 - Undo temporary diagnostics code for prespawn CIG. r=bobowen 2024-01-04 10:34:43 +00:00
moz.build Bug 1867459 - Replace CPU_ARCH with TARGET_CPU. r=firefox-build-system-reviewers,sergesanspaille 2023-12-08 10:43:59 +00:00