* [bug#62666] [PATCH 0/2] Add aflplusplus
@ 2023-04-04 17:44 Denis 'GNUtoo' Carikli
2023-04-05 1:29 ` [bug#62666] [PATCH 1/2] gnu: " Denis 'GNUtoo' Carikli
` (3 more replies)
0 siblings, 4 replies; 9+ messages in thread
From: Denis 'GNUtoo' Carikli @ 2023-04-04 17:44 UTC (permalink / raw)
To: 62666; +Cc: Denis 'GNUtoo' Carikli
Hi,
Here's two patches to add aflplusplus. I've also patches (not part of this
serie) to add support for faster compilers with GCC plugins, but when I do
that it somehow fails to run:
$ cat main.c
int main()
{
printf("Hello world\n");
}
$ afl-gcc-fast ./main.c
afl-cc++4.05c by Michal Zalewski, Laszlo Szekeres, Marc Heuse - mode: GCC_PLUGIN-DEFAULT
cc1: error: cannot load plugin /gnu/store/sx55p7b4r21kiw7sagi8cb8ff6zmvmqd-aflplusplus-4.05c/bin/../lib/afl//afl-gcc-pass.so: /gnu/store/sx55p7b4r21kiw7sagi8cb8ff6zmvmqd-aflplusplus-4.05c/bin/../lib/afl//afl-gcc-pass.so: undefined symbol: _Z30gimple_build_call_internal_vec11internal_fn3vecIP9tree_node7va_heap6vl_ptrE
So I limited that serie to what works well.
Denis 'GNUtoo' Carikli (2):
gnu: Add aflplusplus.
gnu: aflplusplus: Add python support
gnu/packages/debug.scm | 31 +++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)
base-commit: b9c9c23939a40a850a8c78579adaec25d1972bd1
--
2.39.1
^ permalink raw reply [flat|nested] 9+ messages in thread
* [bug#62666] [PATCH 1/2] gnu: Add aflplusplus.
2023-04-04 17:44 [bug#62666] [PATCH 0/2] Add aflplusplus Denis 'GNUtoo' Carikli
@ 2023-04-05 1:29 ` Denis 'GNUtoo' Carikli
2023-04-05 1:29 ` [bug#62666] [PATCH 2/2] gnu: aflplusplus: Add python support Denis 'GNUtoo' Carikli
2023-08-23 2:34 ` [bug#62666] [PATCH 0/2] Add aflplusplus Hilton Chain via Guix-patches via
` (2 subsequent siblings)
3 siblings, 1 reply; 9+ messages in thread
From: Denis 'GNUtoo' Carikli @ 2023-04-05 1:29 UTC (permalink / raw)
To: 62666; +Cc: Denis 'GNUtoo' Carikli
* gnu/packages/debug.scm (aflplusplus): New variable.
---
gnu/packages/debug.scm | 31 +++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)
diff --git a/gnu/packages/debug.scm b/gnu/packages/debug.scm
index 154232ed50..88b8cb8b8b 100644
--- a/gnu/packages/debug.scm
+++ b/gnu/packages/debug.scm
@@ -460,6 +460,37 @@ (define-public qemu-for-american-fuzzy-lop
;; Several tests fail on MIPS.
(supported-systems (delete "mips64el-linux" %supported-systems))))))
+(define-public aflplusplus
+ (package
+ (inherit american-fuzzy-lop)
+ (name "aflplusplus")
+ (version "4.05c")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/AFLplusplus/AFLplusplus")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0cl0bgvd2yy331zchjz5drcnadam6w0vfmwcq1jf285hw0x8b0bk"))))
+ (inputs (list qemu))
+ (home-page "https://aflplus.plus")
+ (description
+ "AFLplusplus 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. It is a fork of American Fuzzy Lop fuzzer and compared to it:
+@itemize
+@item It Supports a more recent qemu version
+@item It supports more algorithms like collision-free coverage, enhanced
+laf-intel & redqueen, AFLfast++ power schedules, MOpt mutators, unicorn_mode,
+etc.
+@end itemize")))
+
(define-public stress-make
(let ((commit "97815bed8060de33952475b3498767c91f59ffd9")
(revision "2")) ;No official source distribution
--
2.39.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [bug#62666] [PATCH 2/2] gnu: aflplusplus: Add python support
2023-04-05 1:29 ` [bug#62666] [PATCH 1/2] gnu: " Denis 'GNUtoo' Carikli
@ 2023-04-05 1:29 ` Denis 'GNUtoo' Carikli
0 siblings, 0 replies; 9+ messages in thread
From: Denis 'GNUtoo' Carikli @ 2023-04-05 1:29 UTC (permalink / raw)
To: 62666; +Cc: Denis 'GNUtoo' Carikli
* gnu/packages/debug.scm (aflplusplus): [inputs]: Add python.
---
gnu/packages/debug.scm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gnu/packages/debug.scm b/gnu/packages/debug.scm
index 88b8cb8b8b..21df553ef6 100644
--- a/gnu/packages/debug.scm
+++ b/gnu/packages/debug.scm
@@ -474,7 +474,7 @@ (define-public aflplusplus
(sha256
(base32
"0cl0bgvd2yy331zchjz5drcnadam6w0vfmwcq1jf285hw0x8b0bk"))))
- (inputs (list qemu))
+ (inputs (list python qemu))
(home-page "https://aflplus.plus")
(description
"AFLplusplus is a security-oriented fuzzer that employs a novel type of
--
2.39.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [bug#62666] [PATCH 0/2] Add aflplusplus
2023-04-04 17:44 [bug#62666] [PATCH 0/2] Add aflplusplus Denis 'GNUtoo' Carikli
2023-04-05 1:29 ` [bug#62666] [PATCH 1/2] gnu: " Denis 'GNUtoo' Carikli
@ 2023-08-23 2:34 ` Hilton Chain via Guix-patches via
2023-09-15 3:25 ` Denis 'GNUtoo' Carikli
2023-11-23 16:56 ` [bug#62666] (no subject) Denis 'GNUtoo' Carikli
2024-01-08 8:19 ` [bug#62666] [PATCH v3] gnu: Add aflplusplus Hilton Chain via Guix-patches via
3 siblings, 1 reply; 9+ messages in thread
From: Hilton Chain via Guix-patches via @ 2023-08-23 2:34 UTC (permalink / raw)
To: Denis 'GNUtoo' Carikli; +Cc: 62666
Hi Denis,
On Wed, 05 Apr 2023 01:44:49 +0800,
Denis 'GNUtoo' Carikli wrote:
>
> Hi,
>
> Here's two patches to add aflplusplus. I've also patches (not part of this
> serie) to add support for faster compilers with GCC plugins, but when I do
> that it somehow fails to run:
> $ cat main.c
> int main()
> {
> printf("Hello world\n");
> }
> $ afl-gcc-fast ./main.c
> afl-cc++4.05c by Michal Zalewski, Laszlo Szekeres, Marc Heuse - mode: GCC_PLUGIN-DEFAULT
> cc1: error: cannot load plugin /gnu/store/sx55p7b4r21kiw7sagi8cb8ff6zmvmqd-aflplusplus-4.05c/bin/../lib/afl//afl-gcc-pass.so: /gnu/store/sx55p7b4r21kiw7sagi8cb8ff6zmvmqd-aflplusplus-4.05c/bin/../lib/afl//afl-gcc-pass.so: undefined symbol: _Z30gimple_build_call_internal_vec11internal_fn3vecIP9tree_node7va_heap6vl_ptrE
>
> So I limited that serie to what works well.
>
>
> Denis 'GNUtoo' Carikli (2):
> gnu: Add aflplusplus.
> gnu: aflplusplus: Add python support
>
> gnu/packages/debug.scm | 31 +++++++++++++++++++++++++++++++
> 1 file changed, 31 insertions(+)
>
>
> base-commit: b9c9c23939a40a850a8c78579adaec25d1972bd1
> --
> 2.39.1
I think (for the plugin) this is related:
--8<---------------cut here---------------start------------->8---
[+] All set and ready to build.
g++ -O3 -g -funroll-loops -D_FORTIFY_SOURCE=1 -Wall -std=c++11 -fPIC -fno-rtti -I"/gnu/store/930nwsiysdvy2x5zv1sf6v7ym75z8ayk-gcc-11.3.0-lib/lib/gcc/x86_64-unknown-linux-gnu/11.3.0/plugin"/include -I"/gnu/store/930nwsiysdvy2x5zv1sf6v7ym75z8ayk-gcc-11.3.0-lib/lib/gcc/x86_64-unknown-linux-gnu/11.3.0/plugin" -shared instrumentation/afl-gcc-pass.so.cc -o afl-gcc-pass.so
In file included from /gnu/store/930nwsiysdvy2x5zv1sf6v7ym75z8ayk-gcc-11.3.0-lib/lib/gcc/x86_64-unknown-linux-gnu/11.3.0/plugin/include/gcc-plugin.h:28,
from instrumentation/afl-gcc-common.h:46,
from instrumentation/afl-gcc-pass.so.cc:127:
/gnu/store/930nwsiysdvy2x5zv1sf6v7ym75z8ayk-gcc-11.3.0-lib/lib/gcc/x86_64-unknown-linux-gnu/11.3.0/plugin/include/system.h:698:10: fatal error: gmp.h: No such file or directory
698 | #include <gmp.h>
| ^~~~~~~
compilation terminated.
make[1]: *** [GNUmakefile.gcc_plugin:149: afl-gcc-pass.so] Error 1
make[1]: Leaving directory '/tmp/guix-build-aflplusplus-4.05c.drv-0/source'
make: [GNUmakefile:790: install] Error 2 (ignored)
--8<---------------cut here---------------end--------------->8---
Can you address the issue and send an updated patch?
Thanks
^ permalink raw reply [flat|nested] 9+ messages in thread
* [bug#62666] [PATCH 0/2] Add aflplusplus
2023-08-23 2:34 ` [bug#62666] [PATCH 0/2] Add aflplusplus Hilton Chain via Guix-patches via
@ 2023-09-15 3:25 ` Denis 'GNUtoo' Carikli
0 siblings, 0 replies; 9+ messages in thread
From: Denis 'GNUtoo' Carikli @ 2023-09-15 3:25 UTC (permalink / raw)
To: Hilton Chain; +Cc: 62666
[-- Attachment #1: Type: text/plain, Size: 2297 bytes --]
On Wed, 23 Aug 2023 10:34:48 +0800
Hilton Chain <hako@ultrarare.space> wrote:
> > Here's two patches to add aflplusplus. I've also patches (not part
> > of this serie) to add support for faster compilers with GCC
> > plugins, but when I do that it somehow fails to run:
> I think (for the plugin) this is related:
> --8<---------------cut here---------------start------------->8---
> [+] All set and ready to build.
> g++ -O3 -g -funroll-loops -D_FORTIFY_SOURCE=1 -Wall -std=c++11 -fPIC
> -fno-rtti
> -I"/gnu/store/930nwsiysdvy2x5zv1sf6v7ym75z8ayk-gcc-11.3.0-lib/lib/gcc/x86_64-unknown-linux-gnu/11.3.0/plugin"/include
> -I"/gnu/store/930nwsiysdvy2x5zv1sf6v7ym75z8ayk-gcc-11.3.0-lib/lib/gcc/x86_64-unknown-linux-gnu/11.3.0/plugin"
> -shared instrumentation/afl-gcc-pass.so.cc -o afl-gcc-pass.so In file
> included from
> /gnu/store/930nwsiysdvy2x5zv1sf6v7ym75z8ayk-gcc-11.3.0-lib/lib/gcc/x86_64-unknown-linux-gnu/11.3.0/plugin/include/gcc-plugin.h:28,
> from instrumentation/afl-gcc-common.h:46, from
> instrumentation/afl-gcc-pass.so.cc:127:
> /gnu/store/930nwsiysdvy2x5zv1sf6v7ym75z8ayk-gcc-11.3.0-lib/lib/gcc/x86_64-unknown-linux-gnu/11.3.0/plugin/include/system.h:698:10:
> fatal error: gmp.h: No such file or directory 698 | #include <gmp.h>
> | ^~~~~~~ compilation terminated. make[1]: ***
> [GNUmakefile.gcc_plugin:149: afl-gcc-pass.so] Error 1 make[1]:
> Leaving directory '/tmp/guix-build-aflplusplus-4.05c.drv-0/source'
> make: [GNUmakefile:790: install] Error 2 (ignored)
> --8<---------------cut here---------------end--------------->8---
>
> Can you address the issue and send an updated patch?
The issue turned out to be that it called "gcc" instead of the gcc
available during the build.
Qemu is one of the aflplusplus dependencies and it doesn't cross
compile:
> $ guix build --target=aarch64-linux-gnu qemu
> guix build: error: gnu/packages/gnome.scm:3501:2: librsvg@2.54.5:
> build system `cargo' does not support cross builds
So for simplicity I've simply made aflplusplus use the gcc that is in
the inputs.
I've verified that it took the right gcc by adding '(invoke "gcc"
"--version")' to the package and verifying that it was really gcc-11.
I've also updated aflplusplus to the latest version along the way.
Denis.
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* [bug#62666] (no subject)
2023-04-04 17:44 [bug#62666] [PATCH 0/2] Add aflplusplus Denis 'GNUtoo' Carikli
2023-04-05 1:29 ` [bug#62666] [PATCH 1/2] gnu: " Denis 'GNUtoo' Carikli
2023-08-23 2:34 ` [bug#62666] [PATCH 0/2] Add aflplusplus Hilton Chain via Guix-patches via
@ 2023-11-23 16:56 ` Denis 'GNUtoo' Carikli
2024-01-08 8:19 ` [bug#62666] [PATCH v3] gnu: Add aflplusplus Hilton Chain via Guix-patches via
3 siblings, 0 replies; 9+ messages in thread
From: Denis 'GNUtoo' Carikli @ 2023-11-23 16:56 UTC (permalink / raw)
To: 62666
[-- Attachment #1: Type: text/plain, Size: 6 bytes --]
ping
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* [bug#62666] [PATCH v3] gnu: Add aflplusplus.
2023-04-04 17:44 [bug#62666] [PATCH 0/2] Add aflplusplus Denis 'GNUtoo' Carikli
` (2 preceding siblings ...)
2023-11-23 16:56 ` [bug#62666] (no subject) Denis 'GNUtoo' Carikli
@ 2024-01-08 8:19 ` Hilton Chain via Guix-patches via
2024-01-24 0:09 ` Denis 'GNUtoo' Carikli
3 siblings, 1 reply; 9+ messages in thread
From: Hilton Chain via Guix-patches via @ 2024-01-08 8:19 UTC (permalink / raw)
To: 62666
Cc: Hilton Chain, Denis 'GNUtoo' Carikli,
Denis 'GNUtoo' Carikli, Hilton Chain
From: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
* gnu/packages/debug.scm (aflplusplus): New variable.
Change-Id: Ibda36187e839d5f533d461444db25a7ba5567f0f
Modified-by: Hilton Chain <hako@ultrarare.space>
---
Hi Denis,
Aplogies for the long delay...
I have adjusted the phases for proper cross-compilation support and updated the
package to the latest version.
I'm sending out v3 mainly for QA purpose, I'll push it if there's no further
issue.
Thanks
gnu/packages/debug.scm | 55 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 55 insertions(+)
diff --git a/gnu/packages/debug.scm b/gnu/packages/debug.scm
index 5a528c7a28..6d4567acc4 100644
--- a/gnu/packages/debug.scm
+++ b/gnu/packages/debug.scm
@@ -50,6 +50,7 @@ (define-module (gnu packages debug)
#:use-module (gnu packages code)
#:use-module (gnu packages compression)
#:use-module (gnu packages flex)
+ #:use-module (gnu packages gcc)
#:use-module (gnu packages gdb)
#:use-module (gnu packages glib)
#:use-module (gnu packages gtk)
@@ -59,6 +60,7 @@ (define-module (gnu packages debug)
#:use-module (gnu packages libusb)
#:use-module (gnu packages linux)
#:use-module (gnu packages llvm)
+ #:use-module (gnu packages multiprecision)
#:use-module (gnu packages ncurses)
#:use-module (gnu packages ninja)
#:use-module (gnu packages perl)
@@ -459,6 +461,59 @@ (define-public qemu-for-american-fuzzy-lop
;; Several tests fail on MIPS.
(supported-systems (delete "mips64el-linux" %supported-systems))))))
+(define-public aflplusplus
+ (package
+ (inherit american-fuzzy-lop)
+ (name "aflplusplus")
+ (version "4.09c")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/AFLplusplus/AFLplusplus")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "12bplpd8cifla6m9l130fd22ggzkhd1w5s1aifw1idpy3njhj129"))))
+ (arguments
+ (substitute-keyword-arguments (package-arguments american-fuzzy-lop)
+ ((#:make-flags _ ''())
+ #~(list (string-append "PREFIX=" #$output)
+ (string-append "DOC_PATH=" #$output "/share/doc/"
+ #$(package-name this-package) "-"
+ #$(package-version this-package))
+ (string-append "CC=" #$(cc-for-target))))
+ ((#:phases phases '%standard-phases)
+ #~(modify-phases #$phases
+ ;; For GCC plugins.
+ (add-after 'unpack 'patch-gcc-path
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "src/afl-cc.c"
+ (("alt_cc = \"gcc\";")
+ (format #f "alt_cc = \"~a\";"
+ (search-input-file inputs "bin/gcc")))
+ (("alt_cxx = \"g\\+\\+\";")
+ (format #f "alt_cxx = \"~a\";"
+ (search-input-file inputs "bin/g++"))))))))))
+ ;; According to the Dockerfile, GCC 12 is producing compile errors for some
+ ;; targets, so explicitly use GCC 11 here.
+ (inputs (list gcc-11 gmp python qemu))
+ (native-inputs (list gcc-11))
+ (home-page "https://aflplus.plus/")
+ (description
+ "AFLplusplus 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.
+It is a fork of American Fuzzy Lop fuzzer and features:
+@itemize
+@item A more recent qemu version.
+@item More algorithms like collision-free coverage, enhanced laf-intel &
+redqueen, AFLfast++ power schedules, MOpt mutators, unicorn_mode, etc.
+@end itemize")))
+
(define-public stress-make
(let ((commit "97815bed8060de33952475b3498767c91f59ffd9")
(revision "2")) ;No official source distribution
base-commit: 3de361d9c9d320aefbd43710124d7b07af891de1
--
2.41.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [bug#62666] [PATCH v3] gnu: Add aflplusplus.
2024-01-08 8:19 ` [bug#62666] [PATCH v3] gnu: Add aflplusplus Hilton Chain via Guix-patches via
@ 2024-01-24 0:09 ` Denis 'GNUtoo' Carikli
2024-01-25 16:35 ` bug#62666: " Hilton Chain via Guix-patches via
0 siblings, 1 reply; 9+ messages in thread
From: Denis 'GNUtoo' Carikli @ 2024-01-24 0:09 UTC (permalink / raw)
To: Hilton Chain; +Cc: 62666
[-- Attachment #1: Type: text/plain, Size: 569 bytes --]
On Mon, 8 Jan 2024 16:19:00 +0800
Hilton Chain <hako@ultrarare.space> wrote:
> Hi Denis,
Hi,
> Aplogies for the long delay...
>
> I have adjusted the phases for proper cross-compilation support and
> updated the package to the latest version.
>
> I'm sending out v3 mainly for QA purpose, I'll push it if there's no
> further issue.
>
> Thanks
Thanks a lot for improving this patch.
I've a question though: in the mumi instance
(https://issues.guix.gnu.org/62666) it still says QA Unknown.
Do I need to do something on my side?
Denis.
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#62666: [PATCH v3] gnu: Add aflplusplus.
2024-01-24 0:09 ` Denis 'GNUtoo' Carikli
@ 2024-01-25 16:35 ` Hilton Chain via Guix-patches via
0 siblings, 0 replies; 9+ messages in thread
From: Hilton Chain via Guix-patches via @ 2024-01-25 16:35 UTC (permalink / raw)
To: Denis 'GNUtoo' Carikli; +Cc: 62666-done
Hi Denis,
On Wed, 24 Jan 2024 08:09:45 +0800,
Denis 'GNUtoo' Carikli wrote:
>
> [1 <text/plain; US-ASCII (quoted-printable)>]
> On Mon, 8 Jan 2024 16:19:00 +0800
> Hilton Chain <hako@ultrarare.space> wrote:
> > Hi Denis,
> Hi,
>
> > Aplogies for the long delay...
> >
> > I have adjusted the phases for proper cross-compilation support and
> > updated the package to the latest version.
> >
> > I'm sending out v3 mainly for QA purpose, I'll push it if there's no
> > further issue.
> >
> > Thanks
>
> Thanks a lot for improving this patch.
>
> I've a question though: in the mumi instance
> (https://issues.guix.gnu.org/62666) it still says QA Unknown.
>
> Do I need to do something on my side?
Applied as 06221e910a5718c7d4ad2dcc7ffad2bc8e92fdc5 !
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2024-01-25 16:36 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-04 17:44 [bug#62666] [PATCH 0/2] Add aflplusplus Denis 'GNUtoo' Carikli
2023-04-05 1:29 ` [bug#62666] [PATCH 1/2] gnu: " Denis 'GNUtoo' Carikli
2023-04-05 1:29 ` [bug#62666] [PATCH 2/2] gnu: aflplusplus: Add python support Denis 'GNUtoo' Carikli
2023-08-23 2:34 ` [bug#62666] [PATCH 0/2] Add aflplusplus Hilton Chain via Guix-patches via
2023-09-15 3:25 ` Denis 'GNUtoo' Carikli
2023-11-23 16:56 ` [bug#62666] (no subject) Denis 'GNUtoo' Carikli
2024-01-08 8:19 ` [bug#62666] [PATCH v3] gnu: Add aflplusplus Hilton Chain via Guix-patches via
2024-01-24 0:09 ` Denis 'GNUtoo' Carikli
2024-01-25 16:35 ` bug#62666: " Hilton Chain via Guix-patches via
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.