From: <tomas@tuxteam.de>
To: help-gnu-emacs@gnu.org
Subject: Re: eval and security
Date: Mon, 24 Oct 2016 14:31:52 +0200 [thread overview]
Message-ID: <20161024123151.GB10964@tuxteam.de> (raw)
In-Reply-To: <d55be2b3-e2e5-f3a2-f712-13b58fd30e49@easy-emacs.de>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Mon, Oct 24, 2016 at 02:20:44PM +0200, Andreas Röhler wrote:
> Hi,
>
> remember a saying like "avoid calls like (eval 'my-symbol) in
> lisp-code" as related to security issues.
>
> Is there some reading to learn more? Maybe I'm mistaking something?
Perhaps because a randomly downloaded package can redefine 'my-symbol
to be something evil?
In any case, if you indirect your code through user-overridable
stuff (e.g. hooks), the least you can do is to use a defvar
marking the thing as "risky": then Emacs will do its best to
avoid changing it when the user doesn't expect it.
There's a chapter "Security Considerations" in the Emacs Lisp
manual[1].
regards
[1] https://www.gnu.org/software/emacs/manual/html_node/elisp/Security-Considerations.html
- -- t
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
iEYEARECAAYFAlgN/zcACgkQBcgs9XrR2kalLwCfYv6yRyRAECNQ9zCepzgdZJqb
9gMAn2nR87fNoh5nzMqF+bGVi6FncgXc
=QPBI
-----END PGP SIGNATURE-----
next prev parent reply other threads:[~2016-10-24 12:31 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-24 12:20 eval and security Andreas Röhler
2016-10-24 12:31 ` tomas [this message]
2016-10-24 17:40 ` Andreas Röhler
2016-10-24 18:50 ` Philipp Stephani
2016-10-25 7:34 ` Andreas Röhler
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=20161024123151.GB10964@tuxteam.de \
--to=tomas@tuxteam.de \
--cc=help-gnu-emacs@gnu.org \
/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.