lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Tue, 5 Dec 2006 23:10:58 +1100 (EST)
From: Damien Miller <djm@...drot.org>
To: Werner Koch <wk@...pg.org>
Cc: bugtraq@...urityfocus.com
Subject: Re: GnuPG 1.4 and 2.0 buffer overflow

On Mon, 27 Nov 2006, Werner Koch wrote:

>             GnuPG 1.4 and 2.0 buffer overflow
>            ==================================
[snip]
> 
> The code in question has been introduced on July 1, 1999 and is a
> pretty obvious bug.  make_printable_string is supposed to replace
> possible dangerous characters from a prompt and returns a malloced
> string.  Thus this string may be longer than the orginal one; the
> buffer for the prompt has only be allocated at the size of the original
> string - oops.  Note, that using snprintf would not have helped in
> this case.  How I wish C-90 had introduced asprintf or at least it
> would be available on more platforms.

I think that this is a classic case of a security problem introduced
by attempting to code for the "lowest common denominator" rather than
picking the best API (or the one most conducive to security) and coding
to that.

Why not just pull an asprintf() implementation into gnupg? You can get a
free (MIT licensed) one from OpenSSH's portability code, and I'm sure it
is not the only one.

-d

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ