Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 337446 - media-sound/subtract_wave _FORTIFY_SOURCE indicates presence of overflow
Summary: media-sound/subtract_wave _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: Gentoo Sound Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: fortify-source
  Show dependency tree
 
Reported: 2010-09-15 08:10 UTC by Diego Elio Pettenò (RETIRED)
Modified: 2011-04-26 13:02 UTC (History)
1 user (show)

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


Attachments
Build log (substract_wave-0.3:20100915-075909.log,3.95 KB, text/plain)
2010-09-15 08:10 UTC, Diego Elio Pettenò (RETIRED)
Details
Patch to substract_wave-0.3.ebuild to use sed to convert offending strcpy into memcpy (substract_wave-0.3.ebuild.patch,426 bytes, patch)
2010-09-16 04:07 UTC, Kevin Pyle
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-15 08:10:03 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 08:10:44 UTC
Created attachment 247425 [details]
Build log
Comment 2 Kevin Pyle 2010-09-16 04:07:34 UTC
Created attachment 247543 [details, diff]
Patch to substract_wave-0.3.ebuild to use sed to convert offending strcpy into memcpy

Upstream uses strcpy to fill in structure fields that are not meant to be null terminated.  Fortunately, strcpy is used in only five places in the file.  Four of them need to be changed, and one of them uses a variable string (and is a poor reimplementation of strdup, but that is not relevant here).  This sed expression matches the four offending strcpy that copy constant strings and converts them into a memcpy that uses the sizeof the destination as its copy-count.  At present, all such sizes are equal to 4 (see $S/wave_header.h), and all input strings are four characters.