Bug#663618: libmusicbrainz-2.1: CPPFLAGS hardening flags missing
Package: libmusicbrainz-2.1
Version: 2.1.5-6.2
Severity: important
Tags: patch
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Dear Maintainer,
The CPPFLAGS hardening flags are missing because they are not set
in debian/rules.
The following patch fixes the issue.
diff -Nru libmusicbrainz-2.1-2.1.5/debian/rules libmusicbrainz-2.1-2.1.5/debian/rules
--- libmusicbrainz-2.1-2.1.5/debian/rules 2011-12-17 13:40:15.000000000 +0100
+++ libmusicbrainz-2.1-2.1.5/debian/rules 2012-03-12 18:34:07.000000000 +0100
@@ -35,7 +35,7 @@
dh_testdir
ln -sf /usr/share/misc/config.sub config.sub
ln -sf /usr/share/misc/config.guess config.guess
- ./configure $(confflags) LDFLAGS="$(LDFLAGS)" CFLAGS="$(CFLAGS)" CXXFLAGS="$(CFLAGS)" \
+ ./configure $(confflags) LDFLAGS="$(LDFLAGS)" CFLAGS="$(CFLAGS)" CXXFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" \
--prefix=/usr
touch $@
To check if all flags were correctly enabled you can use
`hardening-check` from the hardening-includes package and check
the build log (hardening-check doesn't catch everything):
$ hardening-check /usr/lib/libmusicbrainz.so.4.0.3
/usr/lib/libmusicbrainz.so.4.0.3:
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
- -- System Information:
Debian Release: wheezy/sid
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)
Kernel: Linux 3.2.0-2-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
iQIcBAEBCAAGBQJPXjVIAAoJEJL+/bfkTDL5jsIQAJXGM/DbOm7ceQ8aLIs6UxnZ
1tXBeLYIk/Bw5Aiz2wBU5Rjzgw0Ci6X7jqJU4Rg8tJFVp1bpgCoJddeOe8f+FlrG
YcKts5tylmlyP2dGbx359zrOI/wGHHjyE/1jchPjRp+huaYmpwmQSGw4ciLGtUyZ
sGx382zw3Tgv34FR1pcYQWZDKhICSYruw8ge+aAMsUaHzXjCOiSuGNyqibopa9TY
8NQ7NFMGgXrk3iOxVNjJT2BgnTvI/Xs6nGvHIKbZwzBYkUDXi8xVLpsk3FArMKKO
D4SnAR0hg6x6p+6PGfEoSB8cHAYqG9htdM85SsAn2hZ0L/CHaNSgaK1skWDxJIfg
7PeU1RotfI0nmHuliwkf+ZqgZbjKv3qEbEKb3/IgXwmzeOHGPAYIJqyI/qFAN2Wm
Jn+8lHLfel5VeyehwjMOdDJvC0FuCQ6lsPyyuWFYOFbYezdBq8rbsK9qXfRf9//x
+Uea22EQcNnjdvxFVfxOtTNrbBcVqAIF7qIh7upTsh2vQse1fS0EyOT7saQ+fkkz
RqsFc2BXosvh+yF3xXOUFmCAl2XRQCtR1LQUXIEsTPAsPw9mVM+m5teklkQF+JnU
6X8zJNyBIhtnzyx+2CZrfexrzb2nekzMyHvBlMsVZCA7iBjB1O0R0SC7T3rFrUyb
SLuZ/hw8fpsGcBfE29t3
=tJTQ
-----END PGP SIGNATURE-----
Reply to: