afl/afl.spec
Marcus Meissner 62307236d9 Accepting request 1179645 from home:msmeissn:branches:devel:tools
- updated to 4.21c
  * afl-fuzz
    - fixed a regression in afl-fuzz that resulted in a 5-10% performace loss
      do a switch from gettimeofday() to clock_gettime() which should be rather
      three times faster. The reason for this is unknown.
    - new queue selection algorithm based on 2 core years of queue data
      analysis. gives a noticable improvement on coverage although the results
      seem counterintuitive :-)
    - added AFL_DISABLE_REDUNDANT for huge queues
    - added `AFL_NO_SYNC` environment variable that does what you think it does
    - fix AFL_PERSISTENT_RECORD
    - run custom_post_process after standard trimming
    - prevent filenames in the queue that have spaces
    - minor fix for FAST schedules
    - more frequent stats update when syncing (todo: check performance impact)
    - now timing of calibration, trimming and syncing is measured seperately,
      thanks to @eqv!
    - -V timing is now accurately the fuzz time (without syncing), before
      long calibration times and syncing could result in now fuzzing being
      made when the time was already run out until then, thanks to @eqv!
    - fix -n uninstrumented mode when ending fuzzing
    - enhanced the ASAN configuration
    - make afl-fuzz use less memory with cmplog and fix a memleak
  * afl-cc:
    - re-enable i386 support that was accidently disabled
    - fixes for LTO and outdated afl-gcc mode for i386
    - fix COMPCOV split compare for old LLVMs
    - disable xml/curl/g_ string transform functions because we do not check
      for null pointers ... TODO
    - ensure shared memory variables are visible in weird build setups

OBS-URL: https://build.opensuse.org/request/show/1179645
OBS-URL: https://build.opensuse.org/package/show/devel:tools/afl?expand=0&rev=177
2024-06-10 08:16:29 +00:00

117 lines
3.7 KiB
RPMSpec

#
# spec file for package afl
#
# Copyright (c) 2024 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.21c
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 < 16 or clang15)
%ifarch x86_64
BuildRequires: gcc-32bit
%endif
%if %?suse_version >= 1550
BuildRequires: gcc-devel
%endif
BuildRequires: lld
BuildRequires: python3-devel
BuildRequires: ((llvm-devel >= 11.0.0 with llvm-devel < 16) or llvm15-devel)
Requires: lld
%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*
%changelog