unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@IRO.UMontreal.CA>
To: Ulrich Mueller <ulm@gentoo.org>
Cc: Chong Yidong <cyd@stupidchicken.com>, emacs-devel@gnu.org
Subject: Re: "Local variables" denial-of-service attack
Date: Fri, 09 Jan 2009 12:07:48 -0500	[thread overview]
Message-ID: <jwvvdsoifbp.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <18791.27439.738299.220433@a1i15.kph.uni-mainz.de> (Ulrich Mueller's message of "Fri, 9 Jan 2009 16:20:15 +0100")

>    Local Variab*les:
>    byte-compile-warnings: #1=("circular" "object" . #1#)
>    End:

> Visiting such a file will result in Emacs hanging and consuming all
> CPU time. (Normally, aborting with C-g is possible. However, if the
> file is opened with emacsclient there seems to be no way to recover.)

Hmm... that's not good.  It's not the end of the world since it's "only"
a DoS, but we should try and fix it.  I see two ways:
1 - don't allow (in file-local vars and .dir-local.el) the # escapes
    that permit creation of those circular objects.
2 - be more careful about circularities in the
    safe-local-variable predicates.

Nb 1 is easier and will solve it "for all cases", so it's probably
a better choice.  Of course, it also "denies service" to those rare
individuals who used circular data in file-local variables for
non-DoS purposes.  I don't know if there are any on this planet, tho.


        Stefan





       reply	other threads:[~2009-01-09 17:07 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <18791.27439.738299.220433@a1i15.kph.uni-mainz.de>
2009-01-09 17:07 ` Stefan Monnier [this message]
2009-01-23  8:54   ` "Local variables" denial-of-service attack Ulrich Mueller
2009-02-02  3:14     ` Stefan Monnier
2009-04-02  8:15   ` Ulrich Mueller
2009-04-23 17:49     ` Ulrich Mueller
2009-04-28  2:02       ` Chong Yidong
2009-04-29  3:15       ` Chong Yidong

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvvdsoifbp.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=cyd@stupidchicken.com \
    --cc=emacs-devel@gnu.org \
    --cc=ulm@gentoo.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 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).