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

Bug 337415

Summary: net-analyzer/fwlogwatch _FORTIFY_SOURCE indicates presence of overflow
Product: Gentoo Linux Reporter: Diego Elio Pettenò (RETIRED) <flameeyes>
Component: Current packagesAssignee: Gentoo Netmon project <netmon>
Status: RESOLVED FIXED    
Severity: minor CC: hardened, jer
Priority: Normal    
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-15 06:46:22 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-15 06:46:59 UTC
Created attachment 247390 [details]
Build log
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2010-11-30 21:02:22 UTC
1.2 fairs no better:

In file included from /usr/include/string.h:640,
                 from response.c:7:
In function ‘strncat’,
    inlined from ‘react’ at response.c:120:
/usr/include/bits/string3.h:154: warning: call to __builtin___strncat_chk might overflow destination buffer
In function ‘strncat’,
    inlined from ‘react’ at response.c:124:
/usr/include/bits/string3.h:154: warning: call to __builtin___strncat_chk might overflow destination buffer
In function ‘strncat’,
    inlined from ‘react’ at response.c:131:
/usr/include/bits/string3.h:154: warning: call to __builtin___strncat_chk might overflow destination buffer
In function ‘strncat’,
    inlined from ‘react’ at response.c:138:
/usr/include/bits/string3.h:154: warning: call to __builtin___strncat_chk might overflow destination buffer
In function ‘strncat’,
    inlined from ‘react’ at response.c:145:
/usr/include/bits/string3.h:154: warning: call to __builtin___strncat_chk might overflow destination buffer
Comment 3 Jeroen Roovers (RETIRED) gentoo-dev 2011-08-01 02:31:23 UTC
Fixed in 1.2-r1. Patch sent upstream. Now what?
Comment 4 Jeroen Roovers (RETIRED) gentoo-dev 2011-08-01 17:26:51 UTC
Upstream agrees that the patch is superficially correct but glosses over the fact that the buffer in question isn't actually ever overflown, since the source is never larger than the destination, but that _FORTIFY_SOURCE simply doesn't check that context well enough and simply compares the buffer size to write with the size of the destination buffer, which is indeed off by one, but not to any effect.
Comment 5 Jeroen Roovers (RETIRED) gentoo-dev 2011-12-16 16:48:07 UTC
Fixed in 1.3.