Package: dumpasn1 Version: 20101112-2 Severity: normal Tags: patch Dear Maintainer,
The CPPFLAGS hardening flags are missing because they are not
used in debian/rules. For more hardening information please have
a look at [1], [2] and [3].
The following patch fixes the issue. It also uses $(CFLAGS) when
linking which might be necessary in the future (some link options
require compiling).
diff -Nru dumpasn1-20101112/debian/rules dumpasn1-20101112/debian/rules
--- dumpasn1-20101112/debian/rules 2012-05-11 18:03:35.000000000 +0200
+++ dumpasn1-20101112/debian/rules 2012-05-13 04:02:50.000000000 +0200
@@ -5,10 +5,10 @@
dh $@ --parallel
dumpasn1: dumpasn1.o
- $(CC) -o dumpasn1 dumpasn1.o $(LDFLAGS)
+ $(CC) -o dumpasn1 dumpasn1.o $(CFLAGS) $(LDFLAGS)
dumpasn1.o: dumpasn1.c
- $(CC) -o dumpasn1.o -DDEBIAN $(CFLAGS) -c dumpasn1.c
+ $(CC) -o dumpasn1.o -DDEBIAN $(CPPFLAGS) $(CFLAGS) -c dumpasn1.c
override_dh_auto_build: dumpasn1
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/dumpasn1
/usr/bin/dumpasn1:
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
[4]: http://ruderich.org/simon/blhc/
--
+ privacy is necessary
+ using gnupg http://gnupg.org
+ public key id: 0x92FEFDB7E44C32F9
signature.asc
Description: Digital signature

