nixpkgs/pkgs/tools/security/honggfuzz/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

69 lines
1.9 KiB
Nix
Raw Normal View History

{ lib
, stdenv
, fetchFromGitHub
, makeWrapper
, clang
, llvm
2023-10-28 01:45:41 +02:00
, libbfd
, libopcodes
, libunwind
, libblocksruntime }:
2022-05-28 00:47:00 +02:00
stdenv.mkDerivation rec {
pname = "honggfuzz";
2023-10-28 01:45:41 +02:00
version = "2.6";
2022-05-28 00:47:00 +02:00
src = fetchFromGitHub {
owner = "google";
repo = pname;
rev = version;
2023-10-28 01:45:41 +02:00
sha256 = "sha256-/ra6g0qjjC8Lo8/n2XEbwnZ95yDHcGhYd5+TTvQ6FAc=";
2022-05-28 00:47:00 +02:00
};
2022-05-28 00:47:00 +02:00
postPatch = ''
substituteInPlace hfuzz_cc/hfuzz-cc.c \
--replace '"clang' '"${clang}/bin/clang'
'';
enableParallelBuilding = true;
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ llvm ];
2023-10-28 01:45:41 +02:00
propagatedBuildInputs = [ libbfd libopcodes libunwind libblocksruntime ];
# Fortify causes build failures: 'str*' defined both normally and as 'alias' attribute
hardeningDisable = [ "fortify" ];
2022-05-28 00:47:00 +02:00
makeFlags = [ "PREFIX=$(out)" ];
postInstall = ''
mkdir -p $out/lib
cp libhfuzz/libhfuzz.a $out/lib
cp libhfuzz/libhfuzz.so $out/lib
cp libhfcommon/libhfcommon.a $out/lib
cp libhfnetdriver/libhfnetdriver.a $out/lib
'';
2022-05-28 00:47:00 +02:00
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/";
license = lib.licenses.asl20;
platforms = lib.platforms.linux;
2022-05-28 00:47:00 +02:00
maintainers = with lib.maintainers; [ cpu chivay ];
};
2022-05-28 00:47:00 +02:00
}