Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 337415 - net-analyzer/fwlogwatch _FORTIFY_SOURCE indicates presence of overflow
Summary: net-analyzer/fwlogwatch _FORTIFY_SOURCE indicates presence of overflow
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal minor (vote)
Assignee: Gentoo Netmon project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: fortify-source
  Show dependency tree
 
Reported: 2010-09-15 06:46 UTC by Diego Elio Pettenò (RETIRED)
Modified: 2011-12-16 16:48 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Build log (fwlogwatch-1.1-r1:20100915-013444.log,9.41 KB, text/plain)
2010-09-15 06:46 UTC, Diego Elio Pettenò (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
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.