Package: scheme9
Version: 2012.07.10-1
Severity: normal
Tags: patch

Dear Maintainer,

The CFLAGS hardening flags are missing because they are
ovewrriten in Makefile. For more hardening information please
have a look at [1], [2] and [3].

The attached patch fixes the issue.

To check if all flags were correctly enabled you can use
`hardening-check` from the hardening-includes package and check
the build log with `blhc` (hardening-check doesn't catch
everything):

    $ hardening-check /usr/bin/s9
    /usr/bin/s9:
     Position Independent Executable: no, normal executable!
     Stack protected: yes
     Fortify Source functions: yes (some protected functions found)
     Read-only relocations: yes
     Immediate binding: no not found!

(Position Independent Executable and Immediate binding is not
enabled by default.)

Use find -type f \( -executable -o -name \*.so\* \) -exec
hardening-check {} + on the build result to check all files.

Regards,
Simon

[1]: https://wiki.debian.org/ReleaseGoals/SecurityHardeningBuildFlags
[2]: https://wiki.debian.org/HardeningWalkthrough
[3]: https://wiki.debian.org/Hardening
-- 
+ privacy is necessary
+ using gnupg http://gnupg.org
+ public key id: 0x92FEFDB7E44C32F9
Description: Use CFLAGS from environment (dpkg-buildflags).
 Necessary for hardening flags.
.
 Don't specify -O2 and -g (on by default) so they can be overwritten by
 dpkg-buildflags.
Author: Simon Ruderich <si...@ruderich.org>
Last-Update: 2012-07-13

--- scheme9-2012.07.10.orig/Makefile
+++ scheme9-2012.07.10/Makefile
@@ -27,7 +27,7 @@ BUILD_ENV=	env S9FES_LIBRARY_PATH=.:lib:
 
 # Override default compiler and flags
 CC=	gcc
-CFLAGS=	-g -Wall -ansi -pedantic -O2
+CFLAGS+=	-Wall -ansi -pedantic
 
 prefix=/usr/local
 exec_prefix=$(prefix)

Attachment: signature.asc
Description: Digital signature

Reply via email to