Skip to content

Commit

Permalink
devel/afl++: import afl++-2.62c
Browse files Browse the repository at this point in the history
Packaged for wip by Apurva Nandan.

afl++ is an upgrade to the American Fuzzy Lop (afl) fuzzer, created initially
to incorporate all the best features developed in the years for the fuzzers in
the AFL family but was not merged in AFL as it is not updated since November
2017.
  • Loading branch information
wiz committed Apr 17, 2020
1 parent 231cc79 commit 196c6ae
Show file tree
Hide file tree
Showing 6 changed files with 187 additions and 0 deletions.
4 changes: 4 additions & 0 deletions devel/afl++/DESCR
@@ -0,0 +1,4 @@
afl++ is an upgrade to the American Fuzzy Lop (afl) fuzzer, created initially
to incorporate all the best features developed in the years for the fuzzers in
the AFL family but was not merged in AFL as it is not updated since November
2017.
34 changes: 34 additions & 0 deletions devel/afl++/Makefile
@@ -0,0 +1,34 @@
# $NetBSD: Makefile,v 1.1 2020/04/17 17:51:09 wiz Exp $

DISTNAME= AFLplusplus-2.62c
PKGNAME= ${DISTNAME:C/AFLplusplus/afl++/}
GITHUB_PROJECT= AFLplusplus
CATEGORIES= devel
MASTER_SITES= ${MASTER_SITE_GITHUB:=AFLplusplus/}

MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= https://github.com/AFLplusplus/AFLplusplus/
COMMENT= American Fuzzy Lop ++, a fuzzing tool for finding bugs by random input
LICENSE= apache-2.0

.include "../../lang/python/pyversion.mk"
PYTHON_INCLUDE_CMD= python${PYVERSSUFFIX}-config --includes
PYTHON_VERSION_CMD= python${PYVERSSUFFIX} --version

.if ${PYVERSSUFFIX} < 38
PYTHON_LIB_CMD= python${PYVERSSUFFIX}-config --ldflags
.else
PYTHON_LIB_CMD= python${PYVERSSUFFIX}-config --libs --embed --ldflags
.endif

MAKE_FLAGS+= PYTHON_INCLUDE=${PYTHON_INCLUDE_CMD:sh:Q}
MAKE_FLAGS+= PYTHON_VERSION=${PYTHON_VERSION_CMD:sh:Q}
MAKE_FLAGS+= PYTHON_LIB=${PYTHON_LIB_CMD:sh:Q}

USE_LANGUAGES= c c++
USE_TOOLS+= bash:run gmake
REPLACE_SH+= afl-plot
REPLACE_BASH+= afl-cmin
REPLACE_BASH+= afl-cmin.bash

.include "../../mk/bsd.pkg.mk"
107 changes: 107 additions & 0 deletions devel/afl++/PLIST
@@ -0,0 +1,107 @@
@comment $NetBSD: PLIST,v 1.1 2020/04/17 17:51:09 wiz Exp $
bin/afl-analyze
bin/afl-clang
bin/afl-clang++
bin/afl-cmin
bin/afl-cmin.bash
bin/afl-fuzz
bin/afl-g++
bin/afl-gcc
bin/afl-gotcpu
bin/afl-plot
bin/afl-showmap
bin/afl-system-config
bin/afl-tmin
bin/afl-whatsup
lib/afl/afl-as
lib/afl/argvfuzz32.so
lib/afl/argvfuzz64.so
lib/afl/as
lib/afl/socketfuzz32.so
lib/afl/socketfuzz64.so
man/man8/afl-analyze.8
man/man8/afl-as.8
man/man8/afl-cmin.8
man/man8/afl-cmin.bash.8
man/man8/afl-fuzz.8
man/man8/afl-gcc.8
man/man8/afl-gotcpu.8
man/man8/afl-plot.8
man/man8/afl-showmap.8
man/man8/afl-system-config.8
man/man8/afl-tmin.8
man/man8/afl-whatsup.8
share/afl/dictionaries/README.md
share/afl/dictionaries/gif.dict
share/afl/dictionaries/html_tags.dict
share/afl/dictionaries/jpeg.dict
share/afl/dictionaries/js.dict
share/afl/dictionaries/json.dict
share/afl/dictionaries/pdf.dict
share/afl/dictionaries/png.dict
share/afl/dictionaries/regexp.dict
share/afl/dictionaries/sql.dict
share/afl/dictionaries/tiff.dict
share/afl/dictionaries/webp.dict
share/afl/dictionaries/xml.dict
share/afl/testcases/README.md
share/afl/testcases/archives/common/ar/small_archive.a
share/afl/testcases/archives/common/bzip2/small_archive.bz2
share/afl/testcases/archives/common/cab/small_archive.cab
share/afl/testcases/archives/common/compress/small_archive.Z
share/afl/testcases/archives/common/cpio/small_archive.cpio
share/afl/testcases/archives/common/gzip/small_archive.gz
share/afl/testcases/archives/common/lzo/small_archive.lzo
share/afl/testcases/archives/common/rar/small_archive.rar
share/afl/testcases/archives/common/tar/small_archive.tar
share/afl/testcases/archives/common/xz/small_archive.xz
share/afl/testcases/archives/common/zip/small_archive.zip
share/afl/testcases/archives/exotic/arj/small_archive.arj
share/afl/testcases/archives/exotic/lha/small_archive.lha
share/afl/testcases/archives/exotic/lrzip/small_archive.lrz
share/afl/testcases/archives/exotic/lzip/small_archive.lz
share/afl/testcases/archives/exotic/lzma/small_archive.lzma
share/afl/testcases/archives/exotic/rzip/small_archive.rz
share/afl/testcases/archives/exotic/zoo/small_archive.zoo
share/afl/testcases/images/bmp/not_kitty.bmp
share/afl/testcases/images/gif/not_kitty.gif
share/afl/testcases/images/ico/not_kitty.ico
share/afl/testcases/images/jp2/not_kitty.jp2
share/afl/testcases/images/jpeg/not_kitty.jpg
share/afl/testcases/images/jxr/not_kitty.jxr
share/afl/testcases/images/png/not_kitty.png
share/afl/testcases/images/png/not_kitty_alpha.png
share/afl/testcases/images/png/not_kitty_gamma.png
share/afl/testcases/images/png/not_kitty_icc.png
share/afl/testcases/images/tiff/not_kitty.tiff
share/afl/testcases/images/webp/not_kitty.webp
share/afl/testcases/multimedia/h264/small_movie.mp4
share/afl/testcases/others/elf/small_exec.elf
share/afl/testcases/others/js/small_script.js
share/afl/testcases/others/pcap/small_capture.pcap
share/afl/testcases/others/pdf/small.pdf
share/afl/testcases/others/rtf/small_document.rtf
share/afl/testcases/others/sql/simple_queries.sql
share/afl/testcases/others/text/hello_world.txt
share/afl/testcases/others/xml/small_document.xml
share/doc/afl/Changelog.md
share/doc/afl/INSTALL.md
share/doc/afl/PATCHES.md
share/doc/afl/QuickStartGuide.md
share/doc/afl/README.MOpt.md
share/doc/afl/README.md
share/doc/afl/README.radamsa.md
share/doc/afl/binaryonly_fuzzing.md
share/doc/afl/custom_mutator.md
share/doc/afl/env_variables.md
share/doc/afl/historical_notes.md
share/doc/afl/ideas.md
share/doc/afl/life_pro_tips.md
share/doc/afl/notes_for_asan.md
share/doc/afl/parallel_fuzzing.md
share/doc/afl/perf_tips.md
share/doc/afl/power_schedules.md
share/doc/afl/python_mutators.md
share/doc/afl/sister_projects.md
share/doc/afl/status_screen.md
share/doc/afl/technical_details.md
8 changes: 8 additions & 0 deletions devel/afl++/distinfo
@@ -0,0 +1,8 @@
$NetBSD: distinfo,v 1.1 2020/04/17 17:51:09 wiz Exp $

SHA1 (AFLplusplus-2.62c.tar.gz) = 4442de6667fe780867a7bd0ddbbc0eaa897f95e5
RMD160 (AFLplusplus-2.62c.tar.gz) = 0840d48520ee90d9263cdf040b6253efac3d7ea2
SHA512 (AFLplusplus-2.62c.tar.gz) = 0214845af0acc889c5f80bbfc6f50b662cb608c4c0959061075db29ee60bdaca7b11499368b44597674e1a11c49e60725abe2f919a7ddf7850c410019902eb40
Size (AFLplusplus-2.62c.tar.gz) = 1272000 bytes
SHA1 (patch-examples_argv__fuzzing_Makefile) = 04032386558713ca4d142964f63cc6820ae010c8
SHA1 (patch-examples_socket__fuzzing_Makefile) = 46b5474f61029d5ea4a4449cfad6de0d6f5c8d66
17 changes: 17 additions & 0 deletions devel/afl++/patches/patch-examples_argv__fuzzing_Makefile
@@ -0,0 +1,17 @@
$NetBSD: patch-examples_argv__fuzzing_Makefile,v 1.1 2020/04/17 17:51:09 wiz Exp $

Honor CFLAGS and LDFLAGS.

--- examples/argv_fuzzing/Makefile.orig 2020-02-28 00:13:28.000000000 +0000
+++ examples/argv_fuzzing/Makefile
@@ -17,8 +17,8 @@ PREFIX ?= /usr/local
BIN_PATH = $(PREFIX)/bin
HELPER_PATH = $(PREFIX)/lib/afl

-CFLAGS = -fPIC -Wall -Wextra
-LDFLAGS = -shared
+CFLAGS += -fPIC -Wall -Wextra
+LDFLAGS += -shared

ifneq "$(filter Linux GNU%,$(shell uname))" ""
LDFLAGS += -ldl
17 changes: 17 additions & 0 deletions devel/afl++/patches/patch-examples_socket__fuzzing_Makefile
@@ -0,0 +1,17 @@
$NetBSD: patch-examples_socket__fuzzing_Makefile,v 1.1 2020/04/17 17:51:09 wiz Exp $

Honor CFLAGS and LDFLAGS.

--- examples/socket_fuzzing/Makefile.orig 2020-02-28 00:13:28.000000000 +0000
+++ examples/socket_fuzzing/Makefile
@@ -15,8 +15,8 @@ PREFIX ?= /usr/local
BIN_PATH = $(PREFIX)/bin
HELPER_PATH = $(PREFIX)/lib/afl

-CFLAGS = -fPIC -Wall -Wextra
-LDFLAGS = -shared
+CFLAGS += -fPIC -Wall -Wextra
+LDFLAGS += -shared

ifneq "$(filter Linux GNU%,$(shell uname))" ""
LDFLAGS += -ldl

0 comments on commit 196c6ae

Please sign in to comment.