Bug 176753

Summary: gpg segv when decrypting file with latest glibc
Product: [Fedora] Fedora Reporter: Russell Coker <rcoker>
Component: glibcAssignee: Jakub Jelinek <jakub>
Status: CLOSED RAWHIDE QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: maxim.britov, nalin, wtogami
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: 2.3.90-26 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-01-04 11:08:39 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:    
Bug Blocks: 150222    

Description Russell Coker 2006-01-01 11:40:24 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8) Gecko/20051118 Fedora/1.5-0.5.0.rc3 Firefox/1.5

Description of problem:
Program received signal SIGSEGV, Segmentation fault.
0x00d23e46 in ctermid () from /lib/libc.so.6
(gdb) bt
#0  0x00d23e46 in ctermid () from /lib/libc.so.6
#1  0x00b9e748 in sha384_get_info () from /usr/bin/gpg
#2  0x00b9e87e in sha384_get_info () from /usr/bin/gpg
#3  0x00b9e9f2 in sha384_get_info () from /usr/bin/gpg
#4  0x00b47990 in check_compress_algo () from /usr/bin/gpg
#5  0x00b48b8e in check_compress_algo () from /usr/bin/gpg
#6  0x00b104da in compress_filter_bz2 () from /usr/bin/gpg
#7  0x00b464aa in check_compress_algo () from /usr/bin/gpg
#8  0x00b15da1 in compress_filter_bz2 () from /usr/bin/gpg
#9  0x00b19a5b in compress_filter_bz2 () from /usr/bin/gpg
#10 0x00b19cd1 in compress_filter_bz2 () from /usr/bin/gpg
#11 0x00b5264b in revocation_reason_build_cb () from /usr/bin/gpg
#12 0x00b06d0b in main () from /usr/bin/gpg

Above is a trace-back of the GPG crash.  When running with glibc-2.3.90-18 it works but with glibc-2.3.90-22 it crashes.



Version-Release number of selected component (if applicable):
1.4.2-3.1 and 1.4.2-3

How reproducible:
Always

Steps to Reproduce:
Install Fedora Core 5 test 1 and update the gnupg and glibc packages from rawhide, then gnupg will SEGV on decryption.

To test decryption do:
echo foo | gpg -e -r $KEY > /tmp/enc
gog -d /tmp/enc


Additional info:

Comment 1 Nalin Dahyabhai 2006-01-03 00:21:19 UTC
It looks like ctermid() broke, even though the code looks correct.  Reassigning
to glibc component.

Comment 2 Jakub Jelinek 2006-01-03 09:20:13 UTC
http://sources.redhat.com/ml/libc-hacker/2006-01/msg00008.html
Guess that's the problem, the bug is in the header already from Sep 2004
(i.e. RHEL4, FC3, FC4, rawhide), but only GCC 4.1 got aggressive enough to
optimize out the if (s == NULL) s = name; when s is marked nonnull.

Comment 3 Nalin Dahyabhai 2006-01-03 16:29:29 UTC
*** Bug 176803 has been marked as a duplicate of this bug. ***

Comment 4 Nalin Dahyabhai 2006-01-04 04:13:10 UTC
*** Bug 176842 has been marked as a duplicate of this bug. ***

Comment 5 Jakub Jelinek 2006-01-04 11:08:39 UTC
Should be fixed in glibc-2.3.90-26.