X-Git-Url: https://ruderich.org/simon/gitweb/?p=blhc%2Fblhc.git;a=blobdiff_plain;f=README;h=605ab680efbf447c8e8a42d49b12c8768933efe6;hp=a2adcb8adb761092146c17ee0b2b7350a9a04269;hb=e3658a072c1a1b97147af5695b95817b4d5e4d9b;hpb=2839b145ae987b823227ba569e140f413b84b303 diff --git a/README b/README index a2adcb8..605ab68 100644 --- a/README +++ b/README @@ -4,12 +4,23 @@ README blhc (build log hardening check) is a small tool which checks build logs for missing hardening flags. It's licensed under the GPL 3 or later. +Hardening flags enable additional security features in the compiler to prevent +e.g. stack overflows, format string vulnerabilities, GOT overwrites, etc. + +Because most build systems are quite complicated there are many places where +compiler flags from the environment might be ignored. The parser verifies that +all compiler commands use the correct hardening flags and thus all hardening +features are correctly used. + It's designed to check build logs generated by Debian's dpkg-buildpackage (or tools using dpkg-buildpackage like pbuilder or the official buildd build logs) to help maintainers detect missing hardening flags in their packages. At the moment it works only on Debian and derivatives but it should be easily -extendable for other systems as well. +extendable to other systems as well. Patches are welcome. + +Only gcc is detected as compiler at the moment. If other compilers support +hardening flags as well, please report them. For more information about hardening flags have a look at [1]. @@ -22,6 +33,10 @@ DEPENDENCIES - Perl - Dpkg::Arch - Dpkg::Version + - Term::ANSIColor >= 2.01 + Bundled with perl. A recent version is only necessary for build logs with + ANSI colors which is rare, blhc works fine without if the build log + doesn't use colors. Not required for buildd mode. USAGE @@ -29,6 +44,12 @@ USAGE blhc path/to/log/file +blhc can be run directly from the source tree (`bin/blhc`) or copied anywhere +on the system. It doesn't have to be explicitly installed. To read the man +page use `perldoc bin/blhc`. + +If there's no output, no flags are missing and the build log is fine. + For more examples see the man page. @@ -79,6 +100,14 @@ following line (output of dpkg-buildpackage): The available hardening flags are adapted to the architecture because some architectures don't support certain hardening options. +Some checks (Ada and hardening-wrapper at the moment) check the build +dependencies for certain packages. The following lines are used to get the +build dependencies. The first is used in buildd build logs, the second by +pbuilder logs, both are detected: + + Build-Depends: ... + Depends: ... + LIMITATIONS ----------- @@ -139,7 +168,7 @@ LICENSE blhc is licensed under GPL version 3 or later. -Copyright (C) 2012 Simon Ruderich +Copyright (C) 2012-2013 Simon Ruderich This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by