by tptacek · 11y ago · 0 comments
Firefox's multi-process model is apparently called Electrolysis. Electrolysis apparently breaks XUL extensions.
If that's the short term cost of getting Firefox to the same level of security that Chrome is at, it seems more than worth it.
If this were an encrypted messaging application like TextSecure making an extension-breaking announcement for security, we'd have no trouble understanding the stakes. What some people seem to have a hard time accepting is that their browser is their most important encrypted messaging application.
This is wrong. It absolutely does not break XUL extensions per-se. Add-ons will require some (moderate for most add-ons) changes when accessing out-of-process web content. A lot of add-ons may not even require changes at all, because they either do not access web content directly in the first place, or the Cross-Process-Wrappers and shims mozilla already implemented will be enough (changes might be still wise to get away from a blocking wrapper-API to the async frame script API, but that matters only for perceived performance of the browser, not for security)
DownThemAll! for example does already support e10s in the Nightly builds since quite some time, NoScript supported e10s in the past, Greasemonkey spend 9 months to add e10s support (Anthony tells in a comment to the original blog post). GM is admittedly an add-on that required a lot of changes to make it work, but it does work now apparently.
https://developer.mozilla.org/en-US/Add-ons/Working_with_mul...
I can however interpret what Mozilla says is the reasoning behind breaking XUL extensions, which is:
XUL extensions, among other things, get in the way of getting Electrolysis working.
That's linked from this blog post.
If things have to break in the short term for Mozilla to modernize Firefox's runtime hardening, well, that breakage seems worth it. Just based on the knowledge of what security flaws in Firefox get used for in the real world.
--- (few min later)
As an aside: if this is the definition of "XUL extensions can be made to work with e10s":
The lack of an synchronous API in the chrome side is intentional: because the chrome process runs the Firefox UI, any responsiveness problems affect the whole browser. By making the chrome process block on the content process, CPOWs break this principle and allow an unresponsive content process to make the whole browser unresponsive.
... I can kind of see where they're coming from, even w/o considering security.
The main new change being announced recently (electrolysis and extension signing have been known about for a while now) is the deprecation of XUL in the browser in general and for add-ons in particular and the adoption of a new extension API's that are more limited in functionality (WebExtensions and whatever else they decide to do to allow more functionality than is available in Chrome). There are security implications to these changes but multi-process Firefox is not the main driver. Mozilla is giving up on XUL in favor of HTML and using this as a pretext to limit the functionality of add-ons (which many Firefox developers have wanted to do for a long time for security and stability reasons).
> Reaching into content windows is forbidden [modulo CPOWs] in multiprocess Firefox. That alone is going to break tons of addons. This necessitates a redesign. Since a major redesign is necessary anyway, it makes sense to future-proof the architecture so that addons will work in perpetuity. Ultimately, this ends up being friendlier to addon developers, since addons will break once instead of again and again as the architecture evolves.
>Reaching into content windows is forbidden [modulo CPOWs] in multiprocess Firefox.
It is not forbidden, it is just different, using frame scripts or CPOWs.
>That alone is going to break tons of addons.
It will break a ton of add-ons, it will not break a ton of other add-ons. And also the "breakage" varies and would be a in the range of learning a bit about frame scripts and then fixing up a couple of tens to hundreds lines of code, as opposed to porting your entire add-on to an entirely new WebExtensions-API, which essentially would require a rewrite, if that is even possible at all without losing too much functionality.
>This necessitates a redesign.
It does not necessitate a redesign of the Firefox extension API if that's what you mean here.
>Since a major redesign is necessary anyway, it makes sense to future-proof the architecture so that addons will work in perpetuity.
Just like Add-on SDK add-ons will work in perpetuity... Oh wait, they never did. The WebExtensions API will introduce breaking changes sooner or later if you want to keep it sane and secure, as any API does, because no API is designed perfectly with perfect future vision.
It will probably break far less often than the "open API", and that is a good thing. I'm not opposed at all to a nice, new, shiny, stable WebExtensions API for those users that are not affected by it's limitations. Actually, I hoped that Jetpack/the Add-on SDK would become such an API back when...
>Ultimately, this ends up being friendlier to addon developers, since addons will break once instead of again and again as the architecture evolves.
It is not friendly to intensionally break thousands of existing code bases to the point where you will need to almost completely redesign and rewrite your code, wiping out a ton of add-ons in the process because the new API is either too limited to port the code or because the author simply does not have the resources available to rewrite a ton of code.
And the post makes it clear that this is a long-term decision, not motivated by any one change but by the sum of all of them. The removal of the traditional status bar in Firefox 4 broke a bunch of addons. Australis had add-on compatibility implications. Electrolysis has massive add-on compatibility hazards. In the future, HTML-based UI like browser.html would have huge add-on compatibility issues, as would hardened engine components that might not support XUL/XPCOM (because it's essentially impossible to support XPCOM without being Gecko).
Nobody likes breaking addons, believe me. But I think after 10 years it's clear that the current situation needs to change, or we'll be having this conversation 2 years from now all over again, and then 2 years after that, and so on as long as Firefox is around. With one last round of deprecation we can get to a sustainable future with great addons and minimal breakage.
How are we supposed to believe that an organization that systematically disregarded backwards compatibility in the past is suddenly going to commit to it?
Without the extensions I perhaps see no point to FF. Is secure and dead worth it?
Plus is there evidence of issues around this in the wild? Is it worth the risk of being a possible FF killer?
I use Firefox purely for a large number of quite complex extensions (which have no Chrome equivalent). If these no longer work or ever extension has a similar version in Chrome I guess I'll switch to Chromium.
Then again. Perhaps there will be some kind of long term fork of Firefox before the switch?
Is there evidence of browser RCEs in the wild? Yes.
Is there evidence of browser RCEs caused by extensions?
Up to a few weeks ago I exclusively used Firefox. Installed plugins? Let me think.
AdBlock Plus, but not really, has been deactivated for months now.
Lazarus. Active, but never used in many months.
Nothing more, I think. And I'm a power user, not some grandmother who uses webmail once a month.
Firefox has lots of reasons to be used, even without plugins.
Due to the ongoing nature of threats and exploits users also cannot opt for not upgrading, like they could for, say, a text editor, a painting program, etc. they are more or less implicitly forced to keep up with the releases, which means they are at the mercy of the browser developer's decisions a lot more than other software users.
It is understandable from a development perspective that there is a tying of functionality and security upgrades, on the other hand it is not the most user friendly paradigm around for those who prefer their customized environments not to have unintended changes.