Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 337059 - dev-embedded/tigcc _FORTIFY_SOURCE indicates presence of overflow
Summary: dev-embedded/tigcc _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
: High major (vote)
Assignee: Embedded Team (OBSOLETE)
URL:
Whiteboard:
Keywords:
: 364315 (view as bug list)
Depends on: 412487
Blocks: 151569 fortify-source
  Show dependency tree
 
Reported: 2010-09-13 10:48 UTC by Diego Elio Pettenò (RETIRED)
Modified: 2012-04-30 02:54 UTC (History)
2 users (show)

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


Attachments
B (tigcc-0.96_beta7:20100913-031811.log,973.15 KB, text/plain)
2010-09-13 10:49 UTC, Diego Elio Pettenò (RETIRED)
Details
tios-signature-fix.patch (tios-signature-fix.patch,401 bytes, patch)
2012-04-23 22:22 UTC, Chris Reffett (RETIRED)
Details | Diff

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-13 10:48:24 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-13 10:49:18 UTC
Created attachment 247111 [details]
B
Comment 2 Pacho Ramos gentoo-dev 2012-03-19 11:47:30 UTC
*** Bug 364315 has been marked as a duplicate of this bug. ***
Comment 3 Chris Reffett (RETIRED) gentoo-dev Security 2012-04-23 22:22:43 UTC
Created attachment 309881 [details, diff]
tios-signature-fix.patch

The cause of the buffer overflow warnings is that sources/ld-tigcc/formats/tios.h has char Signature[8], when it expects an 8-character input. This is overflowing because there needs to be 9 elements allocated to include room for the null-terminator of the string. I think this patch is sufficient to fix it (I'm not familiar with how to use FORTIFY_SOURCE, but this eliminates the warnings about "warning: call to __builtin___strcpy_chk will always overflow destination buffer". There are also errors about "warning: array subscript is above array bounds" and likewise for below array bounds, I'll look at those next.
Comment 4 SpanKY gentoo-dev 2012-04-30 02:54:07 UTC
new beta8 version doesn't warn for me