Deploy Enhanced Runtime on Mac without com.apple.security.cs.allow-unsigned-executable-memory
Categories
(Core :: Security: Process Sandboxing, enhancement, P3)
Tracking
()
People
(Reporter: haik, Assigned: haik)
References
(Blocks 1 open bug)
Details
(Keywords: sec-want, Whiteboard: [adv-main126-])
Attachments
(1 file)
| Assignee | ||
Updated•7 years ago
|
| Assignee | ||
Updated•7 years ago
|
| Assignee | ||
Updated•5 years ago
|
| Assignee | ||
Updated•5 years ago
|
| Assignee | ||
Comment 1•5 years ago
|
||
The fix for bug 1593072 will allow us to apply different hardened runtime settings to different processes. For example, to only allow com.apple.security.cs.allow-unsigned-executable-memory for the processes that run JS.
Updated•3 years ago
|
Comment 2•2 years ago
•
|
||
After bug 1474447 we'll no longer need com.apple.security.cs.allow-unsigned-executable-memory for the JS JITs, only for the PoisonIOInterposer.
The JITs will rely on com.apple.security.cs.allow-jit .
IIRC the IO interposer isn't used on release so we could at least try to improve the situation there.
| Assignee | ||
Comment 3•2 years ago
|
||
(In reply to Jan de Mooij [:jandem] from comment #2)
After bug 1474447 we'll no longer need
com.apple.security.cs.allow-unsigned-executable-memoryfor the JS JITs, only for thePoisonIOInterposer.The JITs will rely on
com.apple.security.cs.allow-jit.IIRC the IO interposer isn't used on release so we could at least try to improve the situation there.
For now, we're using common entitlement files (in security/mac/hardenedruntime/v2/production) for content processes, but channel-specific entitlement files for the parent process executable (Firefox, Dev Edition, and Nightly).
If we need to keep com.apple.security.cs.allow-unsigned-executable-memory for the interposer, we can land a change to use channel-specific entitlement files for content processes and then remove com.apple.security.cs.allow-unsigned-executable-memory from Beta and Release. I can take care of that before or after bug 1474447 lands.
For testing purposes, we can use a project-repo to build Nightly with MOZ_DISABLE_POISON_IO_INTERPOSER=1 and com.apple.security.cs.allow-unsigned-executable-memory removed with official certs so we don't have to wait until Beta.
Comment 4•2 years ago
|
||
(In reply to Haik Aftandilian [:haik] from comment #3)
If we need to keep
com.apple.security.cs.allow-unsigned-executable-memoryfor the interposer, we can land a change to use channel-specific entitlement files for content processes and then removecom.apple.security.cs.allow-unsigned-executable-memoryfrom Beta and Release. I can take care of that before or after bug 1474447 lands.
Looking at callers of IOInterposer::Init() we have:
AutoIOInterposer::Init. ChecksEARLY_BETA_OR_EARLIER.ActivePSin the profiler code (two calls). Checks!defined(RELEASE_OR_BETA).
It's only used on Nightly and early Beta. Bug 1666310 extended (1) to early Beta. If it makes things easier we could consider reverting that, or only on macOS.
| Assignee | ||
Comment 5•2 years ago
|
||
As Jan explained above in comment 4, the PoisonIOIterposer on Mac is enabled on EARLY_BETA_OR_EARLIER at present for x64 only. We have no arm64 implementation of mach_override_ptr which it depends on. The Mac PoisonIOIterposer depends on having the com.apple.security.cs.allow-unsigned-executable-memory entitlement so that it can modify library code using mach_override_ptr.
My plan with this is to drop com.apple.security.cs.allow-unsigned-executable-memory and temporarily disable the PoisonIOInterposer on macOS so that the entitlement change can have test time on Nightly. Once the entitlement change rides the trains, I will add back the entitlement for Nightly only and re-enable the PoisonIOInterposer for Nightly only.
| Assignee | ||
Comment 6•2 years ago
|
||
Remove the allow-unsigned-executable-memory entitlement and temporarily disable PoisonIOInterposer on x64 macOS.
On Mac, the PoinsonIOInterposer is already limited to x64 and only enabled on Nightly and early Beta. Disable it for now to be re-enabled on Nightly-only after dynamic memory disablement ships and is also re-enabled on Nightly-only. Observability of IO on x64 macOS will be impacted until PoinsonIOInterposer is re-enabled.
Updated•2 years ago
|
Comment 8•2 years ago
|
||
| bugherder | ||
Updated•1 year ago
|
Updated•1 year ago
|
Description
•