Security/Sandbox/Process model: Difference between revisions

Jump to navigation Jump to search
m
→‎Web Content Process: update web content processes
m (→‎Parent process: update parent process details)
m (→‎Web Content Process: update web content processes)
Line 7: Line 7:
The Chrome (or "parent", "main" or "master) process - is named for where the browser’s “chrome” or UI is run - is the trusted process which controls interaction with the underlying operating system. The parent process is not sandboxed and has regular access to operating system in order to access files, devices and network resources as part of regular browser use. As such, this process should only ever run trusted code - all untrusted web content should be processed in a child process. The parent acts as a broker for privileged resource requests from the various child processes, mediating access to os resources - the checks which the parent applies prior to granting access to a resource are a critical part of the sandbox model (otherwise the child could ask the parent for a sensitive resource and bypass any sandbox restrictions).
The Chrome (or "parent", "main" or "master) process - is named for where the browser’s “chrome” or UI is run - is the trusted process which controls interaction with the underlying operating system. The parent process is not sandboxed and has regular access to operating system in order to access files, devices and network resources as part of regular browser use. As such, this process should only ever run trusted code - all untrusted web content should be processed in a child process. The parent acts as a broker for privileged resource requests from the various child processes, mediating access to os resources - the checks which the parent applies prior to granting access to a resource are a critical part of the sandbox model (otherwise the child could ask the parent for a sensitive resource and bypass any sandbox restrictions).


=== Web Content Process ===
=== Web Content Processes ===
Firefox uses one content process to render all browser tabs. This web content process is responsible for parsing and executing all the web content currently loaded in the browser tabs that are open. As well as web pages, content processes contain privileged code responsible for the implementation of DOM APIs, and code which connects back up to parent to load resources.  
Firefox uses multiple content processes to render the web content loaded in the browser's tabs. Web Content processes are responsible for parsing and executing all the web content. As well as web pages, content processes contain privileged code responsible for the implementation of DOM APIs, and code which connects back up to parent to load resources.  
Content process are sandboxed, and prevented from direct resource access, with the goal being that they only have the ability to execute web content. The level of sandbox restrictions varies per platform, and is an ongoing project. But in general goal of restrictions are:
 
Web Content processes are sandboxed, and prevented from direct OS access, with the goal being that they have the minimal set of privileges required to execute web content. In general goal of restrictions are:
* All file system access is mediated by the Chrome process. In general, no access to the file system is allowed with the following general exceptions:  
* All file system access is mediated by the Chrome process. In general, no access to the file system is allowed with the following general exceptions:  
** read-only access to essential Firefox program files (e.g. JSMs, libs etc)  
** read-only access to essential Firefox program files (e.g. JSMs, libs etc)  
** meditiated access to create temp files  
** meditiated access to create temp files  
** The exact list varies per platform, see [[Sandbox/OS X Rule Set|the annotated rule set]] as an example.  
** The exact list varies per platform, see [[Sandbox/OS X Rule Set|the annotated rule set]] as an example.  
* file:// protocol loads are to be restricted in the Web Content process once the separate [https://bugzilla.mozilla.org/show_bug.cgi?id=1147911 File Content Process] bug is landed
* file:// protocol loads not permitted (see the file:// process below)
* No privileges to load and execute new processes  
* No privileges to load and execute new processes  
* No access to dangerous APIs &  syscalls which could compromise system integrity  
* No access to dangerous APIs &  syscalls which could compromise system integrity  
* Mediated access to system resources  
* Mediated access to system resources


=== GMP process (Widevine, Primetime, OpenH264) ===
=== GMP process (Widevine, Primetime, OpenH264) ===
canmove, Confirmed users
1,220

edits

Navigation menu