Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 340253

Summary: dev-libs/libtar _FORTIFY_SOURCE indicates presence of overflow
Product: Gentoo Linux Reporter: Diego Elio Pettenò (RETIRED) <flameeyes>
Component: Current packagesAssignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it <maintainer-needed>
Status: RESOLVED FIXED    
Severity: major CC: hardened, signals
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 259417    
Attachments: Build log
Fix buffer overflow on ustar magic field
ebuild to apply the magic overflow patch

Description Diego Elio Pettenò (RETIRED) gentoo-dev 2010-10-09 12:16:01 UTC
You're receiving this bug because the package in Summary has produced _FORTIFY_SOURCE related warnings indicating the presence of a sure overflow in a static buffer.

Even though this is not always an indication of a security problem it might even be. So please check this out ASAP.

By the way, _FORTIFY_SOURCE is disabled when you disable optimisation, so don't try finding out the cause using -O0.

Thanks,
Your friendly neighborhood tinderboxer
Comment 1 Diego Elio Pettenò (RETIRED) gentoo-dev 2010-10-09 12:16:13 UTC
Created attachment 250013 [details]
Build log
Comment 2 Kevin McCarthy (RETIRED) gentoo-dev 2011-01-29 19:56:58 UTC
Created attachment 261035 [details, diff]
Fix buffer overflow on ustar magic field
Comment 3 Kevin McCarthy (RETIRED) gentoo-dev 2011-01-29 19:57:25 UTC
Created attachment 261036 [details]
ebuild to apply the magic overflow patch
Comment 4 Kevin McCarthy (RETIRED) gentoo-dev 2011-01-29 20:00:43 UTC
In encode.c there was an attempt to strncpy the 8 character string "ustar  " into a 6 character field in the ustar header. The ustar format calls for a 6 character field that contains "ustar" terminated by a null, so I've changed it to that.
Comment 5 Samuli Suominen (RETIRED) gentoo-dev 2011-02-11 21:10:23 UTC
applied in -r4