SigSpoof: Spoofing signatures in GnuPG, Enigmail, GPGTools and python-gnupg
neopg.io
neopg.io
For Users
Remove verbose from gpg.conf, if you have it.
Do not use gpg --verbose on the command line.
Upgrade to GnuPG 2.2.8 or GnuPG 1.4.23
Upgrade to Enigmail 2.0.7
Upgrade to GPGTools 2018.3
For developers Upgrade to python-gnupg 0.4.3
Call gpg with --no-verbose to disable the attack.
Use a dedicated pipe for --status-fd, and do not share it with stderr.
If this is not easy (or even possible) due to the framework or target platform, consider --batch --log-file FILE to redirect the stderr output, where FILE can be /dev/null, too. Thanks to Patrick Brunschwig for this idea!
Or, the --status-file FILE option could be used to direct the status lines to a temporary file.If one relies on a command line tool for doing this, wouldn't it be safer to have a command line switch which lets the program exit with 0 if the verification succeeds and another value if it fails?
Has anyone an elif what the fix would be? Just altering a switch (which I suspect) would be a band-aid, imho.
I just want to add that if you have to parse command output, enforce the output format as well as you can. The --verbose bug really shouldn’t have happened.
That happens. It doesn't need to a standard format like that however. Some command like tools add a porcelain option that produces output for scripting (ie no ansi color codes, easy to parse, etc). That works well too.
Lots of bugs caused by that sort of thing, unfortunately it's all we have for GPG.
EDIT: It appears I was mistaken, the "GPGME" project also exists. I am not sure if that has some serious deficiencies that mean it's not used more often never the less, it's not the only option.
Am I being naive here?