Red Hat Bugzilla – Bug 71644
gnupg using insecure memory
Last modified: 2007-11-30 17:10:30 EST
Description of Problem:
Whenever gpg is used, it gives the warning:
gpg: Warning: using insecure memory!
This "problem" can be "corrected" by installing gpg setuid root so that it can
lock memory into core, preventing it from being swapped out.
Is there a reason that RedHat's gpg installation does not make the gpg binary
setuid root? One could argue that the risk of stealing gpg secrets because of
gpg using insecure memory is less serious than the risk of a possible root
exploit resulting in a security hole in a setuid root executable, but one could
also argue that a program that handles secrets should be allowed to use secure
Version-Release number of selected component (if applicable):
However, this situation has been true as long as gpg has been issuing this
warning. I'm certain that RedHat 7.2 and 7.3 at least give this error. I don't
remember about 7.1, and I don't have anymore 7.1 machines kicking around....
Steps to Reproduce:
1. run gpg
You see the warning message
You decide -- either you shouldn't see the warning message, or this is by design....
I posted this 7 months ago. I'm just wondering why there's been on activity at
all. I don't want to nag; I just want to make sure this isn't overlooked, even
if it is fairly unimportant.
Red Hat Linux is no longer supported by Red Hat, Inc. If you are still
running Red Hat Linux, you are strongly advised to upgrade to a
current Fedora Core release or Red Hat Enterprise Linux or comparable.
Some information on which option may be right for you is available at
Red Hat apologizes that these issues have not been resolved yet. We do
want to make sure that no important bugs slip through the cracks.
Please check if this issue is still present in a current Fedora Core
release. If so, please change the product and version to match, and
check the box indicating that the requested information has been
provided. Note that any bug still open against Red Hat Linux on will be
closed as 'CANTFIX' on September 30, 2006. Thanks again for your help.
This issue is still present in FC5.
Well, actually, the warning was removed from gnupg a long time ago, but I it
still remains the case in Fedora Core 5 that gnupg is installed without the
setuid bit and therefore uses insecure memory. Debian installs gpg setuid root.
I certainly understand why people might be reluctant to install something
setuid unnecessarily, but it should be safe to do so. On the other hand, the
chances of password information actually getting written to a swap file are
pretty slim, and anyone who would have access to mine through a swap file would
also have acess to install a trojan gpg, so maybe this is just worth closing
(In reply to comment #3)
> This issue is still present in FC5.
> Well, actually, the warning was removed from gnupg a long time ago, but I it
> still remains the case in Fedora Core 5 that gnupg is installed without the
> setuid bit and therefore uses insecure memory.
This is not correct. The warning is still in place in GnuPG. The reason the
warning does not show up under FC5 is that FC5 allows for a non-root process
to lock (a small amount of) memory. Thus on FC5, GnuPG does not need to be
I don't recall which FC began to allow non-root memory locking, but it was
certainly present in FC3.
Thanks, you're right. According to the mlock manual page, this was added in