sandbox GPU process on OpenBSD with pledge()
Categories
(Core :: Security: Process Sandboxing, enhancement, P5)
Tracking
()
Tracking | Status | |
---|---|---|
firefox72 | --- | fixed |
People
(Reporter: jcs, Assigned: jcs)
References
Details
Attachments
(2 files, 6 obsolete files)
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
patch
|
Details | Diff | Splinter Review |
Add a security.sandbox.pledge.gpu
preference that is passed to the GPU process to allow it to call pledge()
on OpenBSD for kernel-enforced sandboxing.
Since the user profile preferences are not available in the GPU process, the GPUProcessManager passes them as a command line argument (-GPUpledge
).
Updated•5 years ago
|
Comment 2•5 years ago
|
||
Comment 3•5 years ago
|
||
From my testing, none of the preferences in the profile were available at the time that code runs (fetching it just returns an empty string). I think it was only loading the static preferences from modules/libpref/init/StaticPrefList.h
by that time, not any in the user's profile. If I'm mistaken, please let me know how to load them and I can move the sandbox call back to after the SharedPreferenceDeserializer
runs.
Updated•5 years ago
|
Ok I figured it out the problem. The sandboxing needed to be done in GPUParent::Init
(which is confusingly called from the GPU child, not the parent, in GPUProcessImpl::Init
) after NS_InitMinimalXPCOM()
is called. This way the preferences are loaded and I can access the GPU pledge string.
I'll update the patch once I figure out some things in #1580271.
3rd try at pledge patch for GPU process, now able to read pledge string from preferences
Updated•5 years ago
|
Comment 7•5 years ago
|
||
NULL -> nullptr
Comment 9•5 years ago
|
||
Assignee | ||
Comment 10•5 years ago
|
||
A new revision, now rebased on top of #1584839
Comment 11•5 years ago
|
||
gcp, at that point, what's your opinion ? Otherwise i could upload two separate hg patches up for review (not via phabricator though, im not up to this)
Seems good? Patch is minimally invasive anyway. I can deal with Phabricator for you.
Assignee | ||
Comment 12•5 years ago
|
||
New patch against Firefox 70
Comment 13•5 years ago
|
||
technically this depends on bug #1584839 so that pledge config is moved to files first
Comment 14•5 years ago
|
||
jcs, why are you using pledgeFile.Append("pledge.gpu");
instead of OpenBSDFindPledgeFilePath
like other process types ? i know this is moot with work from bug #1580271, just curious
Comment 15•5 years ago
|
||
Depends on D51385
Assignee | ||
Comment 16•5 years ago
|
||
Just a mixup trying to juggle all these different revisions.
Assignee | ||
Comment 17•5 years ago
|
||
Comment 18•5 years ago
|
||
Comment 19•5 years ago
|
||
bugherder |
Description
•