Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.

Bug 1001689

Summary: multiple magic_load() w/ non-default database segfault
Product: [Fedora] Fedora Reporter: Jitka Plesnikova <jplesnik>
Component: fileAssignee: Jan Kaluža <jkaluza>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: jkaluza
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
URL: http://bugs.gw.com/view.php?id=248
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-09-09 05:29:26 UTC Type: Bug
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: 985933, 992602    

Description Jitka Plesnikova 2013-08-27 14:09:05 UTC
perl-File-LibMagic test failed 

valgrind output:
ok 11 - MIME t/samples/foo.c - custom magic file
==5168== Invalid write of size 8
==5168==    at 0x7394D23: ??? (in /usr/lib64/libmagic.so.1.0.0)
==5168==    by 0x7395B84: ??? (in /usr/lib64/libmagic.so.1.0.0)
==5168==    by 0x73972B4: ??? (in /usr/lib64/libmagic.so.1.0.0)
==5168==    by 0x7397EDE: file_apprentice (in /usr/lib64/libmagic.so.1.0.0)
==5168==    by 0x718B862: XS_File__LibMagic_magic_load (LibMagic.xs:129)
==5168==    by 0x4EF4355: Perl_pp_entersub (in /usr/lib64/libperl.so.5.18.1)
==5168==    by 0x4EEC78D: Perl_runops_standard (in /usr/lib64/libperl.so.5.18.1)
==5168==    by 0x4E83CBF: perl_run (in /usr/lib64/libperl.so.5.18.1)
==5168==    by 0x400D28: ??? (in /usr/bin/perl)
==5168==    by 0x617BD64: (below main) (in /usr/lib64/libc-2.18.so)
==5168==  Address 0x0 is not stack'd, malloc'd or (recently) free'd
==5168== 
==5168== 
==5168== Process terminating with default action of signal 11 (SIGSEGV)
==5168==  Access not within mapped region at address 0x0
==5168==    at 0x7394D23: ??? (in /usr/lib64/libmagic.so.1.0.0)
==5168==    by 0x7395B84: ??? (in /usr/lib64/libmagic.so.1.0.0)
==5168==    by 0x73972B4: ??? (in /usr/lib64/libmagic.so.1.0.0)
==5168==    by 0x7397EDE: file_apprentice (in /usr/lib64/libmagic.so.1.0.0)
==5168==    by 0x718B862: XS_File__LibMagic_magic_load (LibMagic.xs:129)
==5168==    by 0x4EF4355: Perl_pp_entersub (in /usr/lib64/libperl.so.5.18.1)
==5168==    by 0x4EEC78D: Perl_runops_standard (in /usr/lib64/libperl.so.5.18.1)
==5168==    by 0x4E83CBF: perl_run (in /usr/lib64/libperl.so.5.18.1)
==5168==    by 0x400D28: ??? (in /usr/bin/perl)
==5168==    by 0x617BD64: (below main) (in /usr/lib64/libc-2.18.so)


Debian have already found the source of the problem (see http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=708281). 
It failed due to multiple magic_load() w/ non-default database (http://bugs.gw.com/view.php?id=248). The bug is fixed by upstream.

Comment 1 Jan Kaluža 2013-09-09 05:29:26 UTC
Fixed in file-5.14-13.