* Re: [Emacs-diffs] /srv/bzr/emacs/emacs-24 r108098: * admin/bzrmerge.el (bzrmerge-resolve): Disable local eval:.
[not found] <E1SzjTX-0001sf-8w@vcs.savannah.gnu.org>
@ 2012-08-10 15:26 ` Stefan Monnier
2012-08-10 15:51 ` Glenn Morris
0 siblings, 1 reply; 5+ messages in thread
From: Stefan Monnier @ 2012-08-10 15:26 UTC (permalink / raw)
To: Glenn Morris; +Cc: emacs-devel
> - (with-current-buffer (let ((enable-local-variables :safe))
> + (with-current-buffer (let ((enable-local-variables :safe)
> + (enable-local-eval nil))
Why are those changes needed?
Shouldn't (enable-local-variables :safe) be sufficient?
Stefan
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Emacs-diffs] /srv/bzr/emacs/emacs-24 r108098: * admin/bzrmerge.el (bzrmerge-resolve): Disable local eval:.
2012-08-10 15:26 ` [Emacs-diffs] /srv/bzr/emacs/emacs-24 r108098: * admin/bzrmerge.el (bzrmerge-resolve): Disable local eval: Stefan Monnier
@ 2012-08-10 15:51 ` Glenn Morris
2012-08-10 20:29 ` Stefan Monnier
0 siblings, 1 reply; 5+ messages in thread
From: Glenn Morris @ 2012-08-10 15:51 UTC (permalink / raw)
To: Stefan Monnier; +Cc: emacs-devel
Stefan Monnier wrote:
>> - (with-current-buffer (let ((enable-local-variables :safe))
>> + (with-current-buffer (let ((enable-local-variables :safe)
>> + (enable-local-eval nil))
>
> Why are those changes needed?
Paranoia.
> Shouldn't (enable-local-variables :safe) be sufficient?
Yes. Unless there is another screw-up like
http://debbugs.gnu.org/cgi/bugreport.cgi?bug=12155
BTW, there have been zero other comments on that. Emacs releases have
happened in similar cases in the past, IIUC.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Emacs-diffs] /srv/bzr/emacs/emacs-24 r108098: * admin/bzrmerge.el (bzrmerge-resolve): Disable local eval:.
2012-08-10 15:51 ` Glenn Morris
@ 2012-08-10 20:29 ` Stefan Monnier
2012-08-10 20:42 ` Glenn Morris
0 siblings, 1 reply; 5+ messages in thread
From: Stefan Monnier @ 2012-08-10 20:29 UTC (permalink / raw)
To: Glenn Morris; +Cc: emacs-devel
>>> - (with-current-buffer (let ((enable-local-variables :safe))
>>> + (with-current-buffer (let ((enable-local-variables :safe)
>>> + (enable-local-eval nil))
>> Why are those changes needed?
> Paranoia.
>> Shouldn't (enable-local-variables :safe) be sufficient?
> Yes. Unless there is another screw-up like
> http://debbugs.gnu.org/cgi/bugreport.cgi?bug=12155
> BTW, there have been zero other comments on that. Emacs releases have
> happened in similar cases in the past, IIUC.
I had the impression that it only affects unusual configurations.
Stefan
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Emacs-diffs] /srv/bzr/emacs/emacs-24 r108098: * admin/bzrmerge.el (bzrmerge-resolve): Disable local eval:.
2012-08-10 20:29 ` Stefan Monnier
@ 2012-08-10 20:42 ` Glenn Morris
2012-08-10 20:50 ` Glenn Morris
0 siblings, 1 reply; 5+ messages in thread
From: Glenn Morris @ 2012-08-10 20:42 UTC (permalink / raw)
To: Stefan Monnier; +Cc: emacs-devel
Stefan Monnier wrote:
> I had the impression that it only affects unusual configurations.
Non-default configs; don't know if I would say "unusual".
(setq enable-local-variables :safe)
is all you need.
There were a few places in Emacs that use that setting (without setting
enable-local-eval to nil). I don't think any of them were obviously
exploitable though. The autoloads one is in theory:
mkdir /tmp/foo
cd /tmp/foo
cat <<EOF > foo.el
(setq foo t)
;; Local Variables:
;; eval: (shell-command "touch /tmp/OHDEAR")
;; End:
EOF
rm -f /tmp/OHDEAR
emacs-24.1 -Q -l autoload \
--eval "(setq generated-autoload-file \"$PWD/loaddefs.el\")" \
--batch -f batch-update-autoloads .
ls /tmp/OHDEAR
But I suppose no-one creates autoloads without also byte-compiling,
which could already eval arbitrary code.
But there could be some third-party code that binds
enable-local-variables to :safe around some operation, intending to make
things safer for the user, but actually doing the opposite.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Emacs-diffs] /srv/bzr/emacs/emacs-24 r108098: * admin/bzrmerge.el (bzrmerge-resolve): Disable local eval:.
2012-08-10 20:42 ` Glenn Morris
@ 2012-08-10 20:50 ` Glenn Morris
0 siblings, 0 replies; 5+ messages in thread
From: Glenn Morris @ 2012-08-10 20:50 UTC (permalink / raw)
To: Stefan Monnier; +Cc: emacs-devel
PS CVE for previous similar (oops...) issue
http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2007-5795
Though I see that that issue was in 22.1 and 22.2 was not released for
another 5 months after it was fixed. So there's precedent for not
rushing out a release for this.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-08-10 20:50 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <E1SzjTX-0001sf-8w@vcs.savannah.gnu.org>
2012-08-10 15:26 ` [Emacs-diffs] /srv/bzr/emacs/emacs-24 r108098: * admin/bzrmerge.el (bzrmerge-resolve): Disable local eval: Stefan Monnier
2012-08-10 15:51 ` Glenn Morris
2012-08-10 20:29 ` Stefan Monnier
2012-08-10 20:42 ` Glenn Morris
2012-08-10 20:50 ` Glenn Morris
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).