Index: head/security/afl/pkg-message =================================================================== --- head/security/afl/pkg-message (revision 435214) +++ head/security/afl/pkg-message (nonexistent) @@ -1 +0,0 @@ -To use afl-plot you also need to install math/gnuplot Property changes on: head/security/afl/pkg-message ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/security/afl/files/patch-Makefile =================================================================== --- head/security/afl/files/patch-Makefile (revision 435214) +++ head/security/afl/files/patch-Makefile (nonexistent) @@ -1,31 +0,0 @@ ---- Makefile.orig 2016-08-07 07:03:02 UTC -+++ Makefile -@@ -21,6 +21,8 @@ BIN_PATH = $(PREFIX)/bin - HELPER_PATH = $(PREFIX)/lib/afl - DOC_PATH = $(PREFIX)/share/doc/afl - MISC_PATH = $(PREFIX)/share/afl -+INSTALL_PROGRAM?= install -s -m755 -+INSTALL_SCRIPT?= install -m755 - - # PROGS intentionally omit afl-as, which gets installed elsewhere. - -@@ -120,14 +122,15 @@ clean: - install: all - mkdir -p -m 755 $${DESTDIR}$(BIN_PATH) $${DESTDIR}$(HELPER_PATH) $${DESTDIR}$(DOC_PATH) $${DESTDIR}$(MISC_PATH) - rm -f $${DESTDIR}$(BIN_PATH)/afl-plot.sh -- install -m 755 $(PROGS) $(SH_PROGS) $${DESTDIR}$(BIN_PATH) -+ ${INSTALL_PROGRAM} $(PROGS) $${DESTDIR}$(BIN_PATH) -+ ${INSTALL_SCRIPT} $(SH_PROGS) $${DESTDIR}$(BIN_PATH) - rm -f $${DESTDIR}$(BIN_PATH)/afl-as -- if [ -f afl-qemu-trace ]; then install -m 755 afl-qemu-trace $${DESTDIR}$(BIN_PATH); fi -- if [ -f afl-clang-fast -a -f afl-llvm-pass.so -a -f afl-llvm-rt.o ]; then set -e; install -m 755 afl-clang-fast $${DESTDIR}$(BIN_PATH); ln -sf afl-clang-fast $${DESTDIR}$(BIN_PATH)/afl-clang-fast++; install -m 755 afl-llvm-pass.so afl-llvm-rt.o $${DESTDIR}$(HELPER_PATH); fi -+ if [ -f afl-qemu-trace ]; then ${INSTALL_PROGRAM} afl-qemu-trace $${DESTDIR}$(BIN_PATH); fi -+ if [ -f afl-clang-fast -a -f afl-llvm-pass.so -a -f afl-llvm-rt.o ]; then set -e; ${INSTALL_PROGRAM} afl-clang-fast $${DESTDIR}$(BIN_PATH); ln -sf afl-clang-fast $${DESTDIR}$(BIN_PATH)/afl-clang-fast++; ${INSTALL_PROGRAM} afl-llvm-pass.so afl-llvm-rt.o $${DESTDIR}$(HELPER_PATH); fi - if [ -f afl-llvm-rt-32.o ]; then set -e; install -m 755 afl-llvm-rt-32.o $${DESTDIR}$(HELPER_PATH); fi - if [ -f afl-llvm-rt-64.o ]; then set -e; install -m 755 afl-llvm-rt-64.o $${DESTDIR}$(HELPER_PATH); fi - set -e; for i in afl-g++ afl-clang afl-clang++; do ln -sf afl-gcc $${DESTDIR}$(BIN_PATH)/$$i; done -- install -m 755 afl-as $${DESTDIR}$(HELPER_PATH) -+ ${INSTALL_PROGRAM} afl-as $${DESTDIR}$(HELPER_PATH) - ln -sf afl-as $${DESTDIR}$(HELPER_PATH)/as - install -m 644 docs/README docs/ChangeLog docs/*.txt $${DESTDIR}$(DOC_PATH) - cp -r testcases/ $${DESTDIR}$(MISC_PATH) Property changes on: head/security/afl/files/patch-Makefile ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/security/afl/Makefile =================================================================== --- head/security/afl/Makefile (revision 435214) +++ head/security/afl/Makefile (revision 435215) @@ -1,83 +1,80 @@ # Created by: Fabian Keil # $FreeBSD$ PORTNAME= afl -PORTVERSION= 2.36 +PORTVERSION= 2.39 DISTVERSIONSUFFIX= b CATEGORIES= security MASTER_SITES= http://lcamtuf.coredump.cx/afl/releases/ MAINTAINER= tobik@FreeBSD.org COMMENT= Fast instrumented fuzzer LICENSE= APACHE20 LICENSE_FILE= ${WRKSRC}/docs/COPYING -USES= compiler gmake tar:tgz - -OPTIONS_DEFINE= DEBUG DOCS MINIMIZE_CORPUS LLVM TEST_INSTRUMENTATION -MINIMIZE_CORPUS_DESC= Install afl-cmin. Adds bash dependency -TEST_INSTRUMENTATION_DESC= Execute tests (expected to fail in jails) -LLVM_DESC= LLVM-based instrumentation (broken on 9.x) -OPTIONS_DEFAULT= LLVM MINIMIZE_CORPUS - -OPTIONS_SUB= yes - +# In theory afl supports other architectures with the LLVM plugin. +# It has to be compiled with AFL_NO_X86=1 in that case. ONLY_FOR_ARCHS= amd64 i386 ONLY_FOR_ARCHS_REASON= Uses binary instrumentation -LLVM_VERSION= 38 +USES= gmake tar:tgz +TEST_TARGET= test_build + +OPTIONS_DEFINE= DEBUG DOCS LLVM +OPTIONS_DEFAULT= LLVM +OPTIONS_SUB= yes + +LLVM_DESC= LLVM-based instrumentation +LLVM_VERSION= 39 LLVM_BUILD_DEPENDS= clang${LLVM_VERSION}:devel/llvm${LLVM_VERSION} LLVM_RUN_DEPENDS= clang${LLVM_VERSION}:devel/llvm${LLVM_VERSION} -MINIMIZE_CORPUS_RUN_DEPENDS= ${LOCALBASE}/bin/bash:shells/bash +LLVM_VARS= CC=clang${LLVM_VERSION} CXX=clang++${LLVM_VERSION} \ + MAKE_ARGS=LLVM_CONFIG=llvm-config${LLVM_VERSION} .include .if ${ARCH} == "i386" # Clang i386 emits .cfi_sections which base as(1) doesn't understand BUILD_DEPENDS+= ${LOCALBASE}/bin/as:devel/binutils RUN_DEPENDS+= ${LOCALBASE}/bin/as:devel/binutils .endif -MAKE_ARGS= INSTALL_PROGRAM="${INSTALL_PROGRAM}" \ - INSTALL_SCRIPT="${INSTALL_SCRIPT}" - -post-patch-TEST_INSTRUMENTATION-off: -# afl needs shmget() which usually isn't available in jails. Disabling -# the instrumentation tests makes sure building packages in jails works -# by default anyway. - ${REINPLACE_CMD} -e 's@^\(all.*\) test_build@\1@' ${WRKSRC}/Makefile - ${REINPLACE_CMD} -e 's@^\(all.*\) test_build@\1@' ${WRKSRC}/llvm_mode/Makefile - post-patch: +# Disable the instrumentation tests to make sure building packages in +# jails works by default. afl needs shmget() which usually isn't +# available in jails. + @${REINPLACE_CMD} 's@^\(all.*\) test_build@\1@' \ + ${WRKSRC}/Makefile ${WRKSRC}/llvm_mode/Makefile .if ${ARCH} == "i386" - ${REINPLACE_CMD} -e 's@\( as_params\[0\] = afl_as ? afl_as : \)\(.*\)@\1(u8*)"${LOCALBASE}/bin/as";@' \ + @${REINPLACE_CMD} 's@\( as_params\[0\] = afl_as ? afl_as : \)\(.*\)@\1(u8*)"${LOCALBASE}/bin/as";@' \ ${WRKSRC}/afl-as.c .endif post-patch-LLVM-on: - ${REINPLACE_CMD} \ + @${REINPLACE_CMD} \ -e 's|"clang"|"clang${LLVM_VERSION}"|g' \ -e 's|"clang\+\+"|"clang\+\+${LLVM_VERSION}"|g' \ ${WRKSRC}/llvm_mode/afl-clang-fast.c post-build-LLVM-on: - @(cd ${WRKSRC}/llvm_mode; ${SETENV} \ - CC=clang${LLVM_VERSION} \ - CXX=clang++${LLVM_VERSION} \ - LLVM_CONFIG=llvm-config${LLVM_VERSION} \ - CFLAGS="${CFLAGS}" \ - CXXFLAGS="${CXXFLAGS}" \ - ${GMAKE}) + @(cd ${WRKSRC}/llvm_mode; ${DO_MAKE_BUILD} ${ALL_TARGET}) +post-test-LLVM-on: + @(cd ${WRKSRC}/llvm_mode; ${DO_MAKE_BUILD} ${TEST_TARGET}) + post-install: - ${INSTALL_DATA} ${WRKSRC}/docs/COPYING ${STAGEDIR}${DOCSDIR}/ -.for afl_script in afl-cmin afl-plot afl-whatsup - ${INSTALL_SCRIPT} ${WRKSRC}/${afl_script} ${STAGEDIR}${PREFIX}/bin/ +.for script in afl-cmin afl-plot afl-whatsup + ${INSTALL_SCRIPT} ${WRKSRC}/${script} ${STAGEDIR}${PREFIX}/bin .endfor + @${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/afl/afl-as +.for prog in afl-analyze afl-fuzz afl-gcc afl-gotcpu afl-showmap afl-tmin + @${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/${prog} +.endfor -post-install-MINIMIZE_CORPUS-on: - ${INSTALL_SCRIPT} ${WRKSRC}/afl-cmin ${STAGEDIR}${PREFIX}/bin/ +post-install-LLVM-on: + @${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/afl/afl-llvm-pass.so + @${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/afl-clang-fast .include Index: head/security/afl/distinfo =================================================================== --- head/security/afl/distinfo (revision 435214) +++ head/security/afl/distinfo (revision 435215) @@ -1,3 +1,3 @@ -TIMESTAMP = 1484928306 -SHA256 (afl-2.36b.tgz) = d36e2643eaddbd6e79a0dd835fd6e23428198a7a7cd640e96ccbf21d5bd8bcc8 -SIZE (afl-2.36b.tgz) = 830689 +TIMESTAMP = 1487164780 +SHA256 (afl-2.39b.tgz) = 968eceae4d013eee62bc8f2fdddbb7060b92e03a0175153b0285ec7f5c78f141 +SIZE (afl-2.39b.tgz) = 830897 Index: head/security/afl/pkg-plist =================================================================== --- head/security/afl/pkg-plist (revision 435214) +++ head/security/afl/pkg-plist (revision 435215) @@ -1,84 +1,83 @@ bin/afl-analyze bin/afl-clang bin/afl-clang++ %%LLVM%%bin/afl-clang-fast %%LLVM%%bin/afl-clang-fast++ %%LLVM%%lib/afl/afl-llvm-pass.so %%LLVM%%lib/afl/afl-llvm-rt.o %%LLVM%%lib/afl/afl-llvm-rt-32.o %%LLVM%%lib/afl/afl-llvm-rt-64.o -%%MINIMIZE_CORPUS%%bin/afl-cmin +bin/afl-cmin bin/afl-fuzz bin/afl-g++ bin/afl-gcc bin/afl-gotcpu bin/afl-plot bin/afl-showmap bin/afl-tmin bin/afl-whatsup lib/afl/afl-as lib/afl/as %%DATADIR%%/README.dictionaries %%DATADIR%%/README.testcases %%DATADIR%%/gif.dict %%DATADIR%%/html_tags.dict %%DATADIR%%/jpeg.dict %%DATADIR%%/js.dict %%DATADIR%%/pdf.dict %%DATADIR%%/png.dict %%DATADIR%%/sql.dict %%DATADIR%%/tiff.dict %%DATADIR%%/webp.dict %%DATADIR%%/xml.dict %%DATADIR%%/archives/common/ar/small_archive.a %%DATADIR%%/archives/common/bzip2/small_archive.bz2 %%DATADIR%%/archives/common/cab/small_archive.cab %%DATADIR%%/archives/common/compress/small_archive.Z %%DATADIR%%/archives/common/cpio/small_archive.cpio %%DATADIR%%/archives/common/gzip/small_archive.gz %%DATADIR%%/archives/common/lzo/small_archive.lzo %%DATADIR%%/archives/common/rar/small_archive.rar %%DATADIR%%/archives/common/tar/small_archive.tar %%DATADIR%%/archives/common/xz/small_archive.xz %%DATADIR%%/archives/common/zip/small_archive.zip %%DATADIR%%/archives/exotic/arj/small_archive.arj %%DATADIR%%/archives/exotic/lha/small_archive.lha %%DATADIR%%/archives/exotic/lrzip/small_archive.lrz %%DATADIR%%/archives/exotic/lzip/small_archive.lz %%DATADIR%%/archives/exotic/lzma/small_archive.lzma %%DATADIR%%/archives/exotic/rzip/small_archive.rz %%DATADIR%%/archives/exotic/zoo/small_archive.zoo %%DATADIR%%/images/bmp/not_kitty.bmp %%DATADIR%%/images/gif/not_kitty.gif %%DATADIR%%/images/ico/not_kitty.ico %%DATADIR%%/images/jp2/not_kitty.jp2 %%DATADIR%%/images/jpeg/not_kitty.jpg %%DATADIR%%/images/jxr/not_kitty.jxr %%DATADIR%%/images/png/not_kitty.png %%DATADIR%%/images/png/not_kitty_alpha.png %%DATADIR%%/images/png/not_kitty_gamma.png %%DATADIR%%/images/png/not_kitty_icc.png %%DATADIR%%/images/tiff/not_kitty.tiff %%DATADIR%%/images/webp/not_kitty.webp %%DATADIR%%/multimedia/h264/small_movie.mp4 %%DATADIR%%/others/elf/small_exec.elf %%DATADIR%%/others/js/small_script.js %%DATADIR%%/others/pcap/small_capture.pcap %%DATADIR%%/others/pdf/small.pdf %%DATADIR%%/others/rtf/small_document.rtf %%DATADIR%%/others/sql/simple_queries.sql %%DATADIR%%/others/text/hello_world.txt %%DATADIR%%/others/xml/small_document.xml -%%PORTDOCS%%%%DOCSDIR%%/COPYING %%PORTDOCS%%%%DOCSDIR%%/ChangeLog %%PORTDOCS%%%%DOCSDIR%%/README %%PORTDOCS%%%%DOCSDIR%%/env_variables.txt %%PORTDOCS%%%%DOCSDIR%%/historical_notes.txt %%PORTDOCS%%%%DOCSDIR%%/life_pro_tips.txt %%PORTDOCS%%%%DOCSDIR%%/notes_for_asan.txt %%PORTDOCS%%%%DOCSDIR%%/parallel_fuzzing.txt %%PORTDOCS%%%%DOCSDIR%%/perf_tips.txt %%PORTDOCS%%%%DOCSDIR%%/sister_projects.txt %%PORTDOCS%%%%DOCSDIR%%/status_screen.txt %%PORTDOCS%%%%DOCSDIR%%/technical_details.txt %%PORTDOCS%%%%DOCSDIR%%/QuickStartGuide.txt