Description of problem: From time to time a package comes up that doesn't use %{_optflags} correctly. It would be nice to detect it at build time (as it can have security consequences). See bug #437331 for an example. Expected results: On a faulty package, this generates output like this, hopefully maintainer would spot that: ... WARNING: File /usr/lib/jvm/java-1.7.0-icedtea-1.7.0.0.x86_64/jre/lib/amd64/xawt/libmawt.so uses these possibly unsafe symbols: 11: 0000000000000000 162 FUNC GLOBAL DEFAULT UNDEF printf.5 (3) 130: 0000000000000000 144 FUNC GLOBAL DEFAULT UNDEF sprintf.5 (3) 282: 0000000000000000 144 FUNC GLOBAL DEFAULT UNDEF fprintf.5 (3) WARNING: File /usr/lib/jvm/java-1.7.0-icedtea-1.7.0.0.x86_64/jre/lib/amd64/xawt/libmawt.so uses these possibly unsafe symbols: 11: 0000000000000000 162 FUNC GLOBAL DEFAULT UNDEF printf.5 (3) 130: 0000000000000000 144 FUNC GLOBAL DEFAULT UNDEF sprintf.5 (3) 282: 0000000000000000 144 FUNC GLOBAL DEFAULT UNDEF fprintf.5 (3) *************************************************************************** The above warnings might indicate that FORTIFY_SOURCE is not used correctly Possible causes: 1.) %optflags are not passed to the compiler 2.) Source files don't include the relevant headers *************************************************************************** Additional info: If this can not be enabled by default, at least the script should be shipped with rpm-build, similarly to check-rpaths, and can be made default in rpmdevtools generated rpmmacros, by including in __os_install_post or __arch_install_post. Apart from cases where optflags are not passed, this also complains on cases where *printf calls were not replaced with functions that check the arguments (length for buffer overflow protection, and whether format string containing "%n" is in read only memory for format string attack protection). This happens when people use *printf, but not unclude <stdio.h> -- maintainers should fix the code as this is insecure. See the attachment for the script.
Created attachment 298147 [details] Check for incorrect FORTIFY_SOURCE use
Changing version to '9' as part of upcoming Fedora 9 GA. More information and reason for this action is here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping
This message is a reminder that Fedora 9 is nearing its end of life. Approximately 30 (thirty) days from now Fedora will stop maintaining and issuing updates for Fedora 9. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as WONTFIX if it remains open with a Fedora 'version' of '9'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version prior to Fedora 9's end of life. Bug Reporter: Thank you for reporting this issue and we are sorry that we may not be able to fix it before Fedora 9 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora please change the 'version' of this bug to the applicable version. If you are unable to change the version, please add a comment here and someone will do it for you. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete. The process we are following is described here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Fedora 9 changed to end-of-life (EOL) status on 2009-07-10. Fedora 9 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. Thank you for reporting this bug and we are sorry it could not be fixed.
This package has changed ownership in the Fedora Package Database. Reassigning to the new owner of this component.
This is ancient. Does anyone still care? Closing. Please reopen if you do.