Bug 1178759

Summary: gnupg2: double free in cmd_readkey()
Product: [Other] Security Response Reporter: Vasyl Kaigorodov <vkaigoro>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED WONTFIX QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: bcl, carnil, falonso, rdieter, tmraz
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: GnuPG 2.1.2 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-03-09 16:36:26 UTC Type: ---
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: 1178774, 1178775, 1178776, 1178777, 1178778, 1178779    
Bug Blocks: 1178767    

Description Vasyl Kaigorodov 2015-01-05 13:04:30 UTC
Double-free issue was reported [1] in gnupg2:

in scd/command.c 'cert' is freed twice on ksba_cert_new() failure:
...
 778   rc = ksba_cert_new (&kc);
 779   if (rc)
 780     {
 781       xfree (cert);
 782       goto leave;
 783     }
...
 803  leave:
 804   ksba_cert_release (kc);
 805   xfree (cert);

Upstream commit that fixes this:
http://git.gnupg.org/cgi-bin/gitweb.cgi?p=gnupg.git;a=commit;h=b0b3803e8c2959dd67ca96debc54b5c6464f0d41

[1]: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=773471

Comment 2 Vasyl Kaigorodov 2015-01-05 13:23:00 UTC
Created gnupg2 tracking bugs for this issue:

Affects: fedora-all [bug 1178774]

Comment 3 Vasyl Kaigorodov 2015-03-09 16:36:26 UTC
Statement:

Red Hat Product Security has rated this issue as having Low security impact. This issue is not currently planned to be addressed in future updates. For additional information, refer to the Issue Severity Classification: https://access.redhat.com/security/updates/classification/.

Comment 4 Fedora Update System 2015-04-18 09:42:02 UTC
gnupg2-2.0.27-1.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 5 Fedora Update System 2015-04-22 22:37:57 UTC
gnupg2-2.0.27-1.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 6 Fedora Update System 2015-04-22 22:43:32 UTC
gnupg2-2.1.2-2.fc22 has been pushed to the Fedora 22 stable repository.  If problems still persist, please make note of it in this bug report.