summaryrefslogtreecommitdiff
path: root/app-forensics
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-07-09 15:43:36 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-07-09 15:43:36 +0100
commit2719f73b6813d11d13a9650cdd2ab8ec6e69385d (patch)
tree8c816148bcbd22757d892089c989ae614eae4f5a /app-forensics
parent0f558761aa2dee1017b4751e4017205e015a9560 (diff)
gentoo resync : 09.07.2022
Diffstat (limited to 'app-forensics')
-rw-r--r--app-forensics/Manifest.gzbin4886 -> 4877 bytes
-rw-r--r--app-forensics/aflplusplus/Manifest5
-rw-r--r--app-forensics/aflplusplus/aflplusplus-4.01c-r1.ebuild90
-rw-r--r--app-forensics/aflplusplus/files/aflplusplus-4.01c-lld-detect.patch14
-rw-r--r--app-forensics/aflplusplus/files/aflplusplus-4.01c-no-ignore-errors-makefile.patch155
-rw-r--r--app-forensics/aflplusplus/files/aflplusplus-4.01c-respect-flags.patch197
-rw-r--r--app-forensics/yara/Manifest6
-rw-r--r--app-forensics/yara/yara-4.2.0-r1.ebuild2
-rw-r--r--app-forensics/yara/yara-4.2.1.ebuild2
-rw-r--r--app-forensics/yara/yara-4.2.2.ebuild57
10 files changed, 524 insertions, 4 deletions
diff --git a/app-forensics/Manifest.gz b/app-forensics/Manifest.gz
index fa15cdaa93ad..62dfe3040ffd 100644
--- a/app-forensics/Manifest.gz
+++ b/app-forensics/Manifest.gz
Binary files differ
diff --git a/app-forensics/aflplusplus/Manifest b/app-forensics/aflplusplus/Manifest
index c03f7afd91f3..0a9dba08c9c8 100644
--- a/app-forensics/aflplusplus/Manifest
+++ b/app-forensics/aflplusplus/Manifest
@@ -1,5 +1,10 @@
AUX aflplusplus-4.00c-no-ignore-errors-makefile.patch 4990 BLAKE2B e3e4b734e4e2b6d6e6fa384ec3b92003b1ee2a1313ec76eb5b6c0e6a6552dc8d08bb2639add2a11c2203fc9b731deff18015f497531beaa27ef59a6dd8e83be2 SHA512 ccf75c622c9a0227b3bc916f182bb1ad5fa6453622773f3a63a9d697c2e11a8597cc1758b48a19546101c1ea9bd7dc5ec91e75e960ddb3aef580b0447cd5675c
AUX aflplusplus-4.00c-respect-flags.patch 7004 BLAKE2B a13695116d491e9dc0a05a3d2f3fa14fa9126350ea8debbd5e3664cac45c91969f34d1de6062f62adbbaf97c0fb485f74d6c367ff37464fe34f7b66db9663996 SHA512 2eb8e116fa690e08eb91ced2b760e87d4c623b020ac451409ca68501b32c9aee7773e237c0bdfeef09086b851e95a3b3fb216e7ca58681e64fc12a958994f7d1
+AUX aflplusplus-4.01c-lld-detect.patch 516 BLAKE2B 44b32508dc04aee377eda714ec95e8fd149b6175376e9c7b64c1376dc3f09d5aa84366ec4788d7b5943925a537f359d62f608035388446766180c07ecfa87538 SHA512 0730a65448031f17e3afb6b0ed9760280483f2a07882900c66b6b40be4440fa73e2ccc077410f15472da809c447b864421a431ffe98b4eccd1e6b30a4028398b
+AUX aflplusplus-4.01c-no-ignore-errors-makefile.patch 5840 BLAKE2B a895ef0956539978c9f3f9c128149d6573e0f7750de9086bd9890f45b43bc76e934e0d0768b30d6a60832f931c351b060b772e9816f551191e8c90a29906af1b SHA512 0ad93eaad1da1472be6f402514c2fde832abbcfcf11e1350ea58109fe5c49f53a018e2c1d516714f3aab2e9917384e9bfae91630033476b295b023800a301b03
+AUX aflplusplus-4.01c-respect-flags.patch 11669 BLAKE2B 1aa396a2283fd8b8efb40086c555155256c248be8b72aeaa64b1f9d439d669a5ac95bbf0286f76bfd235d189532d230505533030d6710d42c5d4132728093c5b SHA512 acdaad1e1a30e1e19f05823c15ecd459bd38bdcbcca21b3b9a953d29d7540136d7e4cd92d88836dce8d588f70d19d66756bdf61c0fa6e268d53926a6a1bdf13f
DIST aflplusplus-4.00c.tar.gz 2805041 BLAKE2B c1ce15aa9860fc02a7d6f608cae9dd8987b72253b465ea734c721d1b6927e482c31b907aeafe82c00618465227e2e140bfc595151ea5d73037638c3ee630872c SHA512 23a7a4260e581f7c212393e1e14704464bbbc3ff5465b3472db31c6c7f2cd25a9ecc5ad81fad8958c775fcd01b22269085e6c69419a07fbbdb9ec317a3e39beb
+DIST aflplusplus-4.01c.tar.gz 2818445 BLAKE2B f3699c4b2fabec0ab238277c3b2c7b19b35af7a0b82b14a57c34b8579121cfa0644ef432132cf4a3382547db3faf799d2ab601512ddfb469e4a2246cdb61aa7f SHA512 d2b03ab4ff9538fe0b52aa3ed4778a6e5657d64d6f0e5f75a99305bad69c5179d6b1c882650f19a884a740577acb73dab7cee3d5c9c7b06ff2326ffeba37d1fe
EBUILD aflplusplus-4.00c.ebuild 2071 BLAKE2B c511a90fae8a8e42a9e110208ab3dd840f65a203de8eb517713f4637930bda648bb271dc185124ccca34a795c7f34264e616e1a64068a63faa457a3d91a9ebba SHA512 66c28ea49e70fc058a6a953d927b3e75675b1254d3ca29bb12a37cb56462a8ce8235ee5c7d21535619902d482933ecc5f7c927d546f4126e75d13bd7577a0159
+EBUILD aflplusplus-4.01c-r1.ebuild 2169 BLAKE2B c52e9e663b81b4c402046da03701b9a2d746651ec790e4c81517ccc2a253729d383247922c92ed20a2180a8537bfdc4e52ddd88d6bdd5e6b62eeaa223c09aac0 SHA512 160155f034240db5e57d61cbf257905814351d57960b4a52ed7186c849ff91aabff7f7cd26066d7da1a3f1fbd2cde962ebba2db7976617830cd4395da2306a6b
MISC metadata.xml 328 BLAKE2B c9ad582740e9c2ad03a30fe0eaafb8ee19f0d9bc2e98cc7bcd14385a3407f84301479d324b92d3aecafdc1e5cfef1d2cfc8a15c2ecb5d8f2fa348d82de920128 SHA512 e56ce158f6764926c2ed4dc486f017ce75fa272ac8e6ad16e4a816f8c734d7313e3dc9cb007bab07efe73e59cab185312a02d6178296bfe25002719ce4975d14
diff --git a/app-forensics/aflplusplus/aflplusplus-4.01c-r1.ebuild b/app-forensics/aflplusplus/aflplusplus-4.01c-r1.ebuild
new file mode 100644
index 000000000000..5ff60c119327
--- /dev/null
+++ b/app-forensics/aflplusplus/aflplusplus-4.01c-r1.ebuild
@@ -0,0 +1,90 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8,9,10} )
+LLVM_MAX_SLOT=14
+inherit toolchain-funcs llvm optfeature python-single-r1
+
+DESCRIPTION="A fork of AFL, the popular compile-time instrumentation fuzzer"
+HOMEPAGE="https://github.com/AFLplusplus/AFLplusplus"
+SRC_URI="https://github.com/AFLplusplus/AFLplusplus/archive/${PV}.tar.gz -> ${P}.tar.gz"
+S="${WORKDIR}/AFLplusplus-${PV}"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64"
+IUSE="test"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+# Tests involve heavy use of LD_PRELOAD in some cases
+# This isn't compatible with sandbox
+RESTRICT="test"
+
+# It turns out we need Clang too
+RDEPEND="${PYTHON_DEPS}
+ >=sys-devel/llvm-12:=
+ || (
+ sys-devel/clang:12
+ sys-devel/clang:13
+ sys-devel/clang:${LLVM_MAX_SLOT}
+ )
+ !app-forensics/afl"
+DEPEND="${RDEPEND}
+ test? ( dev-util/cmocka )"
+
+QA_PREBUILT="usr/share/afl/testcases/others/elf/small_exec.elf"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-4.01c-respect-flags.patch
+ "${FILESDIR}"/${PN}-4.01c-no-ignore-errors-makefile.patch
+ "${FILESDIR}"/${PN}-4.01c-lld-detect.patch
+)
+
+llvm_check_deps() {
+ has_version -b "sys-devel/clang:${LLVM_SLOT}" && \
+ has_version -b "sys-devel/llvm:${LLVM_SLOT}"
+}
+
+pkg_setup() {
+ llvm_pkg_setup
+ python-single-r1_pkg_setup
+}
+
+src_compile() {
+ emake \
+ CC="$(tc-getCC)" \
+ CXX="$(tc-getCXX)" \
+ CFLAGS_FLTO="" \
+ PREFIX="${EPREFIX}/usr" \
+ HELPER_PATH="${EPREFIX}/usr/$(get_libdir)/afl" \
+ DOC_PATH="${EPREFIX}/usr/share/doc/${PF}" \
+ MAN_PATH="${EPREFIX}/usr/share/man/man8"
+}
+
+src_test() {
+ emake \
+ CC="$(tc-getCC)" \
+ CXX="$(tc-getCXX)"
+}
+
+src_install() {
+ emake \
+ CC="$(tc-getCC)" \
+ CXX="$(tc-getCXX)" \
+ DESTDIR="${D}" \
+ PREFIX="${EPREFIX}/usr" \
+ HELPER_PATH="${EPREFIX}/usr/$(get_libdir)/afl" \
+ DOC_PATH="${EPREFIX}/usr/share/doc/${PF}" \
+ MAN_PATH="${EPREFIX}/usr/share/man/man8" \
+ install
+ dostrip -x /usr/share/afl/testcases/
+}
+
+pkg_postinst() {
+ # TODO: Any others?
+ optfeature "fuzzing with AFL_USE_ASAN" sys-libs/compiler-rt-sanitizers[asan]
+ optfeature "fuzzing with AFL_USE_MSAN" sys-libs/compiler-rt-sanitizers[msan]
+}
diff --git a/app-forensics/aflplusplus/files/aflplusplus-4.01c-lld-detect.patch b/app-forensics/aflplusplus/files/aflplusplus-4.01c-lld-detect.patch
new file mode 100644
index 000000000000..cec2c9d17979
--- /dev/null
+++ b/app-forensics/aflplusplus/files/aflplusplus-4.01c-lld-detect.patch
@@ -0,0 +1,14 @@
+--- a/GNUmakefile.llvm
++++ b/GNUmakefile.llvm
+@@ -218,9 +218,8 @@ endif
+ ifeq "$(LLVM_LTO)" "1"
+ ifneq "$(AFL_CLANG_FLTO)" ""
+ ifeq "$(AFL_REAL_LD)" ""
+- ifneq "$(shell readlink $(LLVM_BINDIR)/ld.lld 2>&1)" ""
+- AFL_REAL_LD = $(LLVM_BINDIR)/ld.lld
+- else
++ AFL_REAL_LD = "$(shell command -v $(LLVM_BINDIR)/ld.lld 2>/dev/null || command -v ld.lld 2>/dev/null)"
++ ifeq "$(AFL_REAL_LD)" ""
+ $(warning ld.lld not found, cannot enable LTO mode)
+ LLVM_LTO = 0
+ endif
diff --git a/app-forensics/aflplusplus/files/aflplusplus-4.01c-no-ignore-errors-makefile.patch b/app-forensics/aflplusplus/files/aflplusplus-4.01c-no-ignore-errors-makefile.patch
new file mode 100644
index 000000000000..861835892bb5
--- /dev/null
+++ b/app-forensics/aflplusplus/files/aflplusplus-4.01c-no-ignore-errors-makefile.patch
@@ -0,0 +1,155 @@
+https://bugs.gentoo.org/800941
+(also don't override jobs for sub-makes)
+
+--- a/GNUmakefile
++++ b/GNUmakefile
+@@ -308,17 +308,17 @@ endif
+
+ .PHONY: all
+ all: test_x86 test_shm test_python ready $(PROGS) afl-as llvm gcc_plugin test_build all_done
+- -$(MAKE) -C utils/aflpp_driver
++ $(MAKE) -C utils/aflpp_driver
+
+ .PHONY: llvm
+ llvm:
+- -$(MAKE) -j4 -f GNUmakefile.llvm
++ $(MAKE) -f GNUmakefile.llvm
+ @test -e afl-cc || { echo "[-] Compiling afl-cc failed. You seem not to have a working compiler." ; exit 1; }
+
+ .PHONY: gcc_plugin
+ gcc_plugin:
+ ifneq "$(SYS)" "Darwin"
+- -$(MAKE) -f GNUmakefile.gcc_plugin
++ $(MAKE) -f GNUmakefile.gcc_plugin
+ endif
+
+ .PHONY: man
+@@ -568,19 +568,19 @@ all_done: test_build
+ .PHONY: clean
+ clean:
+ rm -rf $(PROGS) afl-fuzz-document afl-as as afl-g++ afl-clang afl-clang++ *.o src/*.o *~ a.out core core.[1-9][0-9]* *.stackdump .test .test1 .test2 test-instr .test-instr0 .test-instr1 afl-cs-proxy afl-qemu-trace afl-gcc-fast afl-g++-fast ld *.so *.8 test/unittests/*.o test/unittests/unit_maybe_alloc test/unittests/preallocable .afl-* afl-gcc afl-g++ afl-clang afl-clang++ test/unittests/unit_hash test/unittests/unit_rand *.dSYM lib*.a
+- -$(MAKE) -f GNUmakefile.llvm clean
+- -$(MAKE) -f GNUmakefile.gcc_plugin clean
+- -$(MAKE) -C utils/libdislocator clean
+- -$(MAKE) -C utils/libtokencap clean
++ $(MAKE) -f GNUmakefile.llvm clean
++ $(MAKE) -f GNUmakefile.gcc_plugin clean
++ $(MAKE) -C utils/libdislocator clean
++ $(MAKE) -C utils/libtokencap clean
+ $(MAKE) -C utils/aflpp_driver clean
+- -$(MAKE) -C utils/afl_network_proxy clean
+- -$(MAKE) -C utils/socket_fuzzing clean
+- -$(MAKE) -C utils/argv_fuzzing clean
+- -$(MAKE) -C utils/plot_ui clean
+- -$(MAKE) -C qemu_mode/unsigaction clean
+- -$(MAKE) -C qemu_mode/libcompcov clean
+- -$(MAKE) -C qemu_mode/libqasan clean
+- -$(MAKE) -C frida_mode clean
++ $(MAKE) -C utils/afl_network_proxy clean
++ $(MAKE) -C utils/socket_fuzzing clean
++ $(MAKE) -C utils/argv_fuzzing clean
++ $(MAKE) -C utils/plot_ui clean
++ $(MAKE) -C qemu_mode/unsigaction clean
++ $(MAKE) -C qemu_mode/libcompcov clean
++ $(MAKE) -C qemu_mode/libqasan clean
++ $(MAKE) -C frida_mode clean
+ rm -rf nyx_mode/packer/linux_initramfs/init.cpio.gz nyx_mode/libnyx/libnyx/target/release/* nyx_mode/QEMU-Nyx/x86_64-softmmu/qemu-system-x86_64
+ ifeq "$(IN_REPO)" "1"
+ -test -e coresight_mode/coresight-trace/Makefile && $(MAKE) -C coresight_mode/coresight-trace clean || true
+@@ -610,20 +610,20 @@ endif
+
+ .PHONY: distrib
+ distrib: all
+- -$(MAKE) -j4 -f GNUmakefile.llvm
++ $(MAKE) -f GNUmakefile.llvm
+ ifneq "$(SYS)" "Darwin"
+- -$(MAKE) -f GNUmakefile.gcc_plugin
++ $(MAKE) -f GNUmakefile.gcc_plugin
+ endif
+- -$(MAKE) -C utils/libdislocator
+- -$(MAKE) -C utils/libtokencap
+- -$(MAKE) -C utils/afl_network_proxy
+- -$(MAKE) -C utils/socket_fuzzing
+- -$(MAKE) -C utils/argv_fuzzing
+- # -$(MAKE) -C utils/plot_ui
+- -$(MAKE) -C frida_mode
++ $(MAKE) -C utils/libdislocator
++ $(MAKE) -C utils/libtokencap
++ $(MAKE) -C utils/afl_network_proxy
++ $(MAKE) -C utils/socket_fuzzing
++ $(MAKE) -C utils/argv_fuzzing
++ # $(MAKE) -C utils/plot_ui
++ $(MAKE) -C frida_mode
+ ifneq "$(SYS)" "Darwin"
+ ifeq "$(ARCH)" "aarch64"
+- -$(MAKE) -C coresight_mode
++ $(MAKE) -C coresight_mode
+ endif
+ ifeq "$(SYS)" "Linux"
+ ifndef NO_NYX
+@@ -636,16 +636,16 @@ endif
+
+ .PHONY: binary-only
+ binary-only: test_shm test_python ready $(PROGS)
+- -$(MAKE) -C utils/libdislocator
+- -$(MAKE) -C utils/libtokencap
+- -$(MAKE) -C utils/afl_network_proxy
+- -$(MAKE) -C utils/socket_fuzzing
+- -$(MAKE) -C utils/argv_fuzzing
+- # -$(MAKE) -C utils/plot_ui
+- -$(MAKE) -C frida_mode
++ $(MAKE) -C utils/libdislocator
++ $(MAKE) -C utils/libtokencap
++ $(MAKE) -C utils/afl_network_proxy
++ $(MAKE) -C utils/socket_fuzzing
++ $(MAKE) -C utils/argv_fuzzing
++ # $(MAKE) -C utils/plot_ui
++ $(MAKE) -C frida_mode
+ ifneq "$(SYS)" "Darwin"
+ ifeq "$(ARCH)" "aarch64"
+- -$(MAKE) -C coresight_mode
++ $(MAKE) -C coresight_mode
+ endif
+ ifeq "$(SYS)" "Linux"
+ ifndef NO_NYX
+@@ -658,13 +658,13 @@ endif
+
+ .PHONY: source-only
+ source-only: all
+- -$(MAKE) -j4 -f GNUmakefile.llvm
++ $(MAKE) -f GNUmakefile.llvm
+ ifneq "$(SYS)" "Darwin"
+- -$(MAKE) -f GNUmakefile.gcc_plugin
++ $(MAKE) -f GNUmakefile.gcc_plugin
+ endif
+- -$(MAKE) -C utils/libdislocator
+- -$(MAKE) -C utils/libtokencap
+- # -$(MAKE) -C utils/plot_ui
++ $(MAKE) -C utils/libdislocator
++ $(MAKE) -C utils/libtokencap
++ # $(MAKE) -C utils/plot_ui
+ ifeq "$(SYS)" "Linux"
+ ifndef NO_NYX
+ -cd nyx_mode && ./build_nyx_support.sh
+@@ -712,9 +712,9 @@ install: all $(MANPAGES)
+ @if [ -f utils/afl_network_proxy/afl-network-server ]; then $(MAKE) -C utils/afl_network_proxy install; fi
+ @if [ -f utils/aflpp_driver/libAFLDriver.a ]; then set -e; install -m 644 utils/aflpp_driver/libAFLDriver.a $${DESTDIR}$(HELPER_PATH); fi
+ @if [ -f utils/aflpp_driver/libAFLQemuDriver.a ]; then set -e; install -m 644 utils/aflpp_driver/libAFLQemuDriver.a $${DESTDIR}$(HELPER_PATH); fi
+- -$(MAKE) -f GNUmakefile.llvm install
++ $(MAKE) -f GNUmakefile.llvm install
+ ifneq "$(SYS)" "Darwin"
+- -$(MAKE) -f GNUmakefile.gcc_plugin install
++ $(MAKE) -f GNUmakefile.gcc_plugin install
+ endif
+ ln -sf afl-cc $${DESTDIR}$(BIN_PATH)/afl-gcc
+ ln -sf afl-cc $${DESTDIR}$(BIN_PATH)/afl-g++
+--- a/GNUmakefile.llvm
++++ b/GNUmakefile.llvm
+@@ -463,6 +463,7 @@ document:
+ test_build: $(PROGS)
+ @echo "[*] Testing the CC wrapper and instrumentation output..."
+ unset AFL_USE_ASAN AFL_USE_MSAN AFL_INST_RATIO; ASAN_OPTIONS=detect_leaks=0 AFL_QUIET=1 AFL_PATH=. AFL_LLVM_LAF_ALL=1 ./afl-cc ./test-instr.c -o test-instr
++ @test -e test-instr || { echo "[-] Testing CC wrapper failed. You seem not to have a working compiler." ; exit 1; }
+ ASAN_OPTIONS=detect_leaks=0 ./afl-showmap -m none -q -o .test-instr0 ./test-instr < /dev/null
+ echo 1 | ASAN_OPTIONS=detect_leaks=0 ./afl-showmap -m none -q -o .test-instr1 ./test-instr
+ @rm -f test-instr
diff --git a/app-forensics/aflplusplus/files/aflplusplus-4.01c-respect-flags.patch b/app-forensics/aflplusplus/files/aflplusplus-4.01c-respect-flags.patch
new file mode 100644
index 000000000000..0fe62c0b41ae
--- /dev/null
+++ b/app-forensics/aflplusplus/files/aflplusplus-4.01c-respect-flags.patch
@@ -0,0 +1,197 @@
+* Respect AR, CC, CFLAGS, CPPFLAGS, LDFLAGS everywhere when building.
+* Ignore build flags then when testing the CC wrappers (could contain
+ incompatible flags).
+* Disable LTO for runtime objects, these shouldn't contain IR.
+
+--- a/GNUmakefile
++++ b/GNUmakefile
+@@ -423,7 +423,7 @@ afl-as: src/afl-as.c include/afl-as.h $(COMM_HDR) | test_x86
+ @ln -sf afl-as as
+
+ src/afl-performance.o : $(COMM_HDR) src/afl-performance.c include/hash.h
+- $(CC) $(CFLAGS) $(CFLAGS_OPT) -Iinclude -c src/afl-performance.c -o src/afl-performance.o
++ $(CC) $(CFLAGS) -Iinclude -c src/afl-performance.c -o src/afl-performance.o
+
+ src/afl-common.o : $(COMM_HDR) src/afl-common.c include/common.h
+ $(CC) $(CFLAGS) $(CFLAGS_FLTO) -c src/afl-common.c -o src/afl-common.o
+@@ -531,7 +531,7 @@ .PHONY: test_build
+ ifndef AFL_NO_X86
+ test_build: afl-cc afl-gcc afl-as afl-showmap
+ @echo "[*] Testing the CC wrapper afl-cc and its instrumentation output..."
+- @unset AFL_MAP_SIZE AFL_USE_UBSAN AFL_USE_CFISAN AFL_USE_LSAN AFL_USE_ASAN AFL_USE_MSAN; ASAN_OPTIONS=detect_leaks=0 AFL_INST_RATIO=100 AFL_PATH=. ./afl-cc test-instr.c $(LDFLAGS) -o test-instr 2>&1 || (echo "Oops, afl-cc failed"; exit 1 )
++ @unset AFL_MAP_SIZE AFL_USE_UBSAN AFL_USE_CFISAN AFL_USE_LSAN AFL_USE_ASAN AFL_USE_MSAN; ASAN_OPTIONS=detect_leaks=0 AFL_INST_RATIO=100 AFL_PATH=. ./afl-cc test-instr.c -o test-instr 2>&1 || (echo "Oops, afl-cc failed"; exit 1 )
+ ASAN_OPTIONS=detect_leaks=0 ./afl-showmap -m none -q -o .test-instr0 ./test-instr < /dev/null
+ echo 1 | ASAN_OPTIONS=detect_leaks=0 ./afl-showmap -m none -q -o .test-instr1 ./test-instr
+ @rm -f test-instr
+--- a/GNUmakefile.gcc_plugin
++++ b/GNUmakefile.gcc_plugin
+@@ -131,18 +131,18 @@ afl-common.o: ./src/afl-common.c
+ $(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@ $(LDFLAGS)
+
+ ./afl-compiler-rt.o: instrumentation/afl-compiler-rt.o.c
+- $(CC) $(CFLAGS_SAFE) $(CPPFLAGS) -O3 -Wno-unused-result -fPIC -c $< -o $@
++ $(CC) $(CFLAGS) $(CFLAGS_SAFE) $(CPPFLAGS) -Wno-unused-result -fPIC -fno-lto -c $< -o $@
+
+ ./afl-compiler-rt-32.o: instrumentation/afl-compiler-rt.o.c
+ @printf "[*] Building 32-bit variant of the runtime (-m32)... "
+- @$(CC) $(CFLAGS_SAFE) $(CPPFLAGS) -O3 -Wno-unused-result -m32 -fPIC -c $< -o $@ 2>/dev/null; if [ "$$?" = "0" ]; then echo "success!"; else echo "failed (that's fine)"; fi
++ @$(CC) $(CFLAGS) $(CFLAGS_SAFE) $(CPPFLAGS) -Wno-unused-result -m32 -fPIC -fno-lto -c $< -o $@ 2>/dev/null; if [ "$$?" = "0" ]; then echo "success!"; else echo "failed (that's fine)"; fi
+
+ ./afl-compiler-rt-64.o: instrumentation/afl-compiler-rt.o.c
+ @printf "[*] Building 64-bit variant of the runtime (-m64)... "
+- @$(CC) $(CFLAGS_SAFE) $(CPPFLAGS) -O3 -Wno-unused-result -m64 -fPIC -c $< -o $@ 2>/dev/null; if [ "$$?" = "0" ]; then echo "success!"; else echo "failed (that's fine)"; fi
++ @$(CC) $(CFLAGS) $(CFLAGS_SAFE) $(CPPFLAGS) -Wno-unused-result -m64 -fPIC -fno-lto -c $< -o $@ 2>/dev/null; if [ "$$?" = "0" ]; then echo "success!"; else echo "failed (that's fine)"; fi
+
+ ./afl-gcc-pass.so: instrumentation/afl-gcc-pass.so.cc | test_deps
+- $(CXX) $(CXXEFLAGS) $(PLUGIN_FLAGS) -shared $< -o $@
++ $(CXX) $(CXXEFLAGS) $(PLUGIN_FLAGS) -shared $< -o $@ $(LDFLAGS)
+ ln -sf afl-cc afl-gcc-fast
+ ln -sf afl-cc afl-g++-fast
+ ln -sf afl-cc.8 afl-gcc-fast.8
+--- a/GNUmakefile.llvm
++++ b/GNUmakefile.llvm
+@@ -410,7 +410,7 @@ endif
+
+ ./afl-ld-lto: src/afl-ld-lto.c
+ ifeq "$(LLVM_LTO)" "1"
+- $(CC) $(CFLAGS) $(CPPFLAGS) $< -o $@
++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $< -o $@
+ endif
+
+ ./SanitizerCoverageLTO.so: instrumentation/SanitizerCoverageLTO.so.cc instrumentation/afl-llvm-common.o
+@@ -444,25 +444,25 @@ afl-llvm-dict2file.so: instrumentation/afl-llvm-dict2file.so.cc instrumentation/
+
+ .PHONY: document
+ document:
+- $(CLANG_BIN) -D_AFL_DOCUMENT_MUTATIONS $(CFLAGS_SAFE) $(CPPFLAGS) $(CLANG_CFL) -O3 -Wno-unused-result -fPIC -c instrumentation/afl-compiler-rt.o.c -o ./afl-compiler-rt.o
+- @$(CLANG_BIN) -D_AFL_DOCUMENT_MUTATIONS $(CFLAGS_SAFE) $(CPPFLAGS) $(CLANG_CFL) -O3 -Wno-unused-result -m32 -fPIC -c instrumentation/afl-compiler-rt.o.c -o ./afl-compiler-rt-32.o 2>/dev/null; if [ "$$?" = "0" ]; then echo "success!"; else echo "failed (that's fine)"; fi
+- @$(CLANG_BIN) -D_AFL_DOCUMENT_MUTATIONS $(CFLAGS_SAFE) $(CPPFLAGS) $(CLANG_CFL) -O3 -Wno-unused-result -m64 -fPIC -c instrumentation/afl-compiler-rt.o.c -o ./afl-compiler-rt-64.o 2>/dev/null; if [ "$$?" = "0" ]; then echo "success!"; else echo "failed (that's fine)"; fi
++ $(CLANG_BIN) -D_AFL_DOCUMENT_MUTATIONS $(CFLAGS) $(CFLAGS_SAFE) $(CPPFLAGS) $(CLANG_CFL) -Wno-unused-result -fPIC -c instrumentation/afl-compiler-rt.o.c -o ./afl-compiler-rt.o
++ @$(CLANG_BIN) -D_AFL_DOCUMENT_MUTATIONS $(CFLAGS) $(CFLAGS_SAFE) $(CPPFLAGS) $(CLANG_CFL) -Wno-unused-result -m32 -fPIC -c instrumentation/afl-compiler-rt.o.c -o ./afl-compiler-rt-32.o 2>/dev/null; if [ "$$?" = "0" ]; then echo "success!"; else echo "failed (that's fine)"; fi
++ @$(CLANG_BIN) -D_AFL_DOCUMENT_MUTATIONS $(CFLAGS) $(CFLAGS_SAFE) $(CPPFLAGS) $(CLANG_CFL) -Wno-unused-result -m64 -fPIC -c instrumentation/afl-compiler-rt.o.c -o ./afl-compiler-rt-64.o 2>/dev/null; if [ "$$?" = "0" ]; then echo "success!"; else echo "failed (that's fine)"; fi
+
+ ./afl-compiler-rt.o: instrumentation/afl-compiler-rt.o.c
+- $(CC) $(CLANG_CFL) $(CFLAGS_SAFE) $(CPPFLAGS) -O3 -Wno-unused-result -fPIC -c $< -o $@
++ $(CC) $(CFLAGS) $(CLANG_CFL) $(CFLAGS_SAFE) $(CPPFLAGS) -Wno-unused-result -fPIC -fno-lto -c $< -o $@
+
+ ./afl-compiler-rt-32.o: instrumentation/afl-compiler-rt.o.c
+ @printf "[*] Building 32-bit variant of the runtime (-m32)... "
+- @$(CC) $(CLANG_CFL) $(CFLAGS_SAFE) $(CPPFLAGS) -O3 -Wno-unused-result -m32 -fPIC -c $< -o $@ 2>/dev/null; if [ "$$?" = "0" ]; then echo "success!"; else echo "failed (that's fine)"; fi
++ @$(CC) $(CFLAGS) $(CLANG_CFL) $(CFLAGS_SAFE) $(CPPFLAGS) -Wno-unused-result -m32 -fPIC -fno-lto -c $< -o $@ 2>/dev/null; if [ "$$?" = "0" ]; then echo "success!"; else echo "failed (that's fine)"; fi
+
+ ./afl-compiler-rt-64.o: instrumentation/afl-compiler-rt.o.c
+ @printf "[*] Building 64-bit variant of the runtime (-m64)... "
+- @$(CC) $(CLANG_CFL) $(CFLAGS_SAFE) $(CPPFLAGS) -O3 -Wno-unused-result -m64 -fPIC -c $< -o $@ 2>/dev/null; if [ "$$?" = "0" ]; then echo "success!"; else echo "failed (that's fine)"; fi
++ @$(CC) $(CFLAGS) $(CLANG_CFL) $(CFLAGS_SAFE) $(CPPFLAGS) -Wno-unused-result -m64 -fPIC -fno-lto -c $< -o $@ 2>/dev/null; if [ "$$?" = "0" ]; then echo "success!"; else echo "failed (that's fine)"; fi
+
+ .PHONY: test_build
+ test_build: $(PROGS)
+ @echo "[*] Testing the CC wrapper and instrumentation output..."
+- unset AFL_USE_ASAN AFL_USE_MSAN AFL_INST_RATIO; ASAN_OPTIONS=detect_leaks=0 AFL_QUIET=1 AFL_PATH=. AFL_LLVM_LAF_ALL=1 ./afl-cc $(CFLAGS) $(CPPFLAGS) ./test-instr.c -o test-instr $(LDFLAGS)
++ unset AFL_USE_ASAN AFL_USE_MSAN AFL_INST_RATIO; ASAN_OPTIONS=detect_leaks=0 AFL_QUIET=1 AFL_PATH=. AFL_LLVM_LAF_ALL=1 ./afl-cc ./test-instr.c -o test-instr
+ ASAN_OPTIONS=detect_leaks=0 ./afl-showmap -m none -q -o .test-instr0 ./test-instr < /dev/null
+ echo 1 | ASAN_OPTIONS=detect_leaks=0 ./afl-showmap -m none -q -o .test-instr1 ./test-instr
+ @rm -f test-instr
+--- a/custom_mutators/honggfuzz/Makefile
++++ b/custom_mutators/honggfuzz/Makefile
+@@ -1,5 +1,6 @@
+
+-CFLAGS = -O3 -funroll-loops -fPIC -Wl,-Bsymbolic
++CFLAGS ?= -O3
++CFLAGS += -funroll-loops -fPIC -Wl,-Bsymbolic
+
+ all: honggfuzz-mutator.so
+
+--- a/custom_mutators/libfuzzer/Makefile
++++ b/custom_mutators/libfuzzer/Makefile
+@@ -1,5 +1,5 @@
+
+-CFLAGS = -g -O3 -funroll-loops -fPIC -fpermissive -std=c++11
+-#CFLAGS = -g -O0 -fPIC -fpermissive -std=c++11
++CFLAGS ?= -g -O3
++CFLAGS += -funroll-loops -fpermissive -std=c++11 -fPIC
+ CXX ?= clang++
+
+--- a/frida_mode/GNUmakefile
++++ b/frida_mode/GNUmakefile
+@@ -17,7 +17,6 @@ CFLAGS+=-fPIC \
+ -D_GNU_SOURCE \
+ -D_FORTIFY_SOURCE=2 \
+ -g \
+- -O3 \
+ -funroll-loops \
+ -ffunction-sections \
+
+--- a/frida_mode/test/png/persistent/hook/GNUmakefile
++++ b/frida_mode/test/png/persistent/hook/GNUmakefile
+@@ -5,11 +5,9 @@ BUILD_DIR:=$(PWD)build/
+ AFLPP_FRIDA_DRIVER_HOOK_OBJ=$(ROOT)frida_mode/build/frida_hook.so
+ AFLPP_QEMU_DRIVER_HOOK_OBJ=$(ROOT)frida_mode/build/qemu_hook.so
+
+-CFLAGS+=-O3 \
+- -funroll-loops \
++CFLAGS+= -funroll-loops \
+ -g \
+- -fPIC \
+- -funroll-loops \
++ -fPIC
+
+ LDFLAGS+=-shared \
+
+--- a/utils/aflpp_driver/GNUmakefile
++++ b/utils/aflpp_driver/GNUmakefile
+@@ -13,40 +13,42 @@ ifneq "" "$(LLVM_BINDIR)"
+ LLVM_BINDIR := $(LLVM_BINDIR)/
+ endif
+
+-CFLAGS := -O3 -funroll-loops -g -fPIC
++AR ?= ar
++CFLAGS ?= -O3 -funroll-loops -g
++CFLAGS += -fPIC -fno-lto
+
+ all: libAFLDriver.a libAFLQemuDriver.a aflpp_qemu_driver_hook.so
+
+ aflpp_driver.o: aflpp_driver.c
+- -$(LLVM_BINDIR)clang -I. -I../../include $(CFLAGS) -c aflpp_driver.c
++ $(CC) $(CPPFLAGS) -I. -I../../include $(CFLAGS) -c aflpp_driver.c
+
+ libAFLDriver.a: aflpp_driver.o
+- @ar rc libAFLDriver.a aflpp_driver.o
++ $(AR) rc libAFLDriver.a aflpp_driver.o
+ @cp -vf libAFLDriver.a ../../
+
+ debug:
+- $(LLVM_BINDIR)clang -Wno-deprecated -I../../include $(CFLAGS) -D_DEBUG=\"1\" -c -o afl-performance.o ../../src/afl-performance.c
+- $(LLVM_BINDIR)clang -I../../include -D_DEBUG=\"1\" -g -funroll-loops -c aflpp_driver.c
++ $(CC) $(CPPFLAGS) -Wno-deprecated -I../../include $(CFLAGS) -D_DEBUG=\"1\" -c -o afl-performance.o ../../src/afl-performance.c
++ $(CC) $(CPPFLAGS) -I../../include -D_DEBUG=\"1\" $(CFLAGS) -g -funroll-loops -c aflpp_driver.c
+ #$(LLVM_BINDIR)clang -S -emit-llvm -Wno-deprecated -I../../include $(CFLAGS) -D_DEBUG=\"1\" -c -o afl-performance.ll ../../src/afl-performance.c
+ #$(LLVM_BINDIR)clang -S -emit-llvm -I../../include -D_DEBUG=\"1\" -g -funroll-loops -c aflpp_driver.c
+- ar rc libAFLDriver.a afl-performance.o aflpp_driver.o
++ $(AR) rc libAFLDriver.a afl-performance.o aflpp_driver.o
+
+ aflpp_qemu_driver.o: aflpp_qemu_driver.c
+- -$(LLVM_BINDIR)clang $(CFLAGS) -O0 -funroll-loops -c aflpp_qemu_driver.c
++ $(CC) $(CPPFLAGS) $(CFLAGS) -O0 -funroll-loops -c aflpp_qemu_driver.c
+
+ libAFLQemuDriver.a: aflpp_qemu_driver.o
+- @-ar rc libAFLQemuDriver.a aflpp_qemu_driver.o
+- @-cp -vf libAFLQemuDriver.a ../../
++ $(AR) rc libAFLQemuDriver.a aflpp_qemu_driver.o
++ @cp -vf libAFLQemuDriver.a ../../
+
+ aflpp_qemu_driver_hook.so: aflpp_qemu_driver_hook.o
+- @-test -e aflpp_qemu_driver_hook.o && $(LLVM_BINDIR)clang $(LDFLAGS) -shared aflpp_qemu_driver_hook.o -o aflpp_qemu_driver_hook.so || echo "Note: Optional aflpp_qemu_driver_hook.so not built."
++ @test -e aflpp_qemu_driver_hook.o && $(CC) $(LDFLAGS) -shared aflpp_qemu_driver_hook.o -o aflpp_qemu_driver_hook.so || echo "Note: Optional aflpp_qemu_driver_hook.so not built."
+
+ aflpp_qemu_driver_hook.o: aflpp_qemu_driver_hook.c
+- @-test -e ../../qemu_mode/qemuafl/qemuafl/api.h && $(LLVM_BINDIR)clang $(CFLAGS) -funroll-loops -c aflpp_qemu_driver_hook.c || echo "Note: Optional aflpp_qemu_driver_hook.o not built."
++ @test -e ../../qemu_mode/qemuafl/qemuafl/api.h && $(CC) $(CPPFLAGS) $(CFLAGS) -funroll-loops -c aflpp_qemu_driver_hook.c || echo "Note: Optional aflpp_qemu_driver_hook.o not built."
+
+ test: debug
+ #clang -S -emit-llvm -D_DEBUG=\"1\" -I../../include -Wl,--allow-multiple-definition -funroll-loops -o aflpp_driver_test.ll aflpp_driver_test.c
+- afl-clang-fast -D_DEBUG=\"1\" -I../../include -Wl,--allow-multiple-definition -funroll-loops -o aflpp_driver_test aflpp_driver_test.c libAFLDriver.a afl-performance.o
++ ../../afl-clang-fast -D_DEBUG=\"1\" -I../../include -Wl,--allow-multiple-definition -funroll-loops -o aflpp_driver_test aflpp_driver_test.c libAFLDriver.a afl-performance.o
+
+ clean:
+ rm -f *.o libAFLDriver*.a libAFLQemuDriver.a aflpp_qemu_driver_hook.so *~ core aflpp_driver_test
diff --git a/app-forensics/yara/Manifest b/app-forensics/yara/Manifest
index 4420d1650635..a5b3561e40b5 100644
--- a/app-forensics/yara/Manifest
+++ b/app-forensics/yara/Manifest
@@ -1,6 +1,8 @@
AUX yara-4.2-test.patch 450 BLAKE2B b15319c9921e88504057deead820a884b963e2c240c5486fcfbaf51d7139932bd220de65f8f476f8a264529ac08fbec5ad9e40565d50a3157bb3b3ca783ff26e SHA512 36604637a5de0d6a9553b92b6f6e732cce312b7fe65dcdf70ea70e0a552251f2dd2b5916cad8c78138b946ee4b0bf558324cf944eff519e37af3c83efe61177a
DIST yara-4.2.0.tar.gz 1284059 BLAKE2B 735d161fde5f84199315f1ce6d31f1ad79488312bede85d2941a03cb97fe75c3c4db0b3cba75782d338a462d87e9d9ed57b393bbdb68decfb350a1bbd096258b SHA512 24ca707015c77d87126bcaac0991997f6b09403024765d615a06db47191a3f0177e1c1eb4a917ec8412876b61d28f4a708f36999ddd9214c3967968c71ae3b7c
DIST yara-4.2.1.tar.gz 1285173 BLAKE2B dc290bf7fe85d468fd519e68a12d88097d817ca064a665397ba64768078a2d572b46e488eb48747ea1904207598b41a72a510b4b8e4e8601cf518cb6ab98c322 SHA512 036a35d713647b23998135da0d27c13a8876aa44e18e3c9dc99fa425273d7c4a953cbdc78f413f29e8bf818d84b340d0719e241d2a83b7165a16d97e952c45b0
-EBUILD yara-4.2.0-r1.ebuild 1229 BLAKE2B d8883b6c768bdd079dacbfd248323454632b4382e977a531d7845c5f43ab5d54252d660b6f707507892bc6df9c83e8aa2fd60ad614ab5105011f8dc9cf6721a4 SHA512 62d73483d08730a79a0539bf3b2c538c923be2150a6a3796c488bab1195bdd35d7d74ea077c98b16cb5198f8d2b5c75ee8da0cee62612e403997947ad8f6f115
-EBUILD yara-4.2.1.ebuild 1229 BLAKE2B d8883b6c768bdd079dacbfd248323454632b4382e977a531d7845c5f43ab5d54252d660b6f707507892bc6df9c83e8aa2fd60ad614ab5105011f8dc9cf6721a4 SHA512 62d73483d08730a79a0539bf3b2c538c923be2150a6a3796c488bab1195bdd35d7d74ea077c98b16cb5198f8d2b5c75ee8da0cee62612e403997947ad8f6f115
+DIST yara-4.2.2.tar.gz 1287486 BLAKE2B 956a9ed4dab64d24cff680248b4f95b06287e96d27b3f94ff80e97641b3dc4581eaee59cf0d19dfffa9f90a6f0a56f95d3f90f9e9472b65e133bf4aac3e42da3 SHA512 6eb42e63eff93ce636e1d2ae84e30621eeea0d91e1d72bb2cbe826aca6af306bb3564ac2314bc090fb59c9aca5436e72d33658009722ce0cfbaae7ef87cc894e
+EBUILD yara-4.2.0-r1.ebuild 1235 BLAKE2B fb9a2aadf66a8e0d31d4be0028c3d1c6d300fb9c211aaf2c1cb0944836105a0e7ad8e2dad93427464a0fb595473efcd3bb4ec9fb5718e280b2b0ee1dfd503e45 SHA512 20261ad386daae1b9de122eef6794099a661134c6efbcdaf84f64c687465040743187ebbcad5f7b8c56543db6a41cbf442a63c71ddf608112c1504a7f2f9c75a
+EBUILD yara-4.2.1.ebuild 1235 BLAKE2B fb9a2aadf66a8e0d31d4be0028c3d1c6d300fb9c211aaf2c1cb0944836105a0e7ad8e2dad93427464a0fb595473efcd3bb4ec9fb5718e280b2b0ee1dfd503e45 SHA512 20261ad386daae1b9de122eef6794099a661134c6efbcdaf84f64c687465040743187ebbcad5f7b8c56543db6a41cbf442a63c71ddf608112c1504a7f2f9c75a
+EBUILD yara-4.2.2.ebuild 1242 BLAKE2B 86e47f4928b80eb685ad88e98b3130bb696cb9da7fa0d15271e2b9b49760b853393003016810b1f3da2f655e5f343acaf83b852185d2ce8bddac2a036e6cdc8b SHA512 8c63f241bdb49cf02b117186c6f23460f20a47bbb4d2ab6a445585e541a0f0962624790c881e8ec95e1d4d5291dd89d73ebe138dc11cf6159fdcbe0f97377f67
MISC metadata.xml 1151 BLAKE2B a2f641c9c0f851884cc6482248446d7b509e4ca2c5cec26159063a0fec025b8928955cfefbdf87e26ace0d06a01a2cec7d1f3d10b09b99b1cf1040c09519adfa SHA512 5001e3a14dc458a6b27f69226fb346dc8bf07058270e20b81f325c0742300ccb6e241b3d3dc6f55eccc43b68f0fea74977d33d8bcca6d0612057f6015f857500
diff --git a/app-forensics/yara/yara-4.2.0-r1.ebuild b/app-forensics/yara/yara-4.2.0-r1.ebuild
index 55e7f11069d5..a4761519106a 100644
--- a/app-forensics/yara/yara-4.2.0-r1.ebuild
+++ b/app-forensics/yara/yara-4.2.0-r1.ebuild
@@ -53,5 +53,5 @@ src_install() {
# TODO: Allow tests to work against dyn. lib rather than building
# statically just for tests.
- find "${ED}" -name '*.a' -o -name '*.la' -delete || die
+ find "${ED}" \( -name '*.a' -o -name '*.la' \) -delete || die
}
diff --git a/app-forensics/yara/yara-4.2.1.ebuild b/app-forensics/yara/yara-4.2.1.ebuild
index 55e7f11069d5..a4761519106a 100644
--- a/app-forensics/yara/yara-4.2.1.ebuild
+++ b/app-forensics/yara/yara-4.2.1.ebuild
@@ -53,5 +53,5 @@ src_install() {
# TODO: Allow tests to work against dyn. lib rather than building
# statically just for tests.
- find "${ED}" -name '*.a' -o -name '*.la' -delete || die
+ find "${ED}" \( -name '*.a' -o -name '*.la' \) -delete || die
}
diff --git a/app-forensics/yara/yara-4.2.2.ebuild b/app-forensics/yara/yara-4.2.2.ebuild
new file mode 100644
index 000000000000..cf8905b87957
--- /dev/null
+++ b/app-forensics/yara/yara-4.2.2.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools
+
+DESCRIPTION="A malware identification and classification tool"
+HOMEPAGE="http://virustotal.github.io/yara/"
+SRC_URI="https://github.com/virustotal/yara/archive/v${PV/_/-}.tar.gz -> ${P}.tar.gz"
+S="${WORKDIR}/${PN}-${PV/_/-}"
+
+LICENSE="Apache-2.0"
+SLOT="0/8"
+if [[ ${PV} != *_rc* ]] ; then
+ KEYWORDS="~amd64 ~ppc64 ~x86"
+fi
+IUSE="+dex +dotnet +cuckoo +macho +magic profiling python test"
+RESTRICT="!test? ( test )"
+
+DEPEND="
+ dev-libs/openssl:=
+ cuckoo? ( dev-libs/jansson:= )
+ magic? ( sys-apps/file:= )
+"
+RDEPEND="${DEPEND}"
+PDEPEND="python? ( =dev-python/yara-python-$(ver_cut 1)* )"
+
+PATCHES=( "${FILESDIR}/${PN}-$(ver_cut 1-2)-test.patch" )
+
+src_prepare() {
+ default
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_enable profiling) \
+ $(use_enable cuckoo) \
+ $(use_enable magic) \
+ $(use_enable dotnet) \
+ $(use_enable macho) \
+ $(use_enable dex) \
+ $(use_enable test static)
+}
+
+src_test() {
+ emake check
+}
+
+src_install() {
+ default
+
+ # TODO: Allow tests to work against dyn. lib rather than building
+ # statically just for tests.
+ find "${ED}" \( -name '*.a' -o -name '*.la' \) -delete || die
+}