- Bump BuildRequires to llvm >= 17
- This fixes afl-clang-fast and afl-clang-lto on Tumbleweed (boo#1236169) OBS-URL: https://build.opensuse.org/package/show/devel:tools/afl?expand=0&rev=182
This commit is contained in:
commit
000b282f92
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
## Default LFS
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||
*.png filter=lfs diff=lfs merge=lfs -text
|
||||
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
.osc
|
31
afl-3.0c-fix-paths.patch
Normal file
31
afl-3.0c-fix-paths.patch
Normal file
@ -0,0 +1,31 @@
|
||||
Index: AFLplusplus-4.30c/GNUmakefile
|
||||
===================================================================
|
||||
--- AFLplusplus-4.30c.orig/GNUmakefile
|
||||
+++ AFLplusplus-4.30c/GNUmakefile
|
||||
@@ -21,8 +21,8 @@ HASH=\#
|
||||
|
||||
PREFIX ?= /usr/local
|
||||
BIN_PATH = $(PREFIX)/bin
|
||||
-HELPER_PATH = $(PREFIX)/lib/afl
|
||||
-DOC_PATH = $(PREFIX)/share/doc/afl
|
||||
+HELPER_PATH = $(LIBEXEC_DIR)/afl
|
||||
+DOC_PATH = $(DOC_DIR)/afl
|
||||
MISC_PATH = $(PREFIX)/share/afl
|
||||
MAN_PATH = $(PREFIX)/share/man/man8
|
||||
INCLUDE_PATH = $(PREFIX)/include/afl
|
||||
Index: AFLplusplus-4.30c/GNUmakefile.llvm
|
||||
===================================================================
|
||||
--- AFLplusplus-4.30c.orig/GNUmakefile.llvm
|
||||
+++ AFLplusplus-4.30c/GNUmakefile.llvm
|
||||
@@ -20,9 +20,9 @@
|
||||
HASH=\#
|
||||
|
||||
PREFIX ?= /usr/local
|
||||
-HELPER_PATH ?= $(PREFIX)/lib/afl
|
||||
+HELPER_PATH ?= $(LIBEXEC_DIR)/afl
|
||||
BIN_PATH ?= $(PREFIX)/bin
|
||||
-DOC_PATH ?= $(PREFIX)/share/doc/afl
|
||||
+DOC_PATH ?= $(DOC_DIR)/afl
|
||||
MISC_PATH ?= $(PREFIX)/share/afl
|
||||
MAN_PATH ?= $(PREFIX)/share/man/man8
|
||||
|
10
afl-rpmlintrc
Normal file
10
afl-rpmlintrc
Normal file
@ -0,0 +1,10 @@
|
||||
# packages a number of fuzzed files as samples and test cases
|
||||
addFilter("arch-dependent-file-in-usr-share.*/usr/share/doc/packages/afl/vuln_samples")
|
||||
addFilter("arch-dependent-file-in-usr-share.*/usr/share/afl/testcases")
|
||||
addFilter("devel-file-in-non-devel-package.*/usr/share/afl/testcases")
|
||||
addFilter("binaryinfo-readelf-failed.*/usr/share/afl/testcases")
|
||||
addFilter("bad-crc-in-zip.*/usr/share/doc/packages/afl/vuln_samples/")
|
||||
addFilter("missing-PT_GNU_STACK-section.*/usr/share/doc/packages/afl/vuln_samples")
|
||||
addFilter("missing-PT_GNU_STACK-section.*/usr/share/afl/testcases")
|
||||
addFilter("statically-linked-binary.*/usr/share/doc/packages/afl/vuln_samples")
|
||||
addFilter("statically-linked-binary.*/usr/share/afl/testcases")
|
1946
afl.changes
Normal file
1946
afl.changes
Normal file
File diff suppressed because it is too large
Load Diff
127
afl.spec
Normal file
127
afl.spec
Normal file
@ -0,0 +1,127 @@
|
||||
#
|
||||
# spec file for package afl
|
||||
#
|
||||
# Copyright (c) 2025 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
# upon. The license for this file, and modifications and additions to the
|
||||
# file, is the same license as for the pristine package itself (unless the
|
||||
# license for the pristine package is not an Open Source License, in which
|
||||
# case the license is the MIT License). An "Open Source License" is a
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
%define afl_rt compiler-rt,llvm-rt,llvm-rt-lto
|
||||
|
||||
%ifarch %{arm} %ix86 s390x x86_64
|
||||
%define afl_32 1
|
||||
%endif
|
||||
|
||||
%ifarch aarch64 ppc64 ppc64le riscv64 s390x x86_64
|
||||
%define afl_64 1
|
||||
%endif
|
||||
|
||||
Name: afl
|
||||
Version: 4.30c
|
||||
Release: 0
|
||||
Summary: American fuzzy lop is a security-oriented fuzzer
|
||||
#URL: https://lcamtuf.coredump.cx/afl/
|
||||
License: Apache-2.0
|
||||
URL: https://github.com/AFLplusplus/AFLplusplus
|
||||
Source: https://github.com/AFLplusplus/AFLplusplus/archive/v%{version}.tar.gz
|
||||
Source1: afl-rpmlintrc
|
||||
Patch1: afl-3.0c-fix-paths.patch
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: (clang >= 17)
|
||||
%ifarch x86_64
|
||||
BuildRequires: gcc-32bit
|
||||
%endif
|
||||
%if %?suse_version >= 1550
|
||||
BuildRequires: gcc-devel
|
||||
%endif
|
||||
BuildRequires: lld
|
||||
BuildRequires: llvm-devel >= 17
|
||||
BuildRequires: python3-devel
|
||||
Requires: lld
|
||||
|
||||
%package devel
|
||||
Summary: Development headers for use when fuzzing with American fuzzy lop
|
||||
Requires: %name = %version
|
||||
|
||||
%description devel
|
||||
This package contains include files for use with afl.
|
||||
|
||||
%description
|
||||
American fuzzy lop is a security-oriented fuzzer that employs a novel type
|
||||
of compile-time instrumentation and genetic algorithms to automatically
|
||||
discover clean, interesting test cases that trigger new internal states in
|
||||
the targeted binary. This substantially improves the functional coverage
|
||||
for the fuzzed code. The compact synthesized corpora produced by the tool
|
||||
are also useful for seeding other, more labor- or resource-intensive
|
||||
testing regimes down the road.
|
||||
|
||||
Compared to other instrumented fuzzers, afl-fuzz is designed to be
|
||||
practical: it has modest performance overhead, uses a variety of highly
|
||||
effective fuzzing strategies and effort minimization tricks, requires
|
||||
essentially no configuration, and seamlessly handles complex, real-world
|
||||
use cases - say, common image parsing or file compression libraries.
|
||||
|
||||
%prep
|
||||
%setup -q -n AFLplusplus-%version
|
||||
%patch -P1 -p1
|
||||
sed -i 's|#!/usr/bin/env sh|#!/bin/sh|g' afl-cmin
|
||||
sed -i 's|#!/usr/bin/env bash|#!/bin/bash|g' afl-cmin.bash
|
||||
|
||||
%build
|
||||
export CFLAGS="$CFLAGS %{optflags} -fno-lto"
|
||||
%ifnarch %{ix86} x86_64
|
||||
export AFL_NO_X86=1
|
||||
%endif
|
||||
make %{?_smp_mflags} PREFIX=%{_prefix} LIBEXEC_DIR=%{_libexecdir} DOC_DIR=%{_docdir}
|
||||
# make radamsa
|
||||
|
||||
%install
|
||||
%ifnarch %{ix86} x86_64
|
||||
export AFL_NO_X86=1
|
||||
%endif
|
||||
make %{?_smp_mflags} PREFIX=%{_prefix} LIBEXEC_DIR=%{_libexecdir} DOC_DIR=%{_docdir} MAN_PATH=%{_mandir}/man8 DESTDIR=%{buildroot} install
|
||||
chmod -x %{buildroot}/%{_libexecdir}/%{name}/*.o
|
||||
|
||||
%files
|
||||
%license docs/COPYING LICENSE
|
||||
%doc /usr/share/doc/packages/%name/
|
||||
%{_bindir}/%{name}-*
|
||||
%dir %{_libexecdir}/%{name}
|
||||
#{_libexecdir}/%{name}/%{name}-as
|
||||
#{_libexecdir}/%{name}/as
|
||||
%if 0%{?afl_64}
|
||||
%{_libexecdir}/%{name}/afl-{%{afl_rt}}-64.o
|
||||
%endif
|
||||
%if 0%{?afl_32}
|
||||
%{_libexecdir}/%{name}/afl-{%{afl_rt}}-32.o
|
||||
%endif
|
||||
%ifarch aarch64
|
||||
%{_libexecdir}/%{name}/afl-llvm-rt-lto-32.o
|
||||
%endif
|
||||
%{_libexecdir}/%{name}/afl-{%{afl_rt}}.o
|
||||
%{_libexecdir}/%{name}/dynamic_list.txt
|
||||
%{_libexecdir}/%{name}/*.so
|
||||
%{_libexecdir}/%{name}/*.a
|
||||
%dir %{_datadir}/%{name}
|
||||
%dir %{_datadir}/%{name}/testcases
|
||||
%{_datadir}/%{name}/testcases/*
|
||||
%dir %{_datadir}/afl/dictionaries/
|
||||
%{_datadir}/afl/dictionaries/*
|
||||
%{_datadir}/afl/injections.dic
|
||||
%{_mandir}/man8/afl*.8*
|
||||
|
||||
%files devel
|
||||
%license docs/COPYING LICENSE
|
||||
%{_includedir}/afl
|
||||
|
||||
%changelog
|
3
v4.21c.tar.gz
Normal file
3
v4.21c.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:11f7c77d37cff6e7f65ac7cc55bab7901e0c6208e845a38764394d04ed567b30
|
||||
size 3004235
|
3
v4.30c.tar.gz
Normal file
3
v4.30c.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:7c08c81f59b6c1f0bc2428fdee9fb880520e72c50be0683072e66bcde662b480
|
||||
size 3031558
|
Loading…
x
Reference in New Issue
Block a user