unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Fwd: Re: [oss-security] GNU Emacs 25.2 enriched text remote code execution
       [not found] <87mv5zzt6n.fsf@mid.deneb.enyo.de>
@ 2017-09-12 18:18 ` Paul Eggert
  2017-09-13  5:07   ` Kalle Olavi Niemitalo
  0 siblings, 1 reply; 6+ messages in thread
From: Paul Eggert @ 2017-09-12 18:18 UTC (permalink / raw)
  To: Emacs development discussions

I got the following response to the announcement on the oss-security 
mailing list. Question: what would cause the eval-after-load to be bypassed?


-------- Forwarded Message --------
Subject: 	Re: [oss-security] GNU Emacs 25.2 enriched text remote code 
execution
Date: 	Tue, 12 Sep 2017 20:08:00 +0200
From: 	Florian Weimer <fw@deneb.enyo.de>
To: 	Paul Eggert <eggert@cs.ucla.edu>
CC: 	oss-security@lists.openwall.com



* Paul Eggert:

> == Mitigation ==
>
> To work around the bug in unfixed versions of Emacs, put the following code in 
> your personal or site-wide Emacs init file (~/.emacs, ~/emacs.d/init.el, 
> site-start.el):
>
>    ;; Mitigate Bug#28350 (security) in Emacs 25.2 and earlier.
>    (eval-after-load "enriched"
>      '(defun enriched-decode-display-prop (start end &optional param)
>         (list start end)))

This does not override the function in all cases when enriched is
loaded.  Something like this would be more reliable, but it will of
course slow down the starting of Emacs:

(require 'enriched)
(defun enriched-decode-display-prop (start end &optional param)
   (list start end))




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Fwd: Re: [oss-security] GNU Emacs 25.2 enriched text remote code execution
  2017-09-12 18:18 ` Fwd: Re: [oss-security] GNU Emacs 25.2 enriched text remote code execution Paul Eggert
@ 2017-09-13  5:07   ` Kalle Olavi Niemitalo
  2017-09-13  8:56     ` Paul Eggert
  0 siblings, 1 reply; 6+ messages in thread
From: Kalle Olavi Niemitalo @ 2017-09-13  5:07 UTC (permalink / raw)
  To: Paul Eggert; +Cc: Emacs development discussions

Paul Eggert <eggert@cs.ucla.edu> writes:

> Question: what would cause the eval-after-load to be bypassed?

eval-after-load in Emacs 21.3 says "FILE must match exactly."



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Fwd: Re: [oss-security] GNU Emacs 25.2 enriched text remote code execution
  2017-09-13  5:07   ` Kalle Olavi Niemitalo
@ 2017-09-13  8:56     ` Paul Eggert
  2017-09-13 12:19       ` Stefan Monnier
  2017-09-13 14:46       ` Eli Zaretskii
  0 siblings, 2 replies; 6+ messages in thread
From: Paul Eggert @ 2017-09-13  8:56 UTC (permalink / raw)
  To: Kalle Olavi Niemitalo; +Cc: Emacs development discussions

Kalle Olavi Niemitalo wrote:
> eval-after-load in Emacs 21.3 says "FILE must match exactly."

In that case, the mitigation strategy published in etc/NEWS is not sufficient, 
and we should go back to the method that says (require 'enriched) first. I'll do 
that if nobody has a better suggestion.



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Fwd: Re: [oss-security] GNU Emacs 25.2 enriched text remote code execution
  2017-09-13  8:56     ` Paul Eggert
@ 2017-09-13 12:19       ` Stefan Monnier
  2017-09-13 14:46       ` Eli Zaretskii
  1 sibling, 0 replies; 6+ messages in thread
From: Stefan Monnier @ 2017-09-13 12:19 UTC (permalink / raw)
  To: emacs-devel

> In that case, the mitigation strategy published in etc/NEWS is not
> sufficient, and we should go back to the method that says (require
> 'enriched) first. I'll do that if nobody has a better suggestion.

Personally, I'd rather use `advice-add` or `defadvice`.


        Stefan




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Fwd: Re: [oss-security] GNU Emacs 25.2 enriched text remote code execution
  2017-09-13  8:56     ` Paul Eggert
  2017-09-13 12:19       ` Stefan Monnier
@ 2017-09-13 14:46       ` Eli Zaretskii
  2017-09-13 19:56         ` Paul Eggert
  1 sibling, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2017-09-13 14:46 UTC (permalink / raw)
  To: Paul Eggert; +Cc: kon, emacs-devel

> From: Paul Eggert <eggert@cs.ucla.edu>
> Date: Wed, 13 Sep 2017 01:56:04 -0700
> Cc: Emacs development discussions <emacs-devel@gnu.org>
> 
> Kalle Olavi Niemitalo wrote:
> > eval-after-load in Emacs 21.3 says "FILE must match exactly."
> 
> In that case, the mitigation strategy published in etc/NEWS is not sufficient, 
> and we should go back to the method that says (require 'enriched) first. I'll do 
> that if nobody has a better suggestion.

I only have 21.4, and there the recipe in the 25.3 NEWS works.  Can we
please see the exact recipe tried in Emacs 21.3 and its results?

Thanks.



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Fwd: Re: [oss-security] GNU Emacs 25.2 enriched text remote code execution
  2017-09-13 14:46       ` Eli Zaretskii
@ 2017-09-13 19:56         ` Paul Eggert
  0 siblings, 0 replies; 6+ messages in thread
From: Paul Eggert @ 2017-09-13 19:56 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: kon, emacs-devel

On 09/13/2017 07:46 AM, Eli Zaretskii wrote:
>> that if nobody has a better suggestion.
> I only have 21.4, and there the recipe in the 25.3 NEWS works.  Can we
> please see the exact recipe tried in Emacs 21.3 and its results?

I did not reproduce the problem on Solaris 10 sparc, which ships with 
GNU Emacs 21.3 in /opt/sfw/bin/emacs (dated 2006-03-26). I ran the shell 
command "Emacs" from a terminal window, where my ~/.emacs file contained 
only this:

   (eval-after-load "enriched"
       '(defun enriched-decode-display-prop (start end &optional param)
              (list start end)))

which is what is in 25.3 etc/NEWS. Emacs started up fine and the bugfix 
was in place. So perhaps we should leave the NEWS file alone.

It's hard to reproduce the problem on today's GNU/Linux, as these old 
releases no longer build out of the box.




^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-09-13 19:56 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <87mv5zzt6n.fsf@mid.deneb.enyo.de>
2017-09-12 18:18 ` Fwd: Re: [oss-security] GNU Emacs 25.2 enriched text remote code execution Paul Eggert
2017-09-13  5:07   ` Kalle Olavi Niemitalo
2017-09-13  8:56     ` Paul Eggert
2017-09-13 12:19       ` Stefan Monnier
2017-09-13 14:46       ` Eli Zaretskii
2017-09-13 19:56         ` Paul Eggert

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).