Bug#653852: Please enabled hardened build flags

June 24th, 2012 - 03:50 pm ET by Simon Ruderich | Report spam
This is a MIME-formatted message. If you see this text it means that your
E-mail software does not support MIME-formatted messages.


reopen 653852
thanks

Dear Maintainer,

The hardening flags are still missing for
src/libs/gnulib/lib/localcharset.c because they are not passed to
the configure in debian/rules.

The following patch fixes the issue.

diff -Nru groff-1.21/debian/rules groff-1.21/debian/rules
groff-1.21/debian/rules 2012-06-22 12:48:35.000000000 +0200
+++ groff-1.21/debian/rules 2012-06-24 21:31:53.000000000 +0200
@@ -47,6 +47,8 @@
mkdir -p debian/build/src/libs/gnulib
cd debian/build/src/libs/gnulib && \
+ CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" \
+ LDFLAGS="$(LDFLAGS)" \
$(CURDIR)/src/libs/gnulib/configure $(confflags_gnulib)
ifneq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
CFLAGS="$(CFLAGS)" CXXFLAGS="$(CFLAGS)" \

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).

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/ReleaseGoal...BuildFlags
[2]: https://wiki.debian.org/HardeningWalkthrough
[3]: https://wiki.debian.org/Hardening
+ privacy is necessary
+ using gnupg http://gnupg.org
+ public key id: 0x92FEFDB7E44C32F9






To UNSUBSCRIBE, email to debian-bugs-dist-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
email Follow the discussionReplies 1 replyReplies Make a reply

Similar topics

Replies

#1 Colin Watson
June 24th, 2012 - 08:40 pm ET | Report spam
On Sun, Jun 24, 2012 at 09:41:49PM +0200, Simon Ruderich wrote:
The hardening flags are still missing for
src/libs/gnulib/lib/localcharset.c because they are not passed to
the configure in debian/rules.



Ah, thanks for the catch. I've applied your patch plus a further change
to reduce the chance of error in future and to cover the cross-building
case as well.

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).



I did use hardening-check via Lintian, but I didn't know about blhc -
thanks for that!

Colin Watson []



To UNSUBSCRIBE, email to
with a subject of "unsubscribe". Trouble? Contact
email Follow the discussion Replies Reply to this message
Help Create a new topicReplies Make a reply
Search Make your own search