What more could you want?
Archive for March, 2009
Warning: using insecure memory!
Mar 21st
This nearly scared the life out of me:
[chuck@thom ~]$ gpg -v Warning: using insecure memory! gpg: Go ahead and type your message ...
I was on a FreeBSD virtual machine, and had just installed GnuPG. As it turns out, I rtfm’d and found the solution:
In the “BUGS” section of the gpg(1) man page:
On many systems this program should be installed as setuid(root). This is necessary to lock memory pages. Locking memory pages prevents the operating system from writing memory pages (which may contain passphrases or other sensitive material) to disk. If you get no warning message about insecure memory your operating system supports locking without being root. The program drops root privileges as soon as locked memory is allocated.
Here are the steps I took to make the gpg2 binary setuid:
$ which gpg /usr/local/bin/gpg $ ls -lah /usr/local/bin/gpg lrwxr-xr-x 1 root wheel 4B Feb 3 04:36 /usr/local/bin/gpg -> gpg2 $ chmod 4755 /usr/local/bin/gpg2 $ ls -lah /usr/local/bin/gpg2 -rwsr-xr-x 1 root wheel 576K Feb 3 04:36 /usr/local/bin/gpg2
So, sure enough, after setting the gpg2 binary to be setuid, everything worked:
[chuck@thom ~]$ gpg -v gpg: Go ahead and type your message ...
Now I can safely, securely use gpg on FreeBSD.
/cs