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

Bug 337365

Summary: media-radio/xastir _FORTIFY_SOURCE indicates presence of overflow
Product: Gentoo Linux Reporter: Diego Elio Pettenò (RETIRED) <flameeyes>
Component: Current packagesAssignee: Thomas Beierlein <tomjbe>
Status: RESOLVED FIXED    
Severity: major CC: hardened
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 259417    
Attachments: Build log

Description Diego Elio Pettenò (RETIRED) gentoo-dev 2010-09-14 21:21:51 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-09-14 21:22:05 UTC
Created attachment 247356 [details]
Build log
Comment 2 Thomas Beierlein gentoo-dev 2010-09-20 16:17:30 UTC
Looks like an false positive. The code in question is:

rac_record racdata;
...
rc = fgets((char *)&racdata, sizeof(racdata), fdb);

That looks perfectly legal to me, but the __bos macro seems to get the size of the buffer wrong (counting the struct members and checking sizeof() gives the same value as used by the program - 480).

Any idea to give the compiler a simple hint about the size of the buffer?
Comment 3 Thomas Beierlein gentoo-dev 2010-09-24 17:51:58 UTC
+*xastir-1.9.8-r1 (24 Sep 2010)
+
+  24 Sep 2010; Thomas Beierlein <tomjbe@gentoo.org> +xastir-1.9.8-r1.ebuild,
+  +files/xastir-1.9.8-fortify.diff:
+  Fix for bug #337365 (Thanks Diego for reporting) and fix installdir for
+  doc files
+