From: Glenn Morris <rgm@gnu.org>
To: Stefan Monnier <monnier@IRO.UMontreal.CA>
Cc: emacs-devel@gnu.org
Subject: Re: [Emacs-diffs] /srv/bzr/emacs/emacs-24 r108098: * admin/bzrmerge.el (bzrmerge-resolve): Disable local eval:.
Date: Fri, 10 Aug 2012 16:42:16 -0400 [thread overview]
Message-ID: <1uje1ntj.fsf@fencepost.gnu.org> (raw)
In-Reply-To: <jwvipcqcwzz.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Fri, 10 Aug 2012 16:29:56 -0400")
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.
next prev parent reply other threads:[~2012-08-10 20:42 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[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 [this message]
2012-08-10 20:50 ` Glenn Morris
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1uje1ntj.fsf@fencepost.gnu.org \
--to=rgm@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=monnier@IRO.UMontreal.CA \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.