Bug 1178764 - gnupg2: double free in p12_build()
Summary: gnupg2: double free in p12_build()
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 1178774
Blocks: 1178767
TreeView+ depends on / blocked
 
Reported: 2015-01-05 13:11 UTC by Vasyl Kaigorodov
Modified: 2021-02-17 05:52 UTC (History)
5 users (show)

Fixed In Version: GnuPG 2.1.2
Clone Of:
Environment:
Last Closed: 2015-03-09 16:36:39 UTC
Embargoed:


Attachments (Terms of Use)

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

agent/minip12.c:
...
2178       cd = jnlib_iconv_open (charset, "utf-8");
2179       if (cd == (jnlib_iconv_t)(-1))
2180         {
2181           log_error ("can't convert passphrase to"
2182                      " requested charset `%s': %s\n",
2183                      charset, strerror (errno));
2184           gcry_free (pwbuf);
2185           goto failure;
2186         }
...
2268  failure:
2269   if (pwbuf)
2270     {
2271       wipememory (pwbuf, pwbufsize);
2272       gcry_free (pwbuf);
2273     }
...

gcry_free() is called twice on 'pwbuf'.

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

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

Comment 1 Vasyl Kaigorodov 2015-03-09 16:36:39 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/.


Note You need to log in before you can comment on or make changes to this bug.