Bug 1059396

Summary: cross-gcc may be affected by libiberty
Product: [Fedora] Fedora Reporter: Toshio Ernie Kuratomi <a.badger>
Component: cross-gccAssignee: David Howells <dhowells>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: dan, dhowells
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-03-27 15:26:45 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: 1059368    
Bug Blocks: 849693    

Description Toshio Ernie Kuratomi 2014-01-29 18:44:41 UTC
Description of problem:

libiberty is a collection of functions that are used in a variety of GNU projects. It is designed to be bundled into consuming applications. Unfortunately, one of the functions provided by libiberty has recently been the subject of a CVE https://bugzilla.redhat.com/show_bug.cgi?id=849693 . Whenever that happens we have to have packagers of all the consuming applications analyze their package's use of libiberty to decide whether they're affected or not. If affected, the bundled libiberty code needs to be updated.

You can fix this issue in one of the following ways:

* Patch the libiberty _objalloc_alloc() code to perform the required overflow checking. This may be less work than analyzing the code to see if it's vulnerable and may also save you from future headaches because you might not know if your upstream has changed its code to start using the _objalloc_alloc() function in the future. You can find libiberty upstream's patch for this issue here: ​
http://gcc.gnu.org/viewcvs/gcc/trunk/libiberty/objalloc.c?r1=184997&r2=191413
 
* Analyze your package's code to see if the _objalloc_alloc() function in libiberty/objalloc.c is vulnerable. If so, check whether your package compiles it in and uses the _objalloc_alloc() from libiberty.  If so, you may further analyze the package code to see if invalid input can be passed to _objalloc_alloc() and if so, if that input can cause any problems for the application. If that's all true, then you must fix the code in question. If your code is not affected you can close this bug with an explanation of why the _objalloc_alloc() flaw doesn't affect your code.  You can verify if your code makes use of _objalloc_alloc() using this recipe:


# yum install ${Your packages' and their subpackages'}-debuginfo
$ nm /usr/lib/debug/usr/bin/${Your packages' binaries}.debug | grep -w _objalloc_alloc
00000000005d85c0 T _objalloc_alloc

If you see lines containing _objalloc_alloc then your code makes use of the problematic code and is potentially affected.

Comment 1 David Howells 2014-03-27 15:26:45 UTC
cross-gcc takes the gcc srpm code and patches, preps them and then builds them for different arches.  Therefore if gcc doesn't suffer from this, I don't think cross-gcc will either.