unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Ted Zlatanov <tzz@lifelogs.com>
To: emacs-devel@gnu.org
Subject: Re: Wherein I argue for the inclusion of libnettle in Emacs 24.5
Date: Thu, 06 Feb 2014 10:54:33 -0500	[thread overview]
Message-ID: <87d2j0ck3q.fsf@lifelogs.com> (raw)
In-Reply-To: 87sirwmgd9.fsf@uwakimon.sk.tsukuba.ac.jp

On Fri, 07 Feb 2014 00:05:06 +0900 "Stephen J. Turnbull" <stephen@xemacs.org> wrote: 

SJT> Ted Zlatanov writes:
>> Inside Emacs, there would have to be a passphrase popup in the
>> minibuffer or elsewhere that can't be faked from ELisp but must
>> come from the "secure core."

SJT> Ted, there is no "secure core" in an Emacs Lisp application.  That was
SJT> the main point of the defadvice.  If *your* Lisp program can invoke a
SJT> password popup, so can *my* sleazebag defadvice.

Yes, that would be an attack target internally, obviously.  But a) I was
originally talking about how calling out to external programs makes it
hard to tell if the popup is authentic or not[1]; and b) this needs work
and discussion, but I think it's a valuable use case.

What do you think happens when you open a .gpg file using GnuPG
externally, even disregarding the OS channels traveled?  That data is
certainly not safe from defadvice.  I try to protect passwords in
auth-source by wrapping them in closures; EPA/EPG simply throws the data
into a buffer.  This is *not* saying the EPA/EPG design is bad, only
that Emacs as a whole could use a way to hide "data not intended for
direct user inspection" better, and provide for a "tainting" trace of
data (to use the Perl term).  For special files like authinfo.gpg, you
certainly don't need the whole file in memory just to grab one line.

SJT> Not at all.  The presence of those primitives is an attractive
SJT> nuisance, encouraging security neophytes to roll-their-own authn/authz/
SJT> crypto systems.  If you want horror stories, there are plenty archived
SJT> at the RISKS forum and on CERT.  Statistically speaking, availability
SJT> of these functions will mean somebody *will* get screwed by a self-
SJT> injected security bug.
>> 
>> I can't debate what could happen, that's what "hypothetical" means.

SJT> Security is all about what *could* happen if you're not careful.  If
SJT> you aren't already thinking carefully about that, I don't understand
SJT> why you're doing this!

OK then, let's hypothesize.  I don't think the presence of these
primitives will make the situation worse by flooding us with badly
implemented crypto.  I may be wrong, but it just doesn't seem likely.
One of the things you learn from RISKS is that generally, things tend to
work out all right as long as the source code is open and
vulnerabilities are disclosed quickly.

Realistically speaking, attacks against Emacs are extremely unlikely
unless specific people are targeted.  The user population is too small.
We also don't generally have anything all that secret or precious stored
in Emacs (except RMS, who has a million Bitcoins and is the real Satoshi
Nakamoto, you heard it here first).  So I think comparing the risks of
what I'm proposing to, say, bank databases or airplane software is a bit
ambitious.

Ted

[1] One of my first tasks as a sysadmin, many years ago on AIX, was to
stop some attackers with internal access.  They had set up a login
system that decrypted some special files with a password and wiped them
clean on logout.  Their encryption password, for technical and practical
reasons, was the fastest way to stop them completely.  So I simply made
a prompt that looked the same as the normal one, grabbed their password,
and told them "wrong password, reenter please."  It then wiped itself
out of their login files.




  reply	other threads:[~2014-02-06 15:54 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-03 22:36 Wherein I argue for the inclusion of libnettle in Emacs 24.5 Lars Ingebrigtsen
2014-02-04  3:21 ` Stefan Monnier
2014-02-04 13:07   ` Ted Zlatanov
2014-02-04 14:44     ` Stephen J. Turnbull
2014-02-04 18:36       ` Ted Zlatanov
2014-02-04 22:44   ` Lars Ingebrigtsen
2014-02-05  2:28     ` Stefan Monnier
2014-02-05  2:39       ` Lars Ingebrigtsen
2014-02-05  7:00       ` Ted Zlatanov
2014-02-05  8:13         ` Stephen J. Turnbull
2014-02-05 13:41           ` Ted Zlatanov
2014-02-05 15:50             ` andres.ramirez
2014-02-05 17:00             ` chad
2014-02-05 18:55               ` Ted Zlatanov
2014-02-06  5:03             ` Stephen J. Turnbull
2014-02-06 11:49               ` Ted Zlatanov
2014-02-06 13:03                 ` Stefan Monnier
2014-02-06 14:28                   ` Ted Zlatanov
2014-02-06 15:05                 ` Stephen J. Turnbull
2014-02-06 15:54                   ` Ted Zlatanov [this message]
2014-02-07  2:06                     ` Stephen J. Turnbull
2014-02-07  6:51                       ` David Kastrup
2014-02-07  7:15                         ` Stephen J. Turnbull
2014-02-07  8:53                           ` David Kastrup
2014-02-07 10:00                             ` Stephen J. Turnbull
2014-02-07 10:49                               ` David Kastrup
2014-02-07 20:43                                 ` Stephen J. Turnbull
2014-02-07 21:42                                   ` Ted Zlatanov
2014-02-07 22:23                                     ` Stephen J. Turnbull
2014-02-07 15:30                               ` Ted Zlatanov
2014-02-07  9:07                     ` Daiki Ueno
2014-02-07 11:54                       ` Ted Zlatanov
2014-02-08  8:11                         ` Daiki Ueno
2014-02-08 16:59                           ` Ted Zlatanov
2014-02-05  8:19         ` Daiki Ueno
2014-02-04 13:10 ` Ted Zlatanov
2014-02-04 16:27   ` Paul Eggert
2014-02-04 18:32     ` Ted Zlatanov
2014-02-04 19:04       ` Paul Eggert
2014-02-04 20:11         ` Ted Zlatanov
2014-02-04 21:46           ` Paul Eggert
2014-02-04 22:44             ` Ted Zlatanov
2014-02-04 22:36           ` Lars Ingebrigtsen
2014-02-05  5:11             ` Daiki Ueno

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=87d2j0ck3q.fsf@lifelogs.com \
    --to=tzz@lifelogs.com \
    --cc=emacs-devel@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 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).