by prosody · 6y ago · 0 comments
Emacs is written mostly in Emacs Lisp, a memory safe language. So security implications come down to either logic bugs, the C parts of Emacs or the C libraries, usually parsers, that Emacs links with (e.g. ImageMagick which should never be enabled by security-conscious folks and GnuTLS which Emacs supports using out-of-process and security-conscious folks that need it should do so).
Let's look at some published vulnerability statistics.
Google Chrome: > 550 total, 121 remotely exploitable code execution, 450+ memory corruption/overflows (potentially exploitable).
Emacs: 0 unassisted remotely exploitable code exec vulnerabilities, 2 assisted ones (CVE-2017-14482, CVE-2012-3479). Finally, note how specific to exact requirements the Emacs vulnerabilities are. You had to either read an email sent to you containing the payload or open a plain text file with the payload embedded in it and clearly visible.
[1] https://www.cvedetails.com/vulnerability-list/vendor_id-72/p...
[2] https://www.cvedetails.com/product/15031/Google-Chrome.html?...
I'm not aware of any serious bugbounty programs for Emacs.
Emacs exploits would be immensely valuable in the right contexts.
It's a garbage collected language with parsers that have been run a few millions times so its not new code but...
I generally don't do much network anything except across secure lan.
I personally think using Emacs for irc or chat is bananas.
Emacs can be sandboxed but mostly isn't as people do so much with it and the current model is for a single main process usually.
It could evolve though and I think its inevitable that it will.
Fwiw I think not just Emacs but all the ditors are more at risk from supplychain attacks and build scripts from the internet.
We'll see.
You can spend less than 5 minutes looking over the source of RCIRC (rcirc.el, written in Emacs Lisp) where it's crystal clear that you can't have remote code execution in that Emacs Lisp code.
So using Emacs for IRC is pretty much the same order of bananas as using a .NET or Java client. Do you think that's bananas too?