Bug 1242652

Summary: gpg2 hang when encrypting to a sign-only key (?)
Product: [Fedora] Fedora Reporter: Miloslav Trmač <mitr>
Component: gnupg2Assignee: Tomas Mraz <tmraz>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 22CC: bcl, jamielinux, tmraz
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 2.1.7-1.fc23 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-08-19 08:25:28 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1239813    
Attachments:
Description Flags
signonly.pub
none
signonly.sec none

Description Miloslav Trmač 2015-07-13 21:05:55 UTC
Created attachment 1051514 [details]
signonly.pub

Version-Release number of selected component (if applicable):
gnupg2-2.1.5-1.fc22.x86_64


Steps to Reproduce:
1. mkdir y
2. GNUPGHOME=$(pwd)/y gpg2 --import - < tests/keys/signonly.pub 
3. GNUPGHOME=$(pwd)/y gpg2 --import - < tests/keys/signonly.sec
4. echo Hello > in
5. GNUPGHOME=$(pwd)/y gpg2 --encrypt --always-trust -r 15E7CE9BF1771A4ABC550B31F540A569CB935A42 --output out -- in

Actual results:
gpg2 consumes 100% CPU, per bug 1239813 apparently indefinitely

Expected results:
Something like what happens with s/gpg2/gpg/g:
> gpg: 15E7CE9BF1771A4ABC550B31F540A569CB935A42: skipped: unusable public key
> gpg: in: encryption failed: unusable public key

Additional info:
This breaks pygpgme test suite / build.

Comment 1 Miloslav Trmač 2015-07-13 21:06:19 UTC
Created attachment 1051515 [details]
signonly.sec

Comment 2 Fedora Update System 2015-08-13 14:58:58 UTC
gnupg2-2.1.7-1.fc23 has been submitted as an update for Fedora 23.
https://admin.fedoraproject.org/updates/gnupg2-2.1.7-1.fc23

Comment 3 Fedora Update System 2015-08-13 14:59:05 UTC
gnupg2-2.1.7-1.fc22 has been submitted as an update for Fedora 22.
https://admin.fedoraproject.org/updates/gnupg2-2.1.7-1.fc22

Comment 4 Fedora Update System 2015-08-15 02:09:25 UTC
Package gnupg2-2.1.7-1.fc22:
* should fix your issue,
* was pushed to the Fedora 22 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing gnupg2-2.1.7-1.fc22'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2015-13444/gnupg2-2.1.7-1.fc22
then log in and leave karma (feedback).

Comment 5 Miloslav Trmač 2015-08-18 21:22:15 UTC
FWIW, confirmed 2.1.7-1.fc24 fixes it. Thanks!

Comment 6 Fedora Update System 2015-08-19 08:25:28 UTC
gnupg2-2.1.7-1.fc22 has been pushed to the Fedora 22 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 7 Fedora Update System 2015-08-27 17:59:42 UTC
gnupg2-2.1.7-1.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.