2021-01-15 10:19:50 +01:00
|
|
|
{ lib, stdenv, fetchFromGitHub, callPackage, makeWrapper
|
2020-06-14 17:41:19 +02:00
|
|
|
, clang, llvm, libbfd, libopcodes, libunwind, libblocksruntime
|
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
honggfuzz = stdenv.mkDerivation rec {
|
|
|
|
pname = "honggfuzz";
|
2021-02-25 11:58:55 +01:00
|
|
|
version = "2.4";
|
2020-06-14 17:41:19 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "google";
|
|
|
|
repo = pname;
|
2020-11-01 23:39:49 +01:00
|
|
|
rev = version;
|
2021-02-25 11:58:55 +01:00
|
|
|
sha256 = "sha256-sU5lmlfmvVWo4K96sI+xQsPfTMd1wsLbihcKI4aTj6g=";
|
2020-06-14 17:41:19 +02:00
|
|
|
};
|
2020-09-03 23:47:52 +02:00
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace hfuzz_cc/hfuzz-cc.c \
|
|
|
|
--replace '"clang' '"${clang}/bin/clang'
|
|
|
|
'';
|
|
|
|
|
2020-06-14 17:41:19 +02:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
buildInputs = [ llvm ];
|
|
|
|
propagatedBuildInputs = [ libbfd libopcodes libunwind libblocksruntime ];
|
|
|
|
|
|
|
|
makeFlags = [ "PREFIX=$(out)" ];
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "A security oriented, feedback-driven, evolutionary, easy-to-use fuzzer";
|
|
|
|
longDescription = ''
|
|
|
|
Honggfuzz is a security oriented, feedback-driven, evolutionary,
|
|
|
|
easy-to-use fuzzer with interesting analysis options. It is
|
|
|
|
multi-process and multi-threaded, blazingly fast when the persistent
|
|
|
|
fuzzing mode is used and has a solid track record of uncovered security
|
|
|
|
bugs.
|
|
|
|
|
|
|
|
Honggfuzz uses low-level interfaces to monitor processes and it will
|
|
|
|
discover and report hijacked/ignored signals from crashes. Feed it
|
|
|
|
a simple corpus directory (can even be empty for the feedback-driven
|
|
|
|
fuzzing), and it will work its way up, expanding it by utilizing
|
|
|
|
feedback-based coverage metrics.
|
|
|
|
'';
|
|
|
|
homepage = "https://honggfuzz.dev/";
|
2021-01-15 10:19:50 +01:00
|
|
|
license = lib.licenses.asl20;
|
2020-06-14 17:41:19 +02:00
|
|
|
platforms = ["x86_64-linux"];
|
2021-01-15 10:19:50 +01:00
|
|
|
maintainers = with lib.maintainers; [ cpu ];
|
2020-06-14 17:41:19 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
in honggfuzz
|