blob: 721cdd9c7a82475d3ade0babe55f8413fda82173 [file] [log] [blame] [view]
Charlie Reisd66e0bd2022-06-07 17:24:121# Process Model and Site Isolation
2
3As the early Web matured, web sites evolved from simple documents to active
4programs, changing the web browser's role from a simple document renderer to an
5operating system for programs. Modern browsers like Chromium use multiple
6operating system processes to manage this workload, improving stability,
7security, and performance.
8
9Chromium's **process model** determines how documents, workers, and other web
10content are divided into processes. First, the process model must identify
11which parts of a "program" on the web need to coexist in a single process.
12Somewhat surprisingly, a program on the web is not a single document plus its
13subresources, but rather a group of same (or similar) origin documents that can
14fully access each other's contents. Once these atomic groups are defined, the
15process model can then decide which groups will share a process. These
16decisions can be tuned based on platform, available resources, etc, to achieve
17the right level of isolation for different scenarios.
18
19This document outlines the goals and design of Chromium's process model and the
20various ways it is used today, including its support for Site Isolation.
21
22[TOC]
23
24
25## Goals
26
27At a high level, Chromium aims to use separate processes for different instances
28of web sites when possible. A **web site instance** is a group of documents or
29workers that must share a process with each other to support their needs, such
30as cross-document scripting. (This roughly corresponds to an "[agent
31cluster](https://html.spec.whatwg.org/multipage/webappapis.html#integration-with-the-javascript-agent-cluster-formalism)"
32from the HTML Standard, as described below.)
33
34For stability, putting web site instances in separate processes limits the
35impact of a renderer process crash or hang, allowing other content to continue
36working. For performance, this allows different web site instances to run in
37parallel with better responsiveness, at the cost of some memory overhead for
38each process.
39
40For security, strictly using separate processes for different web sites allows
41significantly stronger defenses against malicious web sites. In addition to
42running web content within a low-privilege
43[sandbox](https://chromium.googlesource.com/chromium/src/+/HEAD/docs/design/sandbox.md)
44that limits an attacker's access to the user's machine, Chromium's
45multi-process architecture can support [Site
46Isolation](https://www.chromium.org/Home/chromium-security/site-isolation),
47where each renderer process is only allowed to access data from a single site.
48Site Isolation involves:
49
50* **Locked Renderer Processes**: A renderer process can be limited to documents
51 and workers from a single web site or origin, even if such documents are in
52 iframes.
53* **Browser-Enforced Restrictions**: The privileged browser process can monitor
54 IPC messages from locked processes to limit their actions or access to site
55 data (e.g., using ChildProcessSecurityPolicy::CanAccessDataForOrigin).
56 This [prevents compromised renderer
57 processes](https://chromium.googlesource.com/chromium/src/+/main/docs/security/compromised-renderers.md)
58 from asking for cross-site data, using permissions granted to other sites,
59 etc.
60* **Network Response Limitations**: Chromium can ensure that locked renderer
61 processes are only allowed to receive sensitive data (e.g., HTML, XML,
62 JSON) from their designated site or origin, while still allowing
63 cross-origin subresource requests (e.g., images, media) as needed for
64 compatibility. This is achieved using [Cross-Origin Read
65 Blocking](https://www.chromium.org/Home/chromium-security/corb-for-developers)
66 (CORB) or [Opaque Response Blocking](https://github.com/annevk/orb) (ORB).
67
68
69## Abstractions and Implementations
70
71Chromium uses several abstractions to track which documents and workers need
72synchronous access to each other, as a constraint for process model decisions.
73
74* **Security Principal** (implemented by
75 [SiteInfo](https://source.chromium.org/chromium/chromium/src/+/main:content/browser/site_info.h;drc=c79153d6f931dbe2ce2c992962512eaca6766623;l=22)):
76 In security terminology, a **principal** is an entity with certain
77 privileges. Chromium associates a security principal with execution
78 contexts (e.g., documents, workers) to track which data their process is
79 allowed to access. This principal is typically a
80 "[site](https://html.spec.whatwg.org/multipage/origin.html#site)" (i.e.,
81 scheme plus eTLD+1, such as `https://example.com`), because web pages can
82 modify their document.domain value to access other same-site documents, and
83 not just same-origin documents. In some cases, though, the principal may be
84 an origin or have a coarser granularity (e.g., `file:`). The SiteInfo class
85 tracks all values that identify a security principal.
86
87* **Principal Instance** (implemented by
88 [SiteInstance](https://source.chromium.org/chromium/chromium/src/+/main:content/public/browser/site_instance.h;drc=858df4ab8b73f2418f51385954760f2154512029;l=32)):
89 A principal instance is the core unit of Chromium's process model. Any two
90 documents with the same principal in the same browsing context group
91 (see below) must live in the same process, because they have synchronous
92 access to each other's content. This access includes cross-document
93 scripting and synchronous communication through shared memory (e.g.,
94 SharedArrayBuffer). If such documents were in different processes, data
95 races or deadlocks would occur if they concurrently accessed objects in
96 their shared DOM or JavaScript heaps.
97
98 This roughly corresponds to the [agent
99 cluster](https://html.spec.whatwg.org/multipage/webappapis.html#integration-with-the-javascript-agent-cluster-formalism)
100 concept in the spec, although they do not match exactly: multiple agent
101 clusters may sometimes share a principal instance (e.g., with `data:` URLs
102 in the same principal instance as their creator), and principals may keep
103 track of more factors than [agent cluster
104 keys](https://html.spec.whatwg.org/multipage/webappapis.html#agent-cluster-key)
105 (e.g., whether the StoragePartition differs).
106
107 Note that the user may visit multiple instances of a given principal in the
108 browser, sometimes in unrelated tabs (i.e., separate browsing context
109 groups). These separate instances do not need synchronous access to each
110 other and can safely run in separate processes.
111
112* **Browsing Context Group** (implemented by
113 [BrowsingInstance](https://source.chromium.org/chromium/chromium/src/+/main:content/browser/browsing_instance.h;drc=df269acf8de952b68b2fbec49365457ff1f6266b;l=34)):
114 A browsing context group is a group of tabs and frames (i.e., containers of
115 documents) that have references to each other (e.g., frames within the same
116 page, popups with window.opener references, etc). Any two documents within
117 a browsing context group may find each other by name, so it is important
118 that any same-principal documents in the group live in the same process. In
119 other words, there is only one principal instance per principal in a given
120 browsing context group. Note that a tab may change its browsing context
121 group on some types of navigations (e.g., due to a
122 Cross-Origin-Opener-Policy header, browser-initiated cross-site
123 navigations, and other reasons).
124
125From an implementation perspective, Chromium keeps track of the SiteInstance of
126each RenderFrameHost, to determine which renderer process to use for the
127RenderFrameHost's documents. SiteInstances are also tracked for workers, such
128as ServiceWorker or SharedWorkerHost.
129
130
131## Modes and Availability
132
133### Full Site Isolation (site-per-process)
134
135_Used on: Desktop platforms (Windows, Mac, Linux, ChromeOS)._
136
137In (one-)site-per-process mode, each process is locked to documents from a
138single site. Sites are defined as scheme plus eTLD+1, since different origins
139within a given site may have synchronous access to each other if they each
140modify their document.domain. This mode provides all sites protection against
141compromised renderers and Spectre-like attacks, without breaking backwards
142compatibility.
143
144This mode can be enabled on Android using
145`chrome://flags/#enable-site-per-process`.
146
147
148### Partial Site Isolation
149
150_Used on: Chrome for Android (2+ GB RAM)._
151
152On platforms like Android with more significant resource constraints, Chromium
153only uses dedicated (locked) processes for some sites, putting the rest in
154unlocked processes that can be used for any web site. (Note that there is a
155threshold of about 2 GB of device RAM required to support any level of Site
156Isolation on Android.)
157
158Locked processes are only allowed to access data from their own site. Unlocked
159processes can generally access data from any site that does not require a
160locked process. Chromium usually creates one unlocked process per browsing
161context group.
162
163Currently, several heuristics are used to isolate the sites that are most likely
164to have user-specific information. As on all platforms, privileged pages like
165WebUI are always isolated. Chromium also isolates sites that users tend to log
166into in general, as well as sites on which a given user has entered a password,
167logged in via an OAuth provider, or encountered a Cross-Origin-Opener-Policy
168(COOP) header.
169
170
171### No Site Isolation
172
173_Used on: Low-memory Chrome for Android (<2 GB RAM), Android WebView, Chrome for
Alex Moshchuk031f7832023-04-04 16:59:07174iOS._
Charlie Reisd66e0bd2022-06-07 17:24:12175
176On some platforms, Site Isolation is not available, due to implementation or
177resource constraints.
178
179* On Android devices with less than 2 GB of RAM, Site Isolation is disabled to
180 avoid requiring multiple renderer processes in a given tab (for out-of-process
181 iframes). Cross-process navigations in the main frame are still possible
182 (e.g., for browser-initiated cross-site navigations with no other pages in the
183 browsing context group, when a new browsing context group may be created).
184* Android WebView does not yet support multiple renderer processes or
185 out-of-process iframes.
186* Chrome for iOS uses WebKit, which does not currently have support for
187 out-of-process iframes or Site Isolation.
Charlie Reisd66e0bd2022-06-07 17:24:12188
189
190### Origin Isolation
191
192_Available on: Desktop platforms, Chrome for Android (2+ GB RAM)._
193
194There are several optional ways to lock processes at an origin granularity
195rather than a site granularity, with various tradeoffs for compatibility
196(e.g., breaking pages that modify document.domain). These are available on
197platforms that support some level of Site Isolation.
198
199* **Built-in**: //content embedders can designate particular origins that
200 require isolation from the rest of their site, using
201 ContentBrowserClient::GetOriginsRequiringDedicatedProcess.
202* **Configurable**: Users and administrators can list particular origins that
203 should be isolated from the rest of their site, using the command line
204 (`--isolate-origins=`...), `chrome://flags#isolate-origins`, or
205 [enterprise policy](https://support.google.com/chrome/a/answer/7581529)
206 ([IsolateOrigins](https://chromeenterprise.google/policies/#IsolateOrigins)
207 or
208 [IsolateOriginsAndroid](https://chromeenterprise.google/policies/#IsolateOriginsAndroid)).
209* **Opt-in**: The [Origin-Agent-Cluster](https://web.dev/origin-agent-cluster)
210 HTTP response header can be used by web developers to hint to the browser
211 that an origin locked process can be used. This is not a security guarantee
212 and may not always be honored (e.g., to keep all same-origin documents
213 consistent within a given browsing context group), though it allows finer
214 grained isolation in the common case. Note that there are plans to enable
215 [Origin-Agent-Cluster by default](https://github.com/mikewest/deprecating-document-domain),
216 effectively disabling changes to document.domain.
217
218
219### CrossOriginIsolated
220
221Certain powerful web platform features now require an opt-in
222[CrossOriginIsolated](https://web.dev/coop-coep/) mode, which ensures that all
223cross-origin content (e.g., documents and workers, as well as subresources like
224media or scripts) consents to being loaded in the same process as an origin
225using these features. This opt-in is required because these powerful features
226(e.g., SharedArrayBuffers) can be used for very precise timing, which can make
227attacks that leak data from the process (e.g., using Spectre or other transient
228execution attacks) more effective. This mode is important because not all
229browsers support out-of-process iframes for cross-origin documents, and not all
230cross-origin subresources can be put in a separate process.
231
232CrossOriginIsolated mode requires the main document to have
233Cross-Origin-Opener-Policy and Cross-Origin-Embedder-Policy headers. These
234headers impose restrictions on all content that may load within the page or
235process (e.g., requiring similar headers on subframes, and CORS, CORP, or a
236credentialless mode for subresources).
237
238
239### Historical Modes
240
241Before Site Isolation was introduced, Chromium initially supported a few other
242process models that affected the number of renderer processes.
243
244* **Process-per-site-instance**: This model was the default when Chromium first
245 launched. It used a new process when navigating to a different site in some
246 scenarios (e.g., via the address bar but not link clicks), as well as when
247 visiting different instances of the same site in different tabs. At the
248 time, cross-site subframes stayed in the same process as their parent
249 frames.
250* **Process-per-site**: This model consolidated all instances of a given site
251 into a single process (per profile), to reduce the process count. It
252 generally led to poor usability when a single process was used for too many
253 tabs. This mode is still used for certain limited cases (e.g., the New Tab
254 Page) to reduce the process count and process creation latency. It is also
255 used for extensions to allow synchronous scripting from a background page.
256 Note that having a single process for a site might not be guaranteed (e.g.,
257 due to multiple profiles, or races).
258* **Process-per-tab**: This model used a separate process for each browsing
259 context group (i.e., possibly multiple related tabs), but did not attempt
260 to switch processes on cross-site navigations. In practice, though, this
261 model still needed to swap processes for privileged pages like `chrome://`
262 URLs.
263* **Single process**: Chromium also allows a single process model which runs all
264 of the browser and renderer code in a single OS process. This is generally
265 not a safe or robust process model, since it prevents the use of the
266 sandbox and cannot survive any crash in renderer process code. It is mainly
267 used for older low-resource Android WebView scenarios, and for debugging or
268 testing.
269
270
271## Visualizations
272
273Chromium provides several ways to view the current state of the process model:
274
275* **Chromium's Task Manager**: This can be found under "More Tools" in the menu,
276 and shows live resource usage for each of Chromium's processes. The Task
277 Manager also shows which documents and workers are grouped together in a
278 given process: only the first row of a given group displays process ID and
279 most statistics, and all rows of a group are highlighted when one is
280 clicked. Note that double clicking any row attempts to switch to the tab it
281 is associated with. In the default sort order (i.e., when clicking the Task
282 column header until the up/down triangle disappears), processes for
283 subframes are listed under the process for their tab when possible,
284 although this may not be possible if subframes from multiple tabs are in a
285 given process.
286* **`chrome://process-internals/#web-contents`**: This is an internal diagnostic
287 page which shows information about the SiteInstances and processes for each
288 open document.
289* **`chrome://discards/graph`**: This is an internal diagnostic page that
290 includes a visualization of how the open documents and workers map to
291 processes. Clicking on any node provides more details.
292
293
294## Process Reuse
295
296For performance, Chromium attempts to strike a balance between using more
297processes to improve parallelism and using fewer processes to conserve memory.
298There are some cases where a new process is always required (e.g., for a
299cross-site page when Site Isolation is enabled), and other cases where
300heuristics can determine whether to create a new process or reuse an old one.
301Generally, process reuse can only happen in suitable cases, such as within a
302given profile or respecting a process lock. Several factors go into this
303decision.
304
305* **Suitability**: Several properties are global to a given renderer process:
306 profile (including Incognito), StoragePartition (which may differ between
307 tabs and Chrome Apps), and crossOriginIsolated status. For example, two
308 documents from different profiles or StoragePartitions can never share the
309 same renderer process. The ProcessLock (described below) also restricts
310 which documents are allowed in a process.
311* **Soft Process Limit**: On desktop platforms, Chromium sets a "soft" process
312 limit based on the memory available on a given client. While this can be
313 exceeded (e.g., if Site Isolation is enabled and the user has more open
314 sites than the limit), Chromium makes an attempt to start randomly reusing
315 same-site processes when over this limit. For example, if the limit is 100
316 processes and the user has 50 open tabs to `example.com` and 50 open tabs to
317 example.org, then a new `example.com` tab will share a process with a random
318 existing `example.com` tab, while a chromium.org tab will create a 101st
319 process. Note that Chromium on Android does not set this soft process
320 limit, and instead relies on the OS to discard processes.
321* **Aggressive Reuse**: For some cases (including on Android), Chromium will
322 aggressively look for existing same-site processes to reuse even before
Adithya Srinivasanc8e3d592022-07-15 13:27:28323 reaching the process limit. Out-of-process iframes (OOPIFs) and [fenced
324 frames](https://developer.chrome.com/en/docs/privacy-sandbox/fenced-frame/)
325 use this approach, such that an `example.com` iframe in a cross-site page
326 will be placed in an existing `example.com` process (in any browsing context
327 group), even if the process limit has not been reached. This keeps the
328 process count lower, based on the assumption that most iframes/fenced frames
329 are less resource demanding than top-level documents. Similarly,
330 ServiceWorkers are generally placed in the same process as a document that
331 is likely to rely on them.
Charlie Reisd66e0bd2022-06-07 17:24:12332* **Extensions**: Chromium ensures that extensions do not share a process with
333 each other or with web pages, but also that a large number of extensions
334 will not consume the entire soft process limit, forcing same-site web pages
335 into too few processes. Chromium only allows extensions to consume [one
336 third](https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/extensions/chrome_content_browser_client_extensions_part.cc;drc=8d6a246c9be4f6b731dc7f6e680b7d5e13a512b5;l=454-458)
337 of the process limit before disregarding further extension processes from
338 the process limit computation.
339* **Process-per-site**: As noted above, pages like the New Tab Page (NTP) and
340 extensions use a model where all instances of the page are placed in the
341 same process.
342
343
344## Process Locks
345
346Chromium assigns a
347[ProcessLock](https://source.chromium.org/chromium/chromium/src/+/main:content/browser/process_lock.h;drc=47457a6923c0527261d0503998cbeb7de9bab489;l=19)
348to some or all RenderProcessHosts, to restrict which sites are allowed to load
349in the process and which data the process has access to. A RenderProcessHost is
350an object in the browser process that represents a given renderer process,
351though it can be reused if that renderer process crashes and is restarted. Some
352ProcessLock cases are used on all platforms (e.g., `chrome://` URLs are never
353allowed to share a process with other sites), while other cases may depend on
354the mode (e.g., Full Site Isolation requires all processes to be locked, once
355content has been loaded in the process).
356
357ProcessLocks may have varying granularity, such as a single site
358(e.g., `https://example.com`), a single origin
359(e.g., `https://accounts.example.com`), an entire scheme (e.g., `file://`), or
360a special "allow-any-site" value for processes allowed to host multiple sites
361(which may have other restrictions, such as whether they are
362crossOriginIsolated). RenderProcessHosts begin with an "invalid" or unlocked
363ProcessLock before one is assigned.
364
365ProcessLocks are always assigned before any content is loaded in a renderer
366process, either at the start of a navigation or at OnResponseStarted time, just
367before a navigation commits. Note that a process may initially receive
368an "allow-any-site" lock for some empty document schemes (e.g., `about:blank`),
369which may later be refined to a site-specific lock when the first actual
370content commits. Once a site-specific lock is assigned, it remains constant for
371the lifetime of the RenderProcessHost, even if the renderer process itself
372exits and is recreated.
373
374Note that content may be allowed in a locked process based on its origin
375(e.g., an `about:blank` page with an inherited `https://example.com` origin is
376allowed in a process locked to `https://example.com`). Also, some opaque origin
377cases are allowed into a locked process as well, such as `data:` URLs created
378within that process, or same-site sandboxed iframes.
379
380
381## Special Cases
382
383There are many special cases to consider in Chromium's process model, which may
384affect invariants or how features are designed.
385
386* **WebUI**: Pages like `chrome://settings` are considered part of Chromium and
387 are highly privileged, usually hosted in the `chrome://` scheme. They are
388 strictly isolated from non-WebUI pages as well as other types of WebUI
389 pages (based on "site"), on all platforms. They are also generally not
390 allowed to load content from the network (apart from a shrinking
391 [list](https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc;drc=3344b61f7c7f06cf96069751c3bd64d8ec3e3428;l=1405)
392 of allowlisted pages), unless it is from a separate unprivileged
393 `chrome-untrusted://` document. Additionally, normal web pages are not
394 allowed to navigate to WebUI pages, which makes privilege escalation
395 attacks more difficult.
396* **New Tab Page**: On desktop platforms, the default "local" NTP is a WebUI
397 page using process-per-site mode, which loads content from the network via
398 `chrome-untrusted://` iframes. Third party NTPs are also possible, which
399 load a "remote" non-WebUI web page with limited privileges. On Android, the
400 NTP is instead a native Android surface with no privileged renderer
401 process. Chrome on Android creates an unused renderer process in the
402 background while the NTP surface is visible, so that the next page can use
403 it.
404* **Extensions**: On desktop platforms, extension documents and workers are
405 semi-privileged and run in dedicated renderer processes. In contrast,
406 extension content scripts run within the same unprivileged web renderer
407 process as the pages they modify, and thus Chrome Extensions need to
408 [treat content scripts as less
409 trustworthy](https://groups.google.com/a/chromium.org/g/chromium-extensions/c/0ei-UCHNm34/m/lDaXwQhzBAAJ).
410 The browser process makes an effort to enforce that renderer processes have
411 access to any extension APIs or capabilities that they attempt to use.
412* **Hosted Apps**: A hosted app is a deprecated type of extension which allows a
413 normal web site to have a special type of renderer process. For example, a
414 hosted app for `https://example.com/app/` will have an "effective URL" that
415 looks like a `chrome-extension://` URL, causing it to be treated
416 differently in the process model. This support may eventually be removed.
417* **Chrome Web Store**: The [Chrome Web
418 Store](https://chrome.google.com/webstore) is a rare example of a privileged
419 web page, to which Chrome grants special APIs for installing extensions.
420 This implementation currently relies on hosted apps.
421* **GuestView**: The Chrome Apps `<webview>` tag and similar cases like
422 MimeHandlerView and ExtensionOptionsGuest embed one WebContents within
Alex Moshchuk031f7832023-04-04 16:59:07423 another. All of these cases use strict site isolation for content they
424 embed. Note that Chrome Apps allow `<webview>` tags to load normal web pages
425 and the app's own `data:` or `chrome-extension://` URLs, but not URLs from
426 other extensions or apps.
Charlie Reisd66e0bd2022-06-07 17:24:12427* **Sandboxed iframes**: Documents with the sandbox attribute and without
428 `allow-same-origin` (either iframes or popups) may be same-site with their
429 parent or opener but use an opaque origin. Chromium currently keeps these
430 documents in the same process as their parent or opener, but this may
431 change in bug [510122](https://crbug.com/510122).
432* **`data:` URLs**: Chromium generally keeps documents with `data:` URLs in the
433 same process as the site that created them, since that site has control
434 over their content. The exception is when restoring a previous session, in
435 which case each document with a `data:` URL ends up in its own process.
436* **File URLs**: Chromium currently treats all `file://` URLs as part of the
437 same site. Normal web pages are not allowed to load `file://` URLs, and
438 renderer processes are only granted access to particular `file://` URLs via
439 file chooser dialogs (e.g., for uploads). These URLs may be further isolated
440 from each other in bug [780770](https://crbug.com/780770).
441* **Error Pages**: Chromium uses a special type of process for error pages
442 provided by the browser (as opposed to error pages provided by a web site,
443 like a 404 page), using process-per-site mode to keep all such pages in the
444 same process. Currently this only applies to error pages in a main frame.
445* **Spare Process**: Chromium often creates a spare RenderProcessHost with a
446 live but unlocked renderer process, which is used the next time a renderer
447 process is needed. This avoids the need to wait for a new process to
448 start.
449* **Android WebView**: While Android WebView uses much of the same code as
450 Chromium, it currently only supports a single renderer process in most
451 cases.
452
453
454## Further Reading
455
456Several academic papers have covered topics about Chromium's process model.
457
458[**Security Architecture of the Chromium
Eric Lawrence6d323012022-06-07 18:53:56459Browser**](https://crypto.stanford.edu/websec/chromium/)
Charlie Reisd66e0bd2022-06-07 17:24:12460
461Adam Barth, Collin Jackson, Charles Reis, and The Google Chrome Team. Stanford
462Technical Report, September 2008.
463
464_Abstract:_
465
466Most current web browsers employ a monolithic architecture that combines "the
467user" and "the web" into a single protection domain. An attacker who exploits
468an arbitrary code execution vulnerability in such a browser can steal sensitive
469files or install malware. In this paper, we present the security architecture
470of Chromium, the open-source browser upon which Google Chrome is built.
471Chromium has two modules in separate protection domains: a browser kernel,
472which interacts with the operating system, and a rendering engine, which runs
473with restricted privileges in a sandbox. This architecture helps mitigate
474high-severity attacks without sacrificing compatibility with existing web
475sites. We define a threat model for browser exploits and evaluate how the
476architecture would have mitigated past vulnerabilities.
477
478[**Isolating Web Programs in Modern Browser
479Architectures**](https://research.google.com/pubs/archive/34924.pdf)
480
481Charles Reis, Steven D. Gribble (both authors at UW + Google). Eurosys,
482April 2009.
483
484_Abstract:_
485
486Many of today's web sites contain substantial amounts of client-side code, and
487consequently, they act more like programs than simple documents. This creates
488robustness and performance challenges for web browsers. To give users a robust
489and responsive platform, the browser must identify program boundaries and
490provide isolation between them.
491
492We provide three contributions in this paper. First, we present abstractions of
493web programs and program instances, and we show that these abstractions clarify
494how browser components interact and how appropriate program boundaries can be
495identified. Second, we identify backwards compatibility tradeoffs that
496constrain how web content can be divided into programs without disrupting
497existing web sites. Third, we present a multi-process browser architecture that
498isolates these web program instances from each other, improving fault
499tolerance, resource management, and performance. We discuss how this
500architecture is implemented in Google Chrome, and we provide a quantitative
501performance evaluation examining its benefits and costs.
502
503[**Site Isolation: Process Separation for Web Sites within the
504Browser**](https://www.usenix.org/conference/usenixsecurity19/presentation/reis)
505
506Charles Reis, Alexander Moshchuk, and Nasko Oskov, Google. Usenix Security,
507August 2019.
508
509_Abstract:_
510
511Current production web browsers are multi-process but place different web sites
512in the same renderer process, which is not sufficient to mitigate threats
513present on the web today. With the prevalence of private user data stored on
514web sites, the risk posed by compromised renderer processes, and the advent of
515transient execution attacks like Spectre and Meltdown that can leak data via
516microarchitectural state, it is no longer safe to render documents from
517different web sites in the same process. In this paper, we describe our
518successful deployment of the Site Isolation architecture to all desktop users
519of Google Chrome as a mitigation for process-wide attacks. Site Isolation locks
520each renderer process to documents from a single site and filters certain
521cross-site data from each process. We overcame performance and compatibility
522challenges to adapt a production browser to this new architecture. We find that
523this architecture offers the best path to protection against compromised
524renderer processes and same-process transient execution attacks, despite
525current limitations. Our performance results indicate it is practical to deploy
526this level of isolation while sufficiently preserving compatibility with
527existing web content. Finally, we discuss future directions and how the current
528limitations of Site Isolation might be addressed.