Firefox Under Fire: Anatomy of latest 0-day attack
welivesecurity.com
welivesecurity.com
The PDF.js project was started largely because Adobe Reader has a horrible security track record and Windows users don't keep it up to date. Well, Linux users don't generally use Reader, and they benefit from package management, so they were just needlessly put at risk to protect others.
I have changed FF to open all PDFs with Evince, and I couldn't be happier. It's faster and has a better UI. I've added it to the ever-growing checklist of things to do after installing FF, which includes installing multiple plug-ins to partially mitigate browser fingerprinting, something that Mozilla has known about at least since 2010 but has done virtually nothing to prevent[1] and something that I and many other users would prefer they work on instead of PDF.js or Pocket integration.
https://news.ycombinator.com/item?id=10023517
Let's not give the project a bad name for someone else's bugs.
If people were misled into thinking pdf.js was completely to blame, then that's Mozilla's fault.
As far as I understand PDF.js used the 'PlayPreview' feature (Playpreview is the overlay you get to see to confirm you want to activate a plugin) as a 'hack' to inject PDF.js HTML content (resource://pdf.js/web/viewer.html) into the page because the plugin architecture was not flexible enough. So, even though technically PlayPreview is not part of PDF.js, the combination of PDF.js and PlayPreview specifically made it possible to inject content into PlayPreview and bypass the CSP.
https://github.com/mozilla/pdf.js/commit/4f3f983a214867011dd...
Not sure who's to blame, but like he said, there was no vulnerability in the web version.
It doesn't matter how beefy a machine is, the world freezes when a PDF is being open. Then there is the slow pagination, zooming and lots of boxes instead of characters.
It's still not as fast as a native PDF reader, and probably never will be. When I'm dealing with really large PDFs (e.g. the Intel x86 docs, which are 1000+ pages) I still use a native PDF reader. But I find that pdf.js does just fine on documents of up to a few hundred pages. Which is, y'know, most of them.
And having PDFs open in the browser is so convenient -- I get a happy feeling every time I open a PDF and I don't get a dialog asking me to save this file and/or open it in an external application.
Not really. Even though I also do web development from time to time, I tend to favour native applications.
And as you acknowledge, it is still slower.
The overwhelming majority of Firefox users are on Windows, so statistically this doesn't result in the conclusion you think it does.
Compared to the large improvement in security that the JS sandbox provides (and yes, sandboxes do improve security despite sometimes having holes) compared to (say) unsandboxed Evince, the security benefit from diversity is minimal.
1.) Displaying a message that the PDF may not be displayed correctly, which looked like this: https://support.cdn.mozilla.net/media/uploads/images/2013-03... except for the PDF of course, because it was loaded in a hidden iframe.
2.) In my case the exploit tried to open one of my public keys (with the .pub file extension) but because the browser determined this was an executable file (because of the mime-type) that should not be displayed by the browser it triggered a file dialog asking me to open the file with some other program. This is what alarmed me and that way I discovered this 0-day. I must say however that other versions of the exploit have surfaced that do no longer target the public key file (maybe for this reason?) so the file theft may not be noticed.
allow firefox_t user_home_t : file { read write };
This simply allows your web browser, running as firefox_t to read and write files in your home directory, labeled as user_home_t. sudo unshare -m bash -c "mount --make-rslave / && mount -n -o bind /tmp/empty /home && sudo -u $(whoami) firefox -ProfileManager -no-remote"
it :- forks the mountpoints table for the process to be executed (bash) - it requires capabilities (hence sudo),
- make / as as slave mount in this context (because of systemd which shares the / mountpoint (see: https://www.kernel.org/doc/Documentation/filesystems/shareds...),
- bind an empty directory to /home (that I previously created), it will only be visible for this process and its children, since it's in an unshared mountpoints table,
- I run firefox in user mode.
In Fedora there is an application called sandbox that help you with that
e.g. see http://www.bress.net/blog/archives/195-Firefox-in-a-sandbox-...
The author is mia from the bug and seems to have given up: https://danwalsh.livejournal.com/72697.html
[1]: https://l3net.wordpress.com/2014/09/19/firejail-a-security-s...
This is a lesson for those who continue to save their filezilla/etc passes in plaintext.. Stop being lazy and type your password each time.
So yes?
ctrl+f to find user "fukusa" and you'll find that one of his/her comment goes into depth.
[1] https://github.com/mozilla/gecko-dev/commit/2e67509c8a3cefe8...
[2] https://github.com/mozilla/gecko-dev/commit/8b7f7bde8f21bd71...