[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#671462: libnova: CFLAGS hardening flags missing



Source: libnova
Version: 0.14.0-2
Severity: normal
Tags: patch

Dear Maintainer,

The CFLAGS hardening flags are missing because ./configure
overwrites them. For more hardening information please have a
look at [1], [2] and [3].

The attached patch fixes the issue, if possible it should be sent
to upstream.

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

    $ hardening-check /usr/bin/libnovaconfig /usr/lib/x86_64-linux-gnu/libnova-0.14.so.0.0.0
    /usr/bin/libnovaconfig:
     Position Independent Executable: no, normal executable!
     Stack protected: no, not found!
     Fortify Source functions: yes
     Read-only relocations: yes
     Immediate binding: no not found!
    /usr/lib/x86_64-linux-gnu/libnova-0.14.so.0.0.0:
     Position Independent Executable: no, regular shared library (ignored)
     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
[4]: http://ruderich.org/simon/blhc/
-- 
+ privacy is necessary
+ using gnupg http://gnupg.org
+ public key id: 0x92FEFDB7E44C32F9
Description: Use CFLAGS from environment (dpkg-buildflags).
 Necessary for hardening flags.
Author: Simon Ruderich <simon@ruderich.org>
Last-Update: 2012-05-04

--- libnova-0.14.0.orig/configure.in
+++ libnova-0.14.0/configure.in
@@ -63,7 +63,7 @@ AC_CHECK_FUNCS([acosl])
 AC_CHECK_FUNCS([asinl])
 AC_CHECK_FUNCS([atan2l])
 
-CFLAGS=-Wall
+CFLAGS="$CFLAGS -Wall"
 
 # Checks for header files.
 AC_HEADER_STDC
--- libnova-0.14.0.orig/configure
+++ libnova-0.14.0/configure
@@ -12529,7 +12529,7 @@ fi
 done
 
 
-CFLAGS=-Wall
+CFLAGS="$CFLAGS -Wall"
 
 # Checks for header files.
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5

Attachment: signature.asc
Description: Digital signature


Reply to: