unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Paul Eggert <eggert@cs.ucla.edu>
To: Eli Zaretskii <eliz@gnu.org>
Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org
Subject: Re: master 739593d 3/5: Make gnus-copy-file act like copy-file etc.
Date: Thu, 14 Sep 2017 21:04:16 -0700	[thread overview]
Message-ID: <31d79f93-2b0d-f465-72bb-88ce4532c7ee@cs.ucla.edu> (raw)
In-Reply-To: <83o9qdm8hc.fsf@gnu.org>

Eli Zaretskii wrote:
> no bot or person can reasonably
> know in advance what file or directory the user will copy/rename.

Sure they can. Here's a scenario off the top of my head. A sysadmin uses Emacs 
to examine files, and has the bad (but all-too-common) habit of copying files to 
/tmp and examining the copies so that he doesn't mistakenly change the 
originals. A malicious user asks the sysadmin to take a look at "problems" in 
the user's ~/.ssh/known_hosts file. The sysadmin does this:

M-x copy-file RET ~malicious/.ssh/known_hosts RET /tmp/known_hosts RET

but it doesn't seem to work (there's no file in /tmp afterwards), so the tired 
sysadmin figures he mistyped the command, does the copy-file again and this time 
it works so he diagnoses the "problems". Because of the Emacs security bug with 
destination directories, the malicious user has now taken over the sysadmin's 
personal and private known_hosts file.

The scenario works partly because the attacker knows the habits of the victim. 
Such habits are often easy to discover.

One possible solution to all this is to tell ones' sysadmins "Do not use Emacs: 
it has too many security holes". But I'm fond of Emacs, and would rather that 
sysadmins could trust it to do their work.



  reply	other threads:[~2017-09-15  4:04 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20170911053128.28763.28434@vcs0.savannah.gnu.org>
     [not found] ` <20170911053130.C5F002068F@vcs0.savannah.gnu.org>
2017-09-11 23:14   ` master 739593d 3/5: Make gnus-copy-file act like copy-file etc Katsumi Yamaoka
2017-09-12  2:12     ` Ken Brown
2017-09-12  2:33       ` Katsumi Yamaoka
2017-09-12 19:22         ` Paul Eggert
2017-09-14  4:17           ` Stefan Monnier
2017-09-14 16:54             ` Eli Zaretskii
2017-09-14 17:59               ` Paul Eggert
2017-09-14 18:38                 ` Eli Zaretskii
2017-09-15  4:04                   ` Paul Eggert [this message]
2017-09-15  9:16                     ` Eli Zaretskii
2017-09-12  2:42       ` Eli Zaretskii
2017-09-13 19:33     ` Lars Ingebrigtsen
2017-09-13 20:07       ` Paul Eggert
2017-09-13 20:11         ` Lars Ingebrigtsen
2017-09-13 20:41           ` Paul Eggert
2017-09-13 21:10             ` Lars Ingebrigtsen
2017-09-13 23:32               ` Paul Eggert
2017-09-14 11:25                 ` Lars Ingebrigtsen
2017-09-14  2:35         ` Eli Zaretskii

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=31d79f93-2b0d-f465-72bb-88ce4532c7ee@cs.ucla.edu \
    --to=eggert@cs.ucla.edu \
    --cc=eliz@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 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).