- Update to version 1.1:

* Simplified and improved hfuzz_cc compiler
  * More string instrumentation in libhfuzz
  * Android: works with Android-NDK 15 and newer only
  * Dockerfile
  * Refreshed docs
  * Linux: Faster BTS/PT due to less PMU state resets
  * Linux: tests and by-pass for the Linux' fork-when-multithreaded
    problem
  * libFuzzer/AFL style dictionaries
  * Runnable under docker/oss-fuzz
- Changes for version 1.0:
  * Multiple stability improvements for most of the supported
    architectures
  * More examples in examples/ (e.g. Linux kernel IP for BTS/PT)
  * Documentation updates
  * Added honggfuzz compiler wrapper in hfuzz_cc/
  * Reworked buffer mangling logic
- Drope reproducible.patch and gcc7.patch
- Add honggfuzz-binutils_2.29.patch to fix building with latest
  binutils

OBS-URL: https://build.opensuse.org/package/show/devel:tools/honggfuzz?expand=0&rev=10
This commit is contained in:
Martin Pluskal 2017-10-02 09:26:20 +00:00 committed by Git OBS Bridge
parent 5cb2d9ddaf
commit 35a7ecb683
7 changed files with 74 additions and 68 deletions

View File

@ -1,23 +0,0 @@
Index: honggfuzz-0.9/Makefile
===================================================================
--- honggfuzz-0.9.orig/Makefile
+++ honggfuzz-0.9/Makefile
@@ -24,7 +24,7 @@
CC ?= gcc
LD = $(CC)
BIN := honggfuzz
-COMMON_CFLAGS := -D_GNU_SOURCE -Wall -Werror -Wframe-larger-than=131072
+COMMON_CFLAGS := -D_GNU_SOURCE -Wall -Wframe-larger-than=131072
COMMON_LDFLAGS := -lm
COMMON_SRCS := $(sort $(wildcard *.c))
CFLAGS ?= -O3
@@ -37,8 +37,7 @@ ifeq ($(OS),Linux)
ARCH := LINUX
ARCH_CFLAGS := -std=c11 -I/usr/local/include -I/usr/include \
- -Wextra -Wno-initializer-overrides -Wno-override-init \
- -Wno-unknown-warning-option -funroll-loops \
+ -Wextra -Wno-override-init -funroll-loops \
-D_FILE_OFFSET_BITS=64
ARCH_LDFLAGS := -L/usr/local/include -L/usr/include \
-lpthread -lunwind-ptrace -lunwind-generic -lbfd -lopcodes -lrt

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:161ad1fab5a677054d54d55a9fc070a2a4cbd26d6794e7fd8fe68db909f433c7
size 7332175

3
honggfuzz-1.1.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:e1ddbffc3240b2601c7e997d759c6a89ea69fe619bf59d1d9a58f11205934ee4
size 11705217

View File

@ -0,0 +1,43 @@
From fe2934bd59e7a1dbe58dafcd71bb8383505de092 Mon Sep 17 00:00:00 2001
From: Robert Swiecki <robert@swiecki.net>
Date: Mon, 4 Sep 2017 15:23:14 +0200
Subject: [PATCH] Use different disassbler() prototype from binutils in case of
>= 2.29
---
linux/bfd.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/linux/bfd.c b/linux/bfd.c
index bcd247f7..f3e9b0b0 100644
--- a/linux/bfd.c
+++ b/linux/bfd.c
@@ -46,6 +46,14 @@ typedef struct {
asymbol **syms;
} bfd_t;
+/*
+ * This is probably the only define which was added with binutils 2.29, so we us
+ * it, do decide which disassembler() prototype from dis-asm.h to use
+ */
+#if defined(FOR_EACH_DISASSEMBLER_OPTION)
+#define _HF_BFD_GE_2_29
+#endif
+
static pthread_mutex_t arch_bfd_mutex = PTHREAD_MUTEX_INITIALIZER;
static bool arch_bfdInit(pid_t pid, bfd_t * bfdParams)
@@ -160,8 +168,12 @@ void arch_bfdDisasm(pid_t pid, uint8_t * mem, size_t size, char *instr)
LOG_W("bfd_check_format() failed");
return;
}
-
+#if defined(_HF_BFD_GE_2_29)
+ disassembler_ftype disassemble =
+ disassembler(bfd_get_arch(bfdh), bfd_little_endian(bfdh) ? FALSE : TRUE, 0, NULL);
+#else
disassembler_ftype disassemble = disassembler(bfdh);
+#endif // defined(_HD_BFD_GE_2_29)
if (disassemble == NULL) {
LOG_W("disassembler() failed");
return;

View File

@ -1,3 +1,28 @@
-------------------------------------------------------------------
Mon Oct 2 09:20:48 UTC 2017 - mpluskal@suse.com
- Update to version 1.1:
* Simplified and improved hfuzz_cc compiler
* More string instrumentation in libhfuzz
* Android: works with Android-NDK 15 and newer only
* Dockerfile
* Refreshed docs
* Linux: Faster BTS/PT due to less PMU state resets
* Linux: tests and by-pass for the Linux' fork-when-multithreaded
problem
* libFuzzer/AFL style dictionaries
* Runnable under docker/oss-fuzz
- Changes for version 1.0:
* Multiple stability improvements for most of the supported
architectures
* More examples in examples/ (e.g. Linux kernel IP for BTS/PT)
* Documentation updates
* Added honggfuzz compiler wrapper in hfuzz_cc/
* Reworked buffer mangling logic
- Drope reproducible.patch and gcc7.patch
- Add honggfuzz-binutils_2.29.patch to fix building with latest
binutils
------------------------------------------------------------------- -------------------------------------------------------------------
Mon May 29 12:12:59 UTC 2017 - bwiedemann@suse.com Mon May 29 12:12:59 UTC 2017 - bwiedemann@suse.com

View File

@ -17,17 +17,15 @@
Name: honggfuzz Name: honggfuzz
Version: 0.9 Version: 1.1
Release: 0 Release: 0
Summary: Security-oriented fuzzer with various analysis options Summary: Security-oriented fuzzer with various analysis options
License: Apache-2.0 License: Apache-2.0
Group: Development/Tools/Other Group: Development/Tools/Other
Url: https://google.github.io/honggfuzz/ Url: https://google.github.io/honggfuzz/
Source: https://github.com/google/honggfuzz/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz Source: https://github.com/google/honggfuzz/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
# PATCH-FIX-UPSTREAM https://github.com/google/honggfuzz/pull/144 # PATCH-FIX-UPSTREAM https://github.com/google/honggfuzz/commit/fe2934bd59e7a1dbe58dafcd71bb8383505de092
Patch0: reproducible.patch Patch0: honggfuzz-binutils_2.29.patch
# PATCH-FIX-UPSTREAM Make this package compile with gcc7 https://github.com/google/honggfuzz/issues/145
Patch1: gcc7.patch
BuildRequires: binutils-devel BuildRequires: binutils-devel
BuildRequires: libunwind-devel BuildRequires: libunwind-devel
BuildRequires: zlib-devel BuildRequires: zlib-devel
@ -40,7 +38,6 @@ evolutionary, feedback-driven fuzzing based on code coverage
%prep %prep
%setup -q %setup -q
%patch0 -p1 %patch0 -p1
%patch1 -p1
%build %build
export CFLAGS="%{optflags}" export CFLAGS="%{optflags}"

View File

@ -1,36 +0,0 @@
Index: honggfuzz-0.9/Makefile
===================================================================
--- honggfuzz-0.9.orig/Makefile
+++ honggfuzz-0.9/Makefile
@@ -26,7 +26,7 @@ LD = $(CC)
BIN := honggfuzz
COMMON_CFLAGS := -D_GNU_SOURCE -Wall -Werror -Wframe-larger-than=131072
COMMON_LDFLAGS := -lm
-COMMON_SRCS := $(wildcard *.c)
+COMMON_SRCS := $(sort $(wildcard *.c))
CFLAGS ?= -O3
LDFLAGS ?=
@@ -42,7 +42,7 @@ ifeq ($(OS),Linux)
-D_FILE_OFFSET_BITS=64
ARCH_LDFLAGS := -L/usr/local/include -L/usr/include \
-lpthread -lunwind-ptrace -lunwind-generic -lbfd -lopcodes -lrt
- ARCH_SRCS := $(wildcard linux/*.c)
+ ARCH_SRCS := $(sort $(wildcard linux/*.c))
ifeq ("$(wildcard /usr/include/bfd.h)","")
WARN_LIBRARY += binutils-devel
@@ -113,11 +113,11 @@ else ifeq ($(OS),Darwin)
ifeq ($(MIG_RET),1)
$(error mig failed to generate RPC code)
endif
- ARCH_SRCS := $(wildcard mac/*.c)
+ ARCH_SRCS := $(sort $(wildcard mac/*.c))
# OS Darwin
else
ARCH := POSIX
- ARCH_SRCS := $(wildcard posix/*.c)
+ ARCH_SRCS := $(sort $(wildcard posix/*.c))
ARCH_CFLAGS := -std=c11 -I/usr/local/include -I/usr/include \
-Wextra -Wno-initializer-overrides -Wno-override-init \
-Wno-unknown-warning-option -Wno-unknown-pragmas \