GNU bug report logs -
#15553
24.3.50; epg.el and GnuPG 2.x cause unavoidable pinentry prompts for symmetrically encrypted files
Previous Next
Reported by: Teodor Zlatanov <tzz <at> lifelogs.com>
Date: Mon, 7 Oct 2013 18:04:02 UTC
Severity: normal
Tags: notabug
Found in version 24.3.50
Done: Daiki Ueno <ueno <at> gnu.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 15553 in the body.
You can then email your comments to 15553 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#15553
; Package
emacs
.
(Mon, 07 Oct 2013 18:04:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Teodor Zlatanov <tzz <at> lifelogs.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Mon, 07 Oct 2013 18:04:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
1. Install GnuPG 2.x, don't run gpg-agent
2. Open file.gpg, X or curses pinentry dialog pops up
The suggested workaround is to run gpg-agent.
Problems:
- on a headless server this can lock up Emacs
- if the GPG agent is dead, locked up, or not running, there's no remedy
- the X pinentry dialog is very non-specific ("Enter passphrase") so
there's no way to know what passphrase is being requested and why if
you don't have the specific instance in focus.
- there's no way to avoid the prompt in favor of an Emacs minibuffer query
In GNU Emacs 24.3.50.2 (x86_64-unknown-linux-gnu, GTK+ Version 3.4.4)
of 2013-09-20 on flea.lifelogs.com
Bzr revision: 114415 rgm <at> gnu.org-20130921005207-1eq49miu7feptu8i
Windowing system distributor `The X.Org Foundation', version 11.0.11304000
System Description: Gentoo Base System release 2.2
Added tag(s) notabug.
Request was from
Daiki Ueno <ueno <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Mon, 07 Oct 2013 23:55:01 GMT)
Full text and
rfc822 format available.
Reply sent
to
Daiki Ueno <ueno <at> gnu.org>
:
You have taken responsibility.
(Mon, 07 Oct 2013 23:55:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Teodor Zlatanov <tzz <at> lifelogs.com>
:
bug acknowledged by developer.
(Mon, 07 Oct 2013 23:55:04 GMT)
Full text and
rfc822 format available.
Message #12 received at 15553-done <at> debbugs.gnu.org (full text, mbox):
tags 15553 notabug
thanks
Teodor Zlatanov <tzz <at> lifelogs.com> writes:
> 1. Install GnuPG 2.x, don't run gpg-agent
> 2. Open file.gpg, X or curses pinentry dialog pops up
>
> The suggested workaround is to run gpg-agent.
So you can workaround, what's your problem?
> Problems:
>
> - on a headless server this can lock up Emacs
Not a problem if you use the workaround.
> - if the GPG agent is dead, locked up, or not running, there's no remedy
Ditto.
> - the X pinentry dialog is very non-specific ("Enter passphrase") so
> there's no way to know what passphrase is being requested and why if
> you don't have the specific instance in focus.
Unreleated to this bug, please open a new one.
> - there's no way to avoid the prompt in favor of an Emacs minibuffer query
As I said a number of times, that degrades security. If the insecurity
is okay for you, what's the reason you want to use GnuPG 2.x rather than
GnuPG 1.x?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#15553
; Package
emacs
.
(Tue, 08 Oct 2013 01:01:01 GMT)
Full text and
rfc822 format available.
Message #15 received at 15553 <at> debbugs.gnu.org (full text, mbox):
On Tue, 08 Oct 2013 08:54:17 +0900 Daiki Ueno <ueno <at> gnu.org> wrote:
DU> Teodor Zlatanov <tzz <at> lifelogs.com> writes:
>> 1. Install GnuPG 2.x, don't run gpg-agent
>> 2. Open file.gpg, X or curses pinentry dialog pops up
>>
>> The suggested workaround is to run gpg-agent.
DU> So you can workaround, what's your problem?
See below.
>> Problems:
>>
>> - on a headless server this can lock up Emacs
DU> Not a problem if you use the workaround.
>> - if the GPG agent is dead, locked up, or not running, there's no remedy
DU> Ditto.
Look. gpg-agent is an external daemon. Kill it manually or it dies
accidentally or it blocks for whatever reason. Now the user has no
access to their secret data and Emacs could even completely lock up.
You're assuming access to a resource that you can't verify (gpg-agent).
Or rather, GnuPG is depending on it.
>> - there's no way to avoid the prompt in favor of an Emacs minibuffer query
DU> As I said a number of times, that degrades security. If the insecurity
DU> is okay for you, what's the reason you want to use GnuPG 2.x rather than
DU> GnuPG 1.x?
I'd rather not use either but have no choice right now. I would like to
avoid the GnuPG dependency altogether as I've explained. Anyhow, I was
hoping that GnuPG 2.x can provide a special option (as we've discussed
that you could propose) to make this possible. If that's not your
interest, then let's just call this one done as a "user misunderstanding
of basic security" or whatever you like.
Thanks for your time
Ted
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#15553
; Package
emacs
.
(Tue, 08 Oct 2013 01:44:02 GMT)
Full text and
rfc822 format available.
Message #18 received at 15553 <at> debbugs.gnu.org (full text, mbox):
Ted Zlatanov <tzz <at> lifelogs.com> writes:
> Look. gpg-agent is an external daemon. Kill it manually or it dies
> accidentally or it blocks for whatever reason.
It's as easy to restart as kill it manually. Even gpg2 automatically
respawns it if it is not running. If it dies accidentally or blocks,
you should report it to GnuPG.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#15553
; Package
emacs
.
(Tue, 08 Oct 2013 03:28:01 GMT)
Full text and
rfc822 format available.
Message #21 received at 15553 <at> debbugs.gnu.org (full text, mbox):
>> - on a headless server this can lock up Emacs
That's not good. We should try to make sure that detect the
problematic situation, or make it easy for the user to get out of it
(with something like a C-g).
>> - if the GPG agent is dead, locked up, or not running, there's no remedy
> Ditto.
It can be very annoying for the user, and tricky to trackdown, so it's
clearly a real problem. Of course, I have no idea how easy it would be
to fix it, but that doesn't make it a non-problem. It incidentally does
sound like it matches the symptom of a problem I've had a few times
(tho I never bothered to track it down enough to be able to confirm
that it was indeed this problem).
>> - there's no way to avoid the prompt in favor of an Emacs minibuffer query
> As I said a number of times, that degrades security. If the insecurity
> is okay for you, what's the reason you want to use GnuPG 2.x rather than
> GnuPG 1.x?
Maybe the user doesn't really want to use gpg2 (maybe it's installed for
some other user, maybe gpg1 is not installed for some reason, or maybe
the user didn't realize that gpg1 is not obsoleted by gpgp2), yet the
user may not care about the degraded security.
Stefan
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#15553
; Package
emacs
.
(Tue, 08 Oct 2013 07:08:01 GMT)
Full text and
rfc822 format available.
Message #24 received at 15553 <at> debbugs.gnu.org (full text, mbox):
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:
>>> - on a headless server this can lock up Emacs
>
> That's not good. We should try to make sure that detect the
> problematic situation, or make it easy for the user to get out of it
> (with something like a C-g).
I doubt such a hard lockup is possible, as epg.el uses async process.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#15553
; Package
emacs
.
(Tue, 08 Oct 2013 16:58:02 GMT)
Full text and
rfc822 format available.
Message #27 received at 15553 <at> debbugs.gnu.org (full text, mbox):
>>>> - on a headless server this can lock up Emacs
>> That's not good. We should try to make sure that detect the
>> problematic situation, or make it easy for the user to get out of it
>> (with something like a C-g).
> I doubt such a hard lockup is possible, as epg.el uses async process.
But it calls accept-process-output, so it can still get stuck. And even
if inhibit-quit is nil, maybe there's no frame open anywhere so the user
can't hit C-g. So the only recourse would be connecting to it via
another emacsclient, which might fail to work if Emacs is stuck in an
accept-process-output waiting for a specific process.
Stefan
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#15553
; Package
emacs
.
(Wed, 09 Oct 2013 00:40:11 GMT)
Full text and
rfc822 format available.
Message #30 received at 15553 <at> debbugs.gnu.org (full text, mbox):
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:
>>>>> - on a headless server this can lock up Emacs
>>> That's not good. We should try to make sure that detect the
>>> problematic situation, or make it easy for the user to get out of it
>>> (with something like a C-g).
>> I doubt such a hard lockup is possible, as epg.el uses async process.
>
> But it calls accept-process-output, so it can still get stuck.
Yes, but it's not a hard lockup. I can get out from the loop with C-g.
And actually Emacs 24 has the code to allow pinentry to fallback into
the curses mode in that case (though the interaction is not very well).
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#15553
; Package
emacs
.
(Wed, 09 Oct 2013 03:06:02 GMT)
Full text and
rfc822 format available.
Message #33 received at 15553 <at> debbugs.gnu.org (full text, mbox):
>> But it calls accept-process-output, so it can still get stuck.
> Yes, but it's not a hard lockup. I can get out from the loop with C-g.
But if you have no terminal open (yet) on that emacs-server, you can't
hit C-g.
> And actually Emacs 24 has the code to allow pinentry to fallback into
> the curses mode in that case (though the interaction is not very well).
And same as above: there might not be any tty for curses to talk to.
Stefan
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#15553
; Package
emacs
.
(Wed, 09 Oct 2013 04:11:02 GMT)
Full text and
rfc822 format available.
Message #36 received at 15553 <at> debbugs.gnu.org (full text, mbox):
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:
>>> But it calls accept-process-output, so it can still get stuck.
>> Yes, but it's not a hard lockup. I can get out from the loop with C-g.
>
> But if you have no terminal open (yet) on that emacs-server, you can't
> hit C-g.
Well, is that a realistic use case? What do you suppose precisely?
I thought that you meant like:
$ emacs -nw file.gpg
or even
$ emacs -batch -l file.el.gpg
on a remote terminal. Either works fine here with pinentry-curses.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#15553
; Package
emacs
.
(Thu, 10 Oct 2013 00:35:03 GMT)
Full text and
rfc822 format available.
Message #39 received at 15553 <at> debbugs.gnu.org (full text, mbox):
>>>> But it calls accept-process-output, so it can still get stuck.
>>> Yes, but it's not a hard lockup. I can get out from the loop with C-g.
>> But if you have no terminal open (yet) on that emacs-server, you can't
>> hit C-g.
> Well, is that a realistic use case? What do you suppose precisely?
> I thought that you meant like:
> $ emacs -nw file.gpg
> or even
> $ emacs -batch -l file.el.gpg
Sorry I didn't use the right terminology. I meant an "emacs --daemon"
I.e. run an emacs process as a server and then connect to it via
emacsclient. This server can sit in the background with no tty nor GUI
frame open anywhere. If you then "emacsclient -eval <something>" and
this <something> involves opening a .gpg file you might get stuck with
an emacs server. In any case, this is hypothetical. I haven't even
tried it, and who knows maybe it does behave properly in the end
(e.g. gpg2 errors out because it can't find any X11 display nor any tty
to use to prompt the user).
So let's not worry about it too much until there's a concrete
problematic case.
Stefan
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Thu, 07 Nov 2013 12:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 11 years and 229 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.