[Announce] [security fix] Libksba 1.3.2 for GnuPG released

Werner Koch wk at gnupg.org
Tue Nov 25 13:40:02 CET 2014


Hello!

I am pleased to announce version 1.3.2 of Libksba.

This is a *security fix* release and all users of Libksba should update
to this version.  Note that GnuPG 2.x makes use of Libksba and thus all
user of GnuPG 2.x need to install this new version of libksba and at
least restart the dirmngr process.

Libksba is an X.509 and CMS (PKCS#7) library.  It is for example
required by the S/MIME part of GnuPG-2 (gpgsm and dirmngr).  The only
build requirement for Libksba itself is the libgpg-error package.  There
are no other dependencies; actual cryptographic operations need to be
done by the user.  Libksba is distributed under the LGPLv3+/GPLv2+.
There are no user tools accompanying this software, thus it is mostly
relevant to developers.

You may download the library and its OpenPGP signature from:

  ftp://ftp.gnupg.org/gcrypt/libksba/libksba-1.3.2.tar.bz2     (587k)
  ftp://ftp.gnupg.org/gcrypt/libksba/libksba-1.3.2.tar.bz2.sig

The SHA-1 checksum is

37d0893a587354af2b6e49f6ae701ca84f52da67  libksba-1.3.2.tar.bz2


Noteworthy changes in version 1.3.2
===================================

 * Fixed a buffer overflow in ksba_oid_to_str.


Impact of the security bug
==========================

By using special crafted S/MIME messages or ECC based OpenPGP data, it
is possible to create a buffer overflow.  The bug is not easy to exploit
because there only 80 possible values which can be used to overwrite
memory.  However, a denial of service is possible and someone may come
up with other clever attacks.  Thus this should be fix.

Affected versions: All Libksba versions < 1.3.2

Background: Yesterday Hanno Böck found an invalid memory access in the
2.1 branch of GnuPG by conveying a malformed OID as part of an ECC key.
It turned out that this bug has also been in libksba ever since and
affects at least gpgsm and dirmngr.  The code to convert an OID to its
string representation has an obvious error of not considering an invalid
encoding for arc-2.  A first byte of 0x80 can be used to make a value of
less then 80 and we then subtract 80 from it as required by the OID
encoding rules.  Due to the use of an unsigned integer this results in a
pretty long value which won't fit anymore into the allocated buffer.
The actual fix for lib Libksba is commit f715b9e.


Support
=======

For help on developing with Libksba you should read the included manual
and optional ask on the gnupg-devel mailing list [1].  A listing with
commercial support offers for GnuPG and related software is available at
the GnuPG web site [2].

The driving force behind the development of GnuPG is my company g10 Code
GmbH.  Maintenance and improvement of GnuPG and related software takes
up most of my time.  To allow me to continue this work, I kindly asks to
either purchase a support contract, engage g10 Code for custom work, or
to donate money:

  https://gnupg.org/donate/


Thanks
======

Thanks to Hanno Böck for taking the time to run fuzzing tests on GnuPG
and reporting them.



Happy hacking,

  Werner


[1] https://lists.gnupg.org/mailman/listinfo/gnupg-devel
[2] https://gnupg.org/service.html

--
Die Gedanken sind frei.  Ausnahmen regelt ein Bundesgesetz.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 180 bytes
Desc: not available
URL: </pipermail/attachments/20141125/cf341ca8/attachment.sig>
-------------- next part --------------
_______________________________________________
Gnupg-announce mailing list
Gnupg-announce at gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-announce


More information about the Gnupg-users mailing list