6 ms·
Can someone describe what the "architecture that doesn't eat all your RAM" here is? Is it possible that it will inadvertently provide weaker security protection
by schoen 10y ago
Can someone describe what the "architecture that doesn't eat all your RAM" here is? Is it possible that it will inadvertently provide weaker security protections between tabs than the more naive and RAM-intensive architecture?
- 0xfeba 10y agoDuplicated memory and just overhead from running separate processes (Chrome), as opposed to shared memory and less overhead from a single process (IE? Old FF). As for security, no, unless there's some unknown vulnerability now (or that they create), that will be ported over and somehow more effective between (potential) processes. So, I doubt it.
- creshal 10y agoChrome uses separate processes for sandboxing purposes, not just for the fun of it. So yes, protecting against "some unknown vulnerability" is the entire point behind it.
- derefr 10y agoAs a fun fact, separate virtual machines running under a VMWare ESXi hypervisor—which is about as "sandboxed" as you can get—still share memory: the hypervisor hashes the 'cold' pages of its VMs and, when it finds duplicate page content either within or between VMs, it merges the duplicated pages together into single copy-on-write pages. ESXi has never had a security vulnerability due to this optimization, AFAIK. Ref: https://labs.vmware.com/vmtj/memory-overcommitment-in-the-esx-server https://labs.vmware.com/vmtj/memory-overcommitment-in-the-es... (search "page sharing")
- creshal 10y ago> ESXi has never had a security vulnerability due to this optimization, AFAIK. Should be vulnerable to FFS, if I'm not mistaken: http://arstechnica.com/security/2016/08/new-attack-steals-private-crypto-keys-by-corrupting-data-in-computer-memory/ http://arstechnica.com/security/2016/08/new-attack-steals-pr...
- deleted 10y ago[deleted]
- derefr 10y agoTrue! Rowhammer-based attacks are kind of unique, though; I expect they'll be treated as a hardware bug and solved by releasing better hardware, rather than through inventing even more layers of securinoia to keep in mind from now on. It's sort of like when WebGL was first getting going, and the GPUs of the time didn't expect to be fed shaders directly from potentially-malicious web sources. Rather than severely restricting the WebGL API, we got a new generation of GPUs that fail safe.
- creshal 10y ago> I expect they'll be treated as a hardware bug and solved by releasing better hardware When Rowhammer was first announced, people said "it's okay, we have ECC". Then ECC was shown vulnerable. "It's okay, vendors have promised to fix it in DDR4", they said. Now DDR4 is out and vendors have not deployed the fixes systematically[1] and you have to benchmark every single RAM stick to make sure you're not vulnerable. I'd really appreciate software workarounds as long as hardware vendors keep fucking up. [1]: http://www.passmark.com/forum/memtest86/5395-rowhammer-mitigation http://www.passmark.com/forum/memtest86/5395-rowhammer-mitig...
- lloeki 10y ago> Duplicated memory and just overhead from running separate processes fork(2) does COW. With careful design† forking a new process only results in new and modified pages being not shared. † Hard! But single-process threads + security is hard too. http://unix.stackexchange.com/questions/58145/how-does-copy-on-write-in-fork-handle-multiple-fork http://unix.stackexchange.com/questions/58145/how-does-copy-...
- AstralStorm 10y agoOnly on Linux, POSIX does not mandate CoW and Windows does not have a similar API.
- lloeki 10y agoWhile not mandatory, I always sort of assumed BSD and Darwin do the same... Just wanted to point out that memory usage isn't necessarily inherent to multiprocess, but with a sizable portion of users on Windows the point is practically moot anyway.
- formula1 10y agoOne thing that firefox does well is suspend pages you are not using and likely saving the state of the appllication to the disk. Another thing can be for when multiple pages use the same or similar javascript/css/external respurce files, they only need to be loaded once into memory. Another thing canbe that certain javascript globals would only be loaded when the getter asks for them. Something like AudioContext and RTCPeerConnection are not widely used, by changing the name in the global space to a getter that loads the libraries instead of providing them on start may reduce load. There are many things that can be done
- dogma1138 10y agoIf that's that case I much rather my browser eat up more RAM than needlessly write to my SSD. A lot of the improvement in the reliability of consumer grade SSDs is due to OS improvements in how they manage their write operations to the hard drive. Windows is considerably more conservative in how it uses it's page file and what does it write off to the SSD, linux has also made a lot of improvements in how it uses the swap partition if it uses it at all, other things like having to be able to suspend the PC in "hibernation" mode without actually having to write a "hibernation" file to disk by keeping the CPU at pretty much an off state but refreshing the ram also saves a lot of day to day write operations especially on mobile devices. So overall I highly doubt that Firefox went with the suspend to disk route, because if it did it would be a pretty big step backwards. Also as power conservation goes writing to SSD/HDD is more expensive than writing to RAM and keeping it refreshed, so using the SSD as a storage device instead of the RAM can also have negative effects on the battery life of mobile devices.
- gareim 10y agoWhile I agree that I would rather my browser use more RAM than constantly suspend pages, I disagree with your notion that >A lot of the improvement in the reliability of consumer grade SSDs is due to OS improvements in how they manage their write operations to the hard drive. We're talking on the scale of writing 500gb to your SSD every single day for 10 years in order to reach their endurance limit (on average). Writing a few more gb at worst from your browser is hardly going to affect that. It's even doubtful that OS improvements change it much, as Windows 7, which a lot of people are still on, doesn't come SSD optimized.
- the8472 10y agoa) your security should not rely on process isolation. the javascript engine etc. should be secure in the first place. if you can break out of the JS sandbox you can already attack addon scripts (think password managers) b) hosting some tabs in the same, sandboxed process is still stronger than hosting all of them in the parent process.
- AstralStorm 10y agoSo you mean the interpreter should be mathematically proven like SEL4 and generated from the proof? Otherwise I have no idea what "secure in the first place" means.
- the8472 10y agoMy point is that defense in depth is not all that great if the breach of the first line already gives you access to the loot. So you shouldn't assign too much weight to it.
- xorblurb 10y agoThe point of defense in depth is that you should not rely solely in practice on a single defense element, but you still should strive the hardest when you design it to be sufficient if it was bug free (at least on points where it is possible given the security model, and what the technical item can address). So splitting everything in sandboxed processes can play a big part in the security in a defense in depth approach. Of course you are not going to call it a day with just that, but still, it's extremely significant.
- the8472 10y ago> extremely significant How so? Are you saying that simply by being single-process currently firefox is orders of magnitude less secure than other browsers? And that it would still be orders of magnitude less secure even with sandboxes, where just multiple tabs might share a sandbox?
- wingless 10y agoYes, that is definitely possible. Chrome isolates data as much as possible between processes. A shared cache would be a big improvement in memory usage, but security is the biggest concern.