Bug 472941

Summary: Crashes when doing unsetenv() with empty env
Product: [Fedora] Fedora Reporter: Bastien Nocera <bnocera>
Component: glibcAssignee: Jakub Jelinek <jakub>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: 10CC: drepper, jakub
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-12-10 04:37:11 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:

Description Bastien Nocera 2008-11-25 18:34:42 UTC
glibc-2.9-2.x86_64

This crashes inside the glibc:
#include <stdlib.h>

int main (int argc, char **argv)
{
      clearenv ();
      unsetenv("FOO");
      return 0;
}

==14998== Invalid read of size 4
==14998==    at 0xB3A53F: unsetenv (setenv.c:295)
==14998==    by 0x4008326: unsetenv (mc_replace_strmem.c:760)
==14998==    by 0x8048415: main (env.c:6)
==14998==  Address 0x0 is not stack'd, malloc'd or (recently) free'd

Comment 1 Ulrich Drepper 2008-12-02 01:41:21 UTC
Patch checked in upstream.

Comment 2 Jakub Jelinek 2008-12-08 14:52:42 UTC
Please try http://kojipkgs.fedoraproject.org/packages/glibc/2.9/3/

Comment 3 Fedora Update System 2008-12-08 20:34:53 UTC
glibc-2.9-3 has been submitted as an update for Fedora 10.
http://admin.fedoraproject.org/updates/glibc-2.9-3

Comment 4 Fedora Update System 2008-12-10 04:36:55 UTC
glibc-2.9-3 has been pushed to the Fedora 10 stable repository.  If problems still persist, please make note of it in this bug report.