Summary: | net-analyzer/fwlogwatch _FORTIFY_SOURCE indicates presence of overflow | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Diego Elio Pettenò (RETIRED) <flameeyes> |
Component: | Current packages | Assignee: | 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)
2010-09-15 06:46:22 UTC
Created attachment 247390 [details]
Build log
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 Fixed in 1.2-r1. Patch sent upstream. Now what? 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. Fixed in 1.3. |