blhc (0.04)

back

blhc (build log hardening check) is a small tool which checks build logs for missing hardening flags.

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 sbuild (which is used for 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 to other systems as well. Patches are welcome, see README for details.


Only gcc is detected as compiler at the moment. If other compilers support hardening flags as well, please report them.

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.

blhc is licensed under GPL 3 (or later).

If you find any bugs or have suggestions please tell me at simon@ruderich.org.

Requirements

Usage

blhc path/to/log/file ...

If there’s no output, no flags are missing and the build log is fine.

Also see README and man page in tarball.

Download

Current development happens in the git repository (also browsable as Gitweb):

git clone http://ruderich.org/simon/blhc/blhc.git

Resources

The following links provide additional information about Debian’s hardening process and general information about available hardening options.

Last updated 2013-12-04 01:03:22 CET