reopen 674537
thanks

Dear Maintainer,

The LDFLAGS hardening flags are still missing because they are
not set in debian/rules. For more hardening information please
have a look at [1], [2] and [3].

The following patch fixes the issue.

diff -Nru aria2-1.15.0/debian/rules aria2-1.15.0/debian/rules
--- aria2-1.15.0/debian/rules   2012-05-25 13:41:17.000000000 +0200
+++ aria2-1.15.0/debian/rules   2012-05-27 01:10:04.000000000 +0200
@@ -36,7 +36,7 @@
 endif
 
        ./configure $(CROSS) CFLAGS="$(CFLAGS)" \
-                            LDFLAGS="-Wl,-z,defs,--as-needed" \
+                            LDFLAGS="$(LDFLAGS) -Wl,-z,defs,--as-needed" \
                           --prefix=/usr \
                           --with-gnutls \
                           --without-openssl \

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/aria2c
    /usr/bin/aria2c:
     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

Attachment: signature.asc
Description: Digital signature

Reply via email to