13 ms·
Ask HN: Firefox vs. Chrome security
I'm seeing a lot of hype surrounding Mozilla's recent release of Firefox Quantum - which promises massive improvements, mainly speed.
Looking past the speed aspect, where does FF stand against Chrome? Does Rust offer much better security? AFAIK Chrome is gold standard in sandboxing...does this still hold true?
- mintplant 9y ago> AFAIK Chrome is gold standard in sandboxing...does this still hold true? Firefox offers similar sandboxing; see https://wiki.mozilla.org/Security/Sandbox https://wiki.mozilla.org/Security/Sandbox Firefox's JavaScript engine also implements more in-depth protections than V8, such as W^X in the JIT and compartments+wrappers to provide revokable access control and separation between code from different origins. There's a lot more to security than ensuring code execution can't break out of the browser.
- nwah1 9y agoOne of the exciting new features is the beginnings of a formally verified cryptography stack. https://blog.mozilla.org/security/2017/09/13/verified-cryptography-firefox-57/ https://blog.mozilla.org/security/2017/09/13/verified-crypto...
- beaconfield 9y agoFrom what I understand about Rust, it does offer some native security improvements.
- nwah1 9y agoApparently about a third of browser security vulnerabilities can be traced to memory safety issues. So, yes.
- icen 9y agoBut how many of them come from the rendering engine?
- bkor 9y agoThey're slowing replacing more and more code with Rust. So eventually Rust will have a much bigger impact.
- rammy1234 9y agoRust helps in to avoid segFaults which helps in avoid buffer overflows and stack overflows. most of security attacks are due to these and can prevent them better. there is no way a developer can write a code in Rust that causes segfaults ( atleast language promises that ). recent blog post https://blog.rust-lang.org/2017/11/14/Fearless-Concurrency-In-Firefox-Quantum.html https://blog.rust-lang.org/2017/11/14/Fearless-Concurrency-I...
- kbenson 9y ago> there is no way a developer can write a code in Rust that causes segfaults ( atleast language promises that ). Well, as long as you avoid unsafe blocks (which turn off a few safety features in a specific scope so you can do complex or performance critical things in that scope) you're supposed to be safe, but to my knowledge it's not formally proven. In practice it seems to be working quite well though.
- gsnedders 9y ago> there is no way a developer can write a code in Rust that causes segfaults ( atleast language promises that ). Well, you can very easily: write bad code in unsafe blocks. That said, your badness is contained within unsafe blocks, so hopefully you have much less code to closely review.
- rammy1234 9y agoright, it is well known to the developers what to look for when we see something wrong. it doesnt crash randomly, it cries out loud when it fails so we know what is happening and manage it better.
- greenhouse_gas 9y ago
- prohor 9y agoThe release is also improving sandboxing for Linux: https://www.bleepingcomputer.com/news/security/firefox-57-brings-better-sandboxing-on-linux/ https://www.bleepingcomputer.com/news/security/firefox-57-br... Sandboxing for Windows was introduced in version 54.
- AdmiralAsshat 9y agoFirefox has been a low-priority target for a couple years due to its waning user-base. In fact, Firefox wasn't even at Pwn2Own 2016 because hackers didn't think it was worth their time[0]. Hopefully with Quantum and a resurge in popularity, it'll become a target of white-hat hackers again. [0] http://www.eweek.com/security/pwn2own-hacking-contest-returns-as-joint-hpe-trend-micro-effort http://www.eweek.com/security/pwn2own-hacking-contest-return...
- styfle 9y agoAre there historical records for number of "critical" vulnerabilities found in browsers? It would be interesting to compare the number for different browsers. Update Maybe this: http://www.cvedetails.com/product/15031/Google-Chrome.html?vendor_id=1224 http://www.cvedetails.com/product/15031/Google-Chrome.html?v... http://www.cvedetails.com/product/9900/Microsoft-Internet-Explorer.html?vendor_id=26 http://www.cvedetails.com/product/9900/Microsoft-Internet-Ex...
- mccr8 9y agoComparing the number of CVEs is not a good way to compare how vulnerable different browsers are. For instance, I believe that Firefox and maybe Chrome bucket together multiple internally reported vulnerabilities into a single CVE.
- lawnchair_larry 9y agoDon't do this, it's an anti-metric. Unless you think Opera and Konqueror are the most secure browsers.
- therealmarv 9y agoI heard a different story. Firefox was not at the contest because it was not in the same league as the others browsers (and not in a good way). See the last sentence of your link "We wanted to focus on the browsers that have made serious security improvements in the last year"
- 9y ago
- 3ds 9y agoMy understanding is, that Firefox Quantum is not faster due to any additional rust parts, but because the team focused on performance optimization across the entire codebase. The only big rust component was introduced a couple of releases ago: Stylo. Once Webrender is in Firefox, a serious chunk of Firefox will be written in Rust.
- mintplant 9y agoThis is incorrect, Stylo is new in 57 and part of the speed boost of Quantum.
- rkangel 9y agoMy understanding was the Stylo is released to the production channel today, and it is a major part of the performance boost. "Quantum" as a term covers a large number of areas, this blog post covers it well: https://hacks.mozilla.org/2017/11/entering-the-quantum-era-how-firefox-got-fast-again-and-where-its-going-to-get-faster/ https://hacks.mozilla.org/2017/11/entering-the-quantum-era-h...
- gsnedders 9y agoStylo is a big perf jump, but so are many of other changes. It isn't solely replacing things with Rust that has made it fast.
- metajack 9y agoStylo is about 10x faster than the old style system on a four core machine, and about 4x faster than Chrome's style system. This feature alone is worth 30% of initial page load time on amazon and youtube. So yes, Quantum is faster as a direct result both of Rust code, and of Rust's memory-safety-makes-parallelism-practical features. That is not the only source of performance improvement in Quantum though. Also, Quantum isn't yet getting the full benefits possible from this code for a few reasons. Firefox 57 uses Stylo for content, but not yet for chrome, which will be coming in a later release. In Servo, CSS is parsed off the main thread, but in Quantum it is not yet (will be done in a future release). Servo pipelines style resolution and frame construction (basically after the top down pass to deal with the style cascade, we go back up the tree bottom up constructing the layout data structures), and Quantum does not yet do this. Lastly, cross-language inlining is missing which would allow inlining FFI calls. Servo doesn't have this issue since all the driver and layout code is also in Rust.
- beaconfield 9y agoFrom Peter Bright at Ars: "And security remains a pressing concern, prompting the use of new techniques to protect against exploitation. Some of the rebuilt portions are even using Mozilla's new Rust programming language, which is designed to offer improved security compared to C++. While today's release represents a major step forward in the browser's performance and reliability, work on Quantum continues. One major weakness of Firefox, relative to Chrome and Edge, is its use of sandboxing and process isolation to limit the impact that security flaws can have. Next year Mozilla will be working to improve these areas. Early next year should also see the rollout of a new GPU-accelerated rendering engine."
- shmerl 9y ago> Early next year should also see the rollout of a new GPU-accelerated rendering engine So what version will get Webrender exactly?
- seba_dos1 9y ago59 AFAIK
- shmerl 9y agoThanks!
- steveklabnik 9y agoThat's a rough guess; the 59 cycle just started, but it's still opt-in, not on by default. But we can say for sure it will be at least 59.
- mixedCase 9y agoWhere did you get that info? I'm running Nightly (v59) but it's not enabled by default. Can't find anything on their roadmap either.
- 9y ago
- mtgx 9y agoUntil proven otherwise, I think Chrome remains the most secure browser. From what I've seen, FF57 only uses one content process by default (at least when you upgrade it from FF56), although you can enable up to 7 in settings ( I wish they gave higher numbers, too, like 50, or have a custom field). Also, Rust is still a small portion of the browser. I'm not sure how big of a portion is of the rendering parts, which are usually the ones causing security issues. We'll see how it fares at the next Pwn2Own and perhaps in new papers comparing browsers' security over the coming year. That said, I am excited that Tor will soon use FF59, which should include all of these improvements (but hopefully customized to have improved hardening by default compared to regular Firefox, on all operating systems).
- arghwhat 9y agoFF57 has a relatively small amount of Rust (~160k lines of C++ replaced with ~80k lines of 10x faster Rust). Chrome is "pure" C++, though. More content processes wouldn't do much difference. It doesn't reduce the attack surface (potentially increasing it due to complexity), but only reduce amount of data per process in case you gain read-only access to its memory (which I can't currently think of as being an interesting attack). I would imagine that more content processes is about stability, rather than security. However, splitting larger processes into smaller ones can yield great benefit on the security front. EDIT: FF57 defaults to four content processes.
- _hyn3 9y agoGoogle has (always) gathered information about Chrome -- and Chromium -- users by default, including every keystroke typed into the "omnibox". Not easy to disable, either. This seems to be a recent Firefox policy change: all editions of Firefox is now collecting data, such as telemetry, information gathering, usage data. (URL's? Form data?) This is all opt-out instead of opt-in now, and you're asked only after installation. You have to pro-actively disable it. (Formerly, telemetry gathering was only gathered by default on nightlies and dev tracks; this telemetry does cover usage.. i.e., this seems to include what URL's you're browsing; this could be a security risk for apps like Dropbox and OneDrive.) To be fair, it's easier to opt-out in Firefox than it is in Chrome, and Firefox is also more up-front about it after initial setup/installation; still, given that Firefox held itself out as the privacy-oriented browser, this is a significant change. (Which leads to a new question.. what's the new best privacy browser? probably Brave? or, perhaps, Opera?) EDIT: citation, thanks to cJ0th: https://www.mozilla.org/en-US/privacy/firefox/ https://www.mozilla.org/en-US/privacy/firefox/
- dsschnau 9y agobrave and opera both sit on top of chromium so idk about those
- jamiesonbecker 9y agoWell, they both use webkit or blink for rendering, but I don't know how much of the actual chromium codebase is used. However that shouldn't actually matter, because they both claim to focus on privacy (especially Brave), which means that they've presumably removed or disabled the data tracking code from Chromium... or just changed the API endpoints ;)
- gcp 9y agoFirefox does NOT do any this, as far as I know. What is the source of this FUD? A public discussion was started to get to know how people felt about privacy conserving telemetry collection that would be opt out by default. There was massive negative feedback (duh). The feature did not ship in 57. https://medium.com/georg-fritzsche/data-preference-changes-in-firefox-58-2d5df9c428b5 https://medium.com/georg-fritzsche/data-preference-changes-i... "instead we always collect LESS data on Firefox release."
- robbyking 9y agoI actually noticed some weird and potentially concerning behavior with Firefox Quantum this morning. I had a fair number of tabs open (~28 or so), and I restarted the browser so a change I made would take effect. I have FF set to show my windows and tabs from my previous session on start up, but it instead launched with a single tab showing my home page. Okay, no big deal, I'll just restore my previous session from the History menu. When I clicked on the history menu, though, I didn't see my most recent history, but instead a list of URLs from my bank. I assume this is due to a syncing issue with my Firefox account (I changed my banking password just to be safe), but it's still concerning.
- mintplant 9y agoThat really does sound like a sync/profile issue, especially as it coincided with a failure to restore your previous session. I suspect you encountered some sort of corruption in your profile, and Firefox automatically restored one of the multiple backup copies it keeps to attempt to mitigate data loss. Still, always good to take precautions. What Firefox release channel(s) are you using? Are you running the same version across all of your sync'd devices? And can you share what change you made before restarting the browser?
- hdhzy 9y agoOne interesting extension for desktop Firefox is Containers [0]. This is like per site incognito mode so tracking cookies do not escape between containers. While it's not a strict security thing for me it's one of more interesting aspects of Firefox as a browser. [0]: https://addons.mozilla.org/en-US/firefox/addon/multi-account-containers/ https://addons.mozilla.org/en-US/firefox/addon/multi-account...
- notacissp 9y agoLook for the recent whitepapers by Cure53 and X41 both titled Browser Security Whitepaper. tl;dr Chrome + Edge are more secure. Do not use Internet Exploder