Package: afl++-clang
Version: 2.66c-1
Severity: normal
Tags: patch
X-Debbugs-Cc: [email protected]
Hi,
When using afl-clang++-fast with AFL_LLVM_LAF_ALL=1, it complains about some
shared objects not being found
miriam@computer:~/afl/xmlindent-0.2.17$ AFL_LLVM_LAF_ALL=1 CC="afl-clang-fast"
CXX="afl-clang++-fast" make
flex xmlindent.yy
afl-clang-fast -Wall -g -Wl,-z,defs -Wl,-as-needed -Wl,--no-undefined error.c
indent.c buffer.c main.c -o xmlindent -lfl
afl-clang-fast++2.66c by <[email protected]> in PCGUARD mode
error: unable to load plugin '/usr/lib/afl/split-switches-pass.so':
'/usr/lib/afl/split-switches-pass.so: cannot open shared object file: No such
file or directory'
error: unable to load plugin '/usr/lib/afl/compare-transform-pass.so':
'/usr/lib/afl/compare-transform-pass.so: cannot open shared object file: No
such file or directory'
error: unable to load plugin '/usr/lib/afl/split-compares-pass.so':
'/usr/lib/afl/split-compares-pass.so: cannot open shared object file: No such
file or directory'
error: unable to load plugin '/usr/lib/afl/split-switches-pass.so':
'/usr/lib/afl/split-switches-pass.so: cannot open shared object file: No such
file or directory'
error: unable to load plugin '/usr/lib/afl/compare-transform-pass.so':
'/usr/lib/afl/compare-transform-pass.so: cannot open shared object file: No
such file or directory'
error: unable to load plugin '/usr/lib/afl/split-compares-pass.so':
'/usr/lib/afl/split-compares-pass.so: cannot open shared object file: No such
file or directory'
error: unable to load plugin '/usr/lib/afl/split-switches-pass.so':
'/usr/lib/afl/split-switches-pass.so: cannot open shared object file: No such
file or directory'
error: unable to load plugin '/usr/lib/afl/compare-transform-pass.so':
'/usr/lib/afl/compare-transform-pass.so: cannot open shared object file: No
such file or directory'
error: unable to load plugin '/usr/lib/afl/split-compares-pass.so':
'/usr/lib/afl/split-compares-pass.so: cannot open shared object file: No such
file or directory'
error: unable to load plugin '/usr/lib/afl/split-switches-pass.so':
'/usr/lib/afl/split-switches-pass.so: cannot open shared object file: No such
file or directory'
error: unable to load plugin '/usr/lib/afl/compare-transform-pass.so':
'/usr/lib/afl/compare-transform-pass.so: cannot open shared object file: No
such file or directory'
error: unable to load plugin '/usr/lib/afl/split-compares-pass.so':
'/usr/lib/afl/split-compares-pass.so: cannot open shared object file: No such
file or directory'
make: *** [Makefile:11: xmlindent] Error 1
AFL_LLVM_CMPLOG=1 fails too:
miriam@computer:~/afl/xmlindent-0.2.17$ AFL_LLVM_CMPLOG=1 CC="afl-clang-fast"
CXX="afl-clang++-fast" make
afl-clang-fast -Wall -g -Wl,-z,defs -Wl,-as-needed -Wl,--no-undefined error.c
indent.c buffer.c main.c -o xmlindent -lfl
afl-clang-fast++2.66c by <[email protected]> in PCGUARD mode
CmpLog mode by <[email protected]>
error: unable to load plugin '/usr/lib/afl/cmplog-routines-pass.so':
'/usr/lib/afl/cmplog-routines-pass.so: cannot open shared object file: No such
file or directory'
error: unable to load plugin '/usr/lib/afl/split-switches-pass.so':
'/usr/lib/afl/split-switches-pass.so: cannot open shared object file: No such
file or directory'
error: unable to load plugin '/usr/lib/afl/cmplog-instructions-pass.so':
'/usr/lib/afl/cmplog-instructions-pass.so: cannot open shared object file: No
such file or directory'
error: unable to load plugin '/usr/lib/afl/cmplog-routines-pass.so':
'/usr/lib/afl/cmplog-routines-pass.so: cannot open shared object file: No such
file or directory'
error: unable to load plugin '/usr/lib/afl/split-switches-pass.so':
'/usr/lib/afl/split-switches-pass.so: cannot open shared object file: No such
file or directory'
error: unable to load plugin '/usr/lib/afl/cmplog-instructions-pass.so':
'/usr/lib/afl/cmplog-instructions-pass.so: cannot open shared object file: No
such file or directory'
error: unable to load plugin '/usr/lib/afl/cmplog-routines-pass.so':
'/usr/lib/afl/cmplog-routines-pass.so: cannot open shared object file: No such
file or directory'
error: unable to load plugin '/usr/lib/afl/split-switches-pass.so':
'/usr/lib/afl/split-switches-pass.so: cannot open shared object file: No such
file or directory'
error: unable to load plugin '/usr/lib/afl/cmplog-instructions-pass.so':
'/usr/lib/afl/cmplog-instructions-pass.so: cannot open shared object file: No
such file or directory'
error: unable to load plugin '/usr/lib/afl/cmplog-routines-pass.so':
'/usr/lib/afl/cmplog-routines-pass.so: cannot open shared object file: No such
file or directory'
error: unable to load plugin '/usr/lib/afl/split-switches-pass.so':
'/usr/lib/afl/split-switches-pass.so: cannot open shared object file: No such
file or directory'
error: unable to load plugin '/usr/lib/afl/cmplog-instructions-pass.so':
'/usr/lib/afl/cmplog-instructions-pass.so: cannot open shared object file: No
such file or directory'
make: *** [Makefile:11: xmlindent] Error 1
If I build the package twice on the row, with debuild, I get:
dpkg-source: error: add llvm_mode/debian/tmp/usr/bin/afl-clang-fast in
debian/source/include-binaries if you want to store the modified binary in the
debian tarball
dpkg-source: warning: executable mode 0755 of
'llvm_mode/debian/tmp/usr/bin/afl-clang-fast' will not be represented in diff
dpkg-source: error: cannot represent change to
llvm_mode/debian/tmp/usr/lib/afl/afl-llvm-pass.so: binary file contents changed
dpkg-source: error: add llvm_mode/debian/tmp/usr/lib/afl/afl-llvm-pass.so in
debian/source/include-binaries if you want to store the modified binary in the
debian tarball
dpkg-source: warning: executable mode 0755 of
'llvm_mode/debian/tmp/usr/lib/afl/afl-llvm-pass.so' will not be represented in
diff
dpkg-source: error: cannot represent change to
llvm_mode/debian/tmp/usr/lib/afl/afl-llvm-rt-64.o: binary file contents changed
dpkg-source: error: add llvm_mode/debian/tmp/usr/lib/afl/afl-llvm-rt-64.o in
debian/source/include-binaries if you want to store the modified binary in the
debian tarball
dpkg-source: warning: executable mode 0755 of
'llvm_mode/debian/tmp/usr/lib/afl/afl-llvm-rt-64.o' will not be represented in
diff
dpkg-source: error: cannot represent change to
llvm_mode/debian/tmp/usr/lib/afl/afl-llvm-rt.o: binary file contents changed
dpkg-source: error: add llvm_mode/debian/tmp/usr/lib/afl/afl-llvm-rt.o in
debian/source/include-binaries if you want to store the modified binary in the
debian tarball
dpkg-source: warning: executable mode 0755 of
'llvm_mode/debian/tmp/usr/lib/afl/afl-llvm-rt.o' will not be represented in diff
dpkg-source: error: cannot represent change to
llvm_mode/debian/tmp/usr/lib/afl/cmplog-instructions-pass.so: binary file
contents changed
dpkg-source: error: add
llvm_mode/debian/tmp/usr/lib/afl/cmplog-instructions-pass.so in
debian/source/include-binaries if you want to store the modified binary in the
debian tarball
dpkg-source: warning: executable mode 0755 of
'llvm_mode/debian/tmp/usr/lib/afl/cmplog-instructions-pass.so' will not be
represented in diff
dpkg-source: error: cannot represent change to
llvm_mode/debian/tmp/usr/lib/afl/cmplog-routines-pass.so: binary file contents
changed
dpkg-source: error: add
llvm_mode/debian/tmp/usr/lib/afl/cmplog-routines-pass.so in
debian/source/include-binaries if you want to store the modified binary in the
debian tarball
dpkg-source: warning: executable mode 0755 of
'llvm_mode/debian/tmp/usr/lib/afl/cmplog-routines-pass.so' will not be
represented in diff
dpkg-source: error: cannot represent change to
llvm_mode/debian/tmp/usr/lib/afl/compare-transform-pass.so: binary file
contents changed
dpkg-source: error: add
llvm_mode/debian/tmp/usr/lib/afl/compare-transform-pass.so in
debian/source/include-binaries if you want to store the modified binary in the
debian tarball
dpkg-source: warning: executable mode 0755 of
'llvm_mode/debian/tmp/usr/lib/afl/compare-transform-pass.so' will not be
represented in diff
dpkg-source: error: cannot represent change to
llvm_mode/debian/tmp/usr/lib/afl/libLLVMInsTrim.so: binary file contents changed
dpkg-source: error: add llvm_mode/debian/tmp/usr/lib/afl/libLLVMInsTrim.so in
debian/source/include-binaries if you want to store the modified binary in the
debian tarball
dpkg-source: warning: executable mode 0755 of
'llvm_mode/debian/tmp/usr/lib/afl/libLLVMInsTrim.so' will not be represented in
diff
dpkg-source: error: cannot represent change to
llvm_mode/debian/tmp/usr/lib/afl/split-compares-pass.so: binary file contents
changed
dpkg-source: error: add llvm_mode/debian/tmp/usr/lib/afl/split-compares-pass.so
in debian/source/include-binaries if you want to store the modified binary in
the debian tarball
dpkg-source: warning: executable mode 0755 of
'llvm_mode/debian/tmp/usr/lib/afl/split-compares-pass.so' will not be
represented in diff
dpkg-source: error: cannot represent change to
llvm_mode/debian/tmp/usr/lib/afl/split-switches-pass.so: binary file contents
changed
dpkg-source: error: add llvm_mode/debian/tmp/usr/lib/afl/split-switches-pass.so
in debian/source/include-binaries if you want to store the modified binary in
the debian tarball
dpkg-source: warning: executable mode 0755 of
'llvm_mode/debian/tmp/usr/lib/afl/split-switches-pass.so' will not be
represented in diff
dpkg-source: error: unrepresentable changes to source
So I guess that upstream build system is probably doing something wrong here.
I have managed to fix it locally for me in a Q'n'D way with:
diff -ruN aflplusplus-2.66c.old/debian/afl++-clang.install
aflplusplus-2.66c.new/debian/afl++-clang.install
--- aflplusplus-2.66c.old/debian/afl++-clang.install 2020-08-07
11:48:29.000000000 +0200
+++ aflplusplus-2.66c.new/debian/afl++-clang.install 2020-08-07
11:48:29.000000000 +0200
@@ -2,5 +2,9 @@
/usr/bin/afl-clang-fast++
/usr/lib/afl/afl-llvm-pass.so
/usr/lib/afl/afl-llvm-rt*.o
+/usr/lib/afl/split-*.so
+/usr/lib/afl/cmplog-*.so
+/usr/lib/afl/compare-*.so
+/usr/lib/afl/libLLVMInsTrim.so
/usr/bin/afl-clang
/usr/bin/afl-clang++
diff -ruN aflplusplus-2.66c.old/debian/rules aflplusplus-2.66c.new/debian/rules
--- aflplusplus-2.66c.old/debian/rules 2020-08-07 11:48:29.000000000 +0200
+++ aflplusplus-2.66c.new/debian/rules 2020-08-07 11:48:29.000000000 +0200
@@ -36,6 +36,7 @@
$(MAKE) -C libdislocator install DESTDIR=$(CURDIR)/debian/tmp
$(MAKE) -C libtokencap install DESTDIR=$(CURDIR)/debian/tmp
$(MAKE) -C llvm_mode install DESTDIR=$(CURDIR)/debian/tmp
+ (cd llvm_mode/debian/tmp; tar cf - . ) | (cd $(CURDIR)/debian/tmp; tar
xvf -)
override_dh_install:
dh_install
@@ -73,3 +74,7 @@
override_dh_makeshlibs:
dh_makeshlibs -Nafl++-doc
+
+override_dh_clean:
+ dh_clean
+ rm -rf llvm_mode/debian/
Greetings,
Miry
-- System Information:
Debian Release: bullseye/sid
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 5.6.0-1-amd64 (SMP w/40 CPU threads)
Kernel taint flags: TAINT_WARN
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8),
LANGUAGE=en_US:en
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages afl++-clang depends on:
ii afl++ 2.66c-1
ii clang-11 1:11.0.0~+rc2-1
ii libc6 2.31-3
ii libgcc-s1 10.2.0-5
ii libstdc++6 10.2.0-5
Versions of packages afl++-clang recommends:
ii afl++-doc 2.66c-1
afl++-clang suggests no packages.
-- no debconf information
diff -ruN aflplusplus-2.66c.old/debian/afl++-clang.install
aflplusplus-2.66c.new/debian/afl++-clang.install
--- aflplusplus-2.66c.old/debian/afl++-clang.install 2020-08-07
11:48:29.000000000 +0200
+++ aflplusplus-2.66c.new/debian/afl++-clang.install 2020-08-07
11:48:29.000000000 +0200
@@ -2,5 +2,9 @@
/usr/bin/afl-clang-fast++
/usr/lib/afl/afl-llvm-pass.so
/usr/lib/afl/afl-llvm-rt*.o
+/usr/lib/afl/split-*.so
+/usr/lib/afl/cmplog-*.so
+/usr/lib/afl/compare-*.so
+/usr/lib/afl/libLLVMInsTrim.so
/usr/bin/afl-clang
/usr/bin/afl-clang++
diff -ruN aflplusplus-2.66c.old/debian/rules aflplusplus-2.66c.new/debian/rules
--- aflplusplus-2.66c.old/debian/rules 2020-08-07 11:48:29.000000000 +0200
+++ aflplusplus-2.66c.new/debian/rules 2020-08-07 11:48:29.000000000 +0200
@@ -36,6 +36,7 @@
$(MAKE) -C libdislocator install DESTDIR=$(CURDIR)/debian/tmp
$(MAKE) -C libtokencap install DESTDIR=$(CURDIR)/debian/tmp
$(MAKE) -C llvm_mode install DESTDIR=$(CURDIR)/debian/tmp
+ (cd llvm_mode/debian/tmp; tar cf - . ) | (cd $(CURDIR)/debian/tmp; tar
xvf -)
override_dh_install:
dh_install
@@ -73,3 +74,7 @@
override_dh_makeshlibs:
dh_makeshlibs -Nafl++-doc
+
+override_dh_clean:
+ dh_clean
+ rm -rf llvm_mode/debian/