Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: GnuPG: devel

BUG: Segmentation fault with gnupg-1.4.x on Solaris with "--debug 16"

 

 

GnuPG devel RSS feed   Index | Next | Previous | View Threaded


m.heneka at googlemail

Aug 19, 2008, 7:33 AM

Post #1 of 2 (120 views)
Permalink
BUG: Segmentation fault with gnupg-1.4.x on Solaris with "--debug 16"

Hello,

I discovered a bug in gnupg-1.4.x and possibly in later versions. The
segmentation fault occurs on Solaris when decrypting/encrypting a file with
the debug mode for IO-buffers ("--debug 16"). The problem is in the
following line of "iobuf.c: iofbuf_close()":

log_debug ("iobuf-%d.%d: close `%s'\n", a->no, a->subno, a->desc);

An IO-buffer with desc==NULL causes the crash. The glibc feature
"printf("%s", NULL);" is not available in the Solaris implementation of
glibc. The bug can be fixed with:

log_debug ("iobuf-%d.%d: close `%s'\n", a->no, a->subno, a->desc ? a->desc :
"(null)" );

or by introducing a function gpg_nonullstr() like in
http://blogs.gnome.org/desrt/2007/10/01/gcc%20feature%20breaks%20glibc%20feature/#comment-382

This article describes problems with this glibc feature. See also the links
specific to Solaris.

M. Heneka


_______________________________________________
Gnupg-devel mailing list
Gnupg-devel[at]gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-devel


wk at gnupg

Aug 19, 2008, 12:00 PM

Post #2 of 2 (102 views)
Permalink
Re: BUG: Segmentation fault with gnupg-1.4.x on Solaris with "--debug 16" [In reply to]

On Tue, 19 Aug 2008 16:33, m.heneka[at]googlemail.com said:

> log_debug ("iobuf-%d.%d: close `%s'\n", a->no, a->subno, a->desc);
>
> An IO-buffer with desc==NULL causes the crash. The glibc feature

Right. Fixed in svn revision 4816.

> This article describes problems with this glibc feature. See also the links

It is well known that old libcs segfault on this, although POSIX does
not require such a behaviopus (iirc, it is undefined). This is the same
class of problems as with passing a negative value to isfoo() - glibc is
robust enough to work correctly but HPUX will always segfault. Anyway,
it needs to be fixed as we aim for portable software.

Thanks,

Werner


--
Linux-Kongress 2008 + Hamburg + October 7-10 + www.linux-kongress.org

Die Gedanken sind frei. Auschnahme regelt ein Bundeschgesetz.


_______________________________________________
Gnupg-devel mailing list
Gnupg-devel[at]gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-devel

GnuPG devel RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.