Bug#672465: shapelib: Hardening flags missing

Simon Ruderich simon at ruderich.org
Fri May 11 09:32:53 UTC 2012


Package: shapelib
Version: 1.2.10-6
Severity: normal
Tags: patch

Dear Maintainer,

The hardening flags are missing because they are ignored by the
build system. For more hardening information please have a look
at [1], [2] and [3].

The attached patches which are revised versions of existing
patches in debian/rules/patches fix the issue.

CPPFLAGS, CFLAGS and LDFLAGS were missing in a few places. The
flag fixes (CPPFLAGS, CFLAGS for compiler commands; CFLAGS,
LDFLAGS for linker commands) should be sent to upstream if
possible.

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/shptest /usr/bin/shprewind /usr/bin/shpdump ...
    /usr/bin/shptest:
     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/bin/shprewind:
     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/bin/shpdump:
     Position Independent Executable: no, normal executable!
     Stack protected: no, not found!
     Fortify Source functions: yes
     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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-Properly-use-libtool.patch
Type: text/x-diff
Size: 4107 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-grass-devel/attachments/20120511/29bff38c/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0005-Dynamically-link-the-shp-binaries-to-libshp.patch
Type: text/x-diff
Size: 3824 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-grass-devel/attachments/20120511/29bff38c/attachment-0001.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-grass-devel/attachments/20120511/29bff38c/attachment.pgp>


More information about the Pkg-grass-devel mailing list