[SCM] Samba Shared Repository - branch master updated
Andrew Bartlett
abartlet at samba.org
Tue Dec 10 09:16:02 UTC 2019
The branch, master has been updated
via 8b06cabc7d7 bootstrap: Add chrpath as a required package
via 96184c10b8d build: Skip build of python bindings when in fuzzing mode
via 4c8388fb198 lib/fuzzing Truncate the original files after RUNPATH manipulation in build.sh
via 5e5d18c5b1e lib/fuzzing Add comments to explain RUNPATH manipulation in build.sh
via 5bb9ecdf15f lib/fuzzing: Support an oss-fuzz build with either address or undefined behaviour sanitizers
via f79caf3b6bf lib/fuzzing: Remove oss-fuzz build.sh stub from the Samba repo
via 8382fa6408e oss-fuzz: Align build.sh sh parameters with pattern from the oss-fuzz project
via 47c7f549955 fuzz/decode_ndr_X_crash: -f to filter crashes by regex
via 1d98ced841f lib/fuzzing: Add mode for the AFL fuzzer
via f4ff9a07941 lib/fuzzing: Also confirm we can make a string filter from the parsed tree in fuzz_ldb_parse_tree
via 000d86f5378 lib/fuzzing: Tell the compiler we know we are ignoring errors in fuzz_reg_parse
via a9a8bcf7316 lib/fuzzer: Allow building a fuzz binary for just one interface
via c16e4dcad9c lib/fuzzer: Remove rudundent install=False flag from fuzz_ndr_X build rule
via 6f7a9e87887 lib/fuzzing: Link only the required NDR_ subsystems into ndr_fuzz_X binaries
via 3ca76f59070 librpc: Fill in full deps for NDR_* subsystems
via c35fe03a63c fuzzing/decode_ndr_X: read crashes from a HONGGFUZZ report
via afe866086c0 lib/fuzzing/decode_ndr_X: print less by default, avoid pipe
via c0043e23526 fuzzing: Add script decode_ndr_X_crash to decode crash results
via e7379886419 dcerpc: developer option to save ndr_fuzz_X seeds
via 7b265830ad6 lib/fuzzing: add fuzz_ndr_X
from ef5d79e24ba pidl/tests/samba-ndr.pl: remove duplicate import
https://git.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 8b06cabc7d735f8a780b832ddb7d5ab2989e661f
Author: Andrew Bartlett <abartlet at samba.org>
Date: Sat Dec 7 17:35:26 2019 +1300
bootstrap: Add chrpath as a required package
This is used to test build.sh, part of the oss-fuzz integration, and so also that we
correctly build our fuzzers.
Signed-off-by: Andrew Bartlett <abartlet at samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Autobuild-User(master): Andrew Bartlett <abartlet at samba.org>
Autobuild-Date(master): Tue Dec 10 09:15:43 UTC 2019 on sn-devel-184
commit 96184c10b8d048a67e57b7b838a1da2a1588455c
Author: Andrew Bartlett <abartlet at samba.org>
Date: Sat Dec 7 13:37:10 2019 +1300
build: Skip build of python bindings when in fuzzing mode
This will just save a bit of time and space.
Signed-off-by: Andrew Bartlett <abartlet at samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
commit 4c8388fb19865c7e0aa6facf43b6cbd1906a6b2c
Author: Andrew Bartlett <abartlet at samba.org>
Date: Sun Dec 8 07:45:58 2019 +1300
lib/fuzzing Truncate the original files after RUNPATH manipulation in build.sh
This saves space on the rackspace runners in particular.
Signed-off-by: Andrew Bartlett <abartlet at samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
commit 5e5d18c5b1e710a747ede56efe10792957f11552
Author: Andrew Bartlett <abartlet at samba.org>
Date: Sun Dec 8 07:44:45 2019 +1300
lib/fuzzing Add comments to explain RUNPATH manipulation in build.sh
Signed-off-by: Andrew Bartlett <abartlet at samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
commit 5bb9ecdf15febb492bf9b65f5811ca0b59fefec8
Author: Andrew Bartlett <abartlet at samba.org>
Date: Sat Dec 7 13:01:58 2019 +1300
lib/fuzzing: Support an oss-fuzz build with either address or undefined behaviour sanitizers
Add handler for $SANITIZER in build.sh
This allows a build with the undefined behaviour sanitizer.
Otherwise we fail the oss-fuzz CI because the UBSan build links with ASan.
Once this in in then https://github.com/google/oss-fuzz/pull/3094
can be merged to oss-fuzz.
Signed-off-by: Andrew Bartlett <abartlet at samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
commit f79caf3b6bf4b3c4942874af70cfa8c912959faa
Author: Andrew Bartlett <abartlet at samba.org>
Date: Sun Dec 8 07:22:33 2019 +1300
lib/fuzzing: Remove oss-fuzz build.sh stub from the Samba repo
We need to ship the stub build.sh in the oss-fuzz repo, not ours.
This is because otherwise the travis CI checks skip the build
(it thinks we are not set up yet, or have been disabled).
See https://github.com/google/oss-fuzz/pull/3094 for the PR
creating a similar file there. This is very similar to how
janus-gateway operates, so this is an accepted pattern.
Signed-off-by: Andrew Bartlett <abartlet at samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
commit 8382fa6408ef5efc45260e332579a6d9ee648d87
Author: Andrew Bartlett <abartlet at samba.org>
Date: Sat Dec 7 12:06:37 2019 +1300
oss-fuzz: Align build.sh sh parameters with pattern from the oss-fuzz project
We should run build_samba.sh with -eux to ensure we exit on failure,
refuse to use an unset varible and print the commands we are running.
(The suggested build.sh on the oss-fuzz side uses -eu).
Signed-off-by: Andrew Bartlett <abartlet at samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
commit 47c7f549955b8c01d5fbe09a0f9ccc3503b94c63
Author: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Date: Fri Dec 6 11:10:05 2019 +1300
fuzz/decode_ndr_X_crash: -f to filter crashes by regex
If you go:
$ ./lib/fuzzing/decode_ndr_X_crash -H HONGGFUZZ_REPORT.txt -f 'SIG[^V]' > ./crash.sh
you will get all the crashes and not the timeouts (which have SIGVTALARM).
Signed-off-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
commit 1d98ced841f83d7305a570297908fd1270de42e0
Author: Andrew Bartlett <abartlet at samba.org>
Date: Wed Dec 4 21:23:06 2019 +1300
lib/fuzzing: Add mode for the AFL fuzzer
This is helpful for ensuring the fuzzers still compile in autobuild as no
library support is required.
Signed-off-by: Andrew Bartlett <abartlet at samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
commit f4ff9a079414953b17f49857ecfca6c0e479c32f
Author: Andrew Bartlett <abartlet at samba.org>
Date: Wed Dec 4 22:07:26 2019 +1300
lib/fuzzing: Also confirm we can make a string filter from the parsed tree in fuzz_ldb_parse_tree
This also avoids tree being an unused variable.
This is similar to doing an ndr_push() in ndr_fuzz_X, it
catches some of the cases where the parse is successful but
the application code could misinterpret the structure.
Signed-off-by: Andrew Bartlett <abartlet at samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
commit 000d86f537866a3c83f06d7b128532119df45dd9
Author: Andrew Bartlett <abartlet at samba.org>
Date: Wed Dec 4 21:39:49 2019 +1300
lib/fuzzing: Tell the compiler we know we are ignoring errors in fuzz_reg_parse
Signed-off-by: Andrew Bartlett <abartlet at samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
commit a9a8bcf731659f0898f70759e78a9909f018ae48
Author: Andrew Bartlett <abartlet at samba.org>
Date: Sat Nov 30 20:23:18 2019 +1300
lib/fuzzer: Allow building a fuzz binary for just one interface
This helps direct the fuzzer at a particular function that we are concerned about.
Signed-off-by: Andrew Bartlett <abartlet at samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
commit c16e4dcad9cb8dc16ceacb94b9ba6ce094f4e507
Author: Andrew Bartlett <abartlet at samba.org>
Date: Sat Nov 30 20:22:26 2019 +1300
lib/fuzzer: Remove rudundent install=False flag from fuzz_ndr_X build rule
Signed-off-by: Andrew Bartlett <abartlet at samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
commit 6f7a9e87887e50160df6a06b09d8454eef9208a1
Author: Andrew Bartlett <abartlet at samba.org>
Date: Fri Nov 29 12:07:34 2019 +1300
lib/fuzzing: Link only the required NDR_ subsystems into ndr_fuzz_X binaries
This reduces the binary size and shows that we are linked against the correct
ndr_table_ global variable. This might help the fuzzing engine know there
is not much more of the binary to find if unreachable code is not included.
Signed-off-by: Andrew Bartlett <abartlet at samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
commit 3ca76f59070020ea188bea88bece38d8c9036f59
Author: Andrew Bartlett <abartlet at samba.org>
Date: Fri Nov 29 12:06:01 2019 +1300
librpc: Fill in full deps for NDR_* subsystems
Signed-off-by: Andrew Bartlett <abartlet at samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
commit c35fe03a63cae908d879328fe4238ed1df1b158d
Author: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Date: Wed Dec 4 11:57:02 2019 +1300
fuzzing/decode_ndr_X: read crashes from a HONGGFUZZ report
In theory, you should be able to run honggfuzz and go
$ lib/fuzzing/decode_ndr_X_crash -H HONGGFUZZ-REPORT.txt > crash-crash-crash.sh
Signed-off-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
commit afe866086c00d433e270a94c782f551e5b00263b
Author: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Date: Wed Dec 4 11:35:40 2019 +1300
lib/fuzzing/decode_ndr_X: print less by default, avoid pipe
ndrdump can now take base64 input directly.
Signed-off-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
commit c0043e2352691e5ee3885558e5c1894dda342a70
Author: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Date: Tue Nov 5 14:26:56 2019 +1300
fuzzing: Add script decode_ndr_X_crash to decode crash results
This interprets a file that crashes an fuzz_ndr_X binary
Signed-off-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
commit e737988641905180d7d9a4e5cc88a85637deaab6
Author: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Date: Wed Nov 6 17:27:08 2019 +1300
dcerpc: developer option to save ndr_fuzz_X seeds
Signed-off-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Signed-off-by: Andrew Bartlett <abartlet at samba.org>
Pair-programmed-by: Andrew Bartlett <abartlet at samba.org>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
commit 7b265830ad6796dbbe721f7abfd62a19c2185b65
Author: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Date: Thu Oct 31 16:28:28 2019 +1300
lib/fuzzing: add fuzz_ndr_X
This NDR fuzzer links with each "interface" in the IDL files to
create avsingle binary. This tries to matches what the fuzzing
engines desire.
It started as a copy of ndrdump but very little of that remains
in place.
The fancy build rules try to avoid needing a lof of boilerplate
in the wscript_build files and ensure new fuzzers are generated
and run when new IDL is added automatically.
Signed-off-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Signed-off-by: Andrew Bartlett <abartlet at samba.org>
Pair-programmed-by: Andrew Bartlett <abartlet at samba.org>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
-----------------------------------------------------------------------
Summary of changes:
.gitlab-ci.yml | 2 +-
bootstrap/config.py | 1 +
bootstrap/generated-dists/centos6/bootstrap.sh | 1 +
bootstrap/generated-dists/centos6/packages.yml | 1 +
bootstrap/generated-dists/centos7/bootstrap.sh | 1 +
bootstrap/generated-dists/centos7/packages.yml | 1 +
bootstrap/generated-dists/centos8/bootstrap.sh | 1 +
bootstrap/generated-dists/centos8/packages.yml | 1 +
bootstrap/generated-dists/debian10/bootstrap.sh | 1 +
bootstrap/generated-dists/debian10/packages.yml | 1 +
bootstrap/generated-dists/debian7/bootstrap.sh | 1 +
bootstrap/generated-dists/debian7/packages.yml | 1 +
bootstrap/generated-dists/debian8/bootstrap.sh | 1 +
bootstrap/generated-dists/debian8/packages.yml | 1 +
bootstrap/generated-dists/debian9/bootstrap.sh | 1 +
bootstrap/generated-dists/debian9/packages.yml | 1 +
bootstrap/generated-dists/fedora29/bootstrap.sh | 1 +
bootstrap/generated-dists/fedora29/packages.yml | 1 +
bootstrap/generated-dists/fedora30/bootstrap.sh | 1 +
bootstrap/generated-dists/fedora30/packages.yml | 1 +
bootstrap/generated-dists/fedora31/bootstrap.sh | 1 +
bootstrap/generated-dists/fedora31/packages.yml | 1 +
bootstrap/generated-dists/opensuse150/bootstrap.sh | 1 +
bootstrap/generated-dists/opensuse150/packages.yml | 1 +
bootstrap/generated-dists/opensuse151/bootstrap.sh | 1 +
bootstrap/generated-dists/opensuse151/packages.yml | 1 +
bootstrap/generated-dists/ubuntu1404/bootstrap.sh | 1 +
bootstrap/generated-dists/ubuntu1404/packages.yml | 1 +
bootstrap/generated-dists/ubuntu1604/bootstrap.sh | 1 +
bootstrap/generated-dists/ubuntu1604/packages.yml | 1 +
bootstrap/generated-dists/ubuntu1804/bootstrap.sh | 1 +
bootstrap/generated-dists/ubuntu1804/packages.yml | 1 +
bootstrap/sha1sum.txt | 2 +-
buildtools/wafsamba/samba_pidl.py | 12 +-
buildtools/wafsamba/samba_python.py | 4 +
buildtools/wafsamba/wafsamba.py | 2 +-
buildtools/wafsamba/wscript | 13 +-
lib/fuzzing/README.md | 26 +-
.../gpo/gpo.c => lib/fuzzing/afl-fuzz-main.c | 37 ++-
lib/fuzzing/decode_ndr_X_crash | 137 +++++++++
lib/fuzzing/fuzz_ldb_parse_tree.c | 2 +
lib/fuzzing/fuzz_ndr_X.c | 306 +++++++++++++++++++++
lib/fuzzing/fuzz_reg_parse.c | 3 +-
lib/fuzzing/oss-fuzz/build.sh | 6 -
lib/fuzzing/oss-fuzz/build_image.sh | 4 -
lib/fuzzing/oss-fuzz/build_samba.sh | 28 +-
lib/fuzzing/wscript_build | 126 ++++++++-
librpc/idl/wscript_build | 72 ++++-
librpc/rpc/dcerpc_util.c | 129 +++++++++
librpc/rpc/dcesrv_core.c | 32 +++
librpc/rpc/dcesrv_core.h | 14 +
librpc/rpc/dcesrv_reply.c | 4 +
librpc/rpc/rpc_common.h | 21 ++
librpc/wscript_build | 38 ++-
pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm | 25 ++
selftest/target/Samba3.pm | 4 +
source3/librpc/wscript_build | 2 +-
source3/rpc_server/srv_pipe.c | 19 ++
source4/librpc/wscript_build | 2 +-
wscript_build | 6 +-
60 files changed, 1035 insertions(+), 74 deletions(-)
copy source4/torture/gpo/gpo.c => lib/fuzzing/afl-fuzz-main.c (63%)
create mode 100755 lib/fuzzing/decode_ndr_X_crash
create mode 100644 lib/fuzzing/fuzz_ndr_X.c
delete mode 100644 lib/fuzzing/oss-fuzz/build.sh
Changeset truncated at 500 lines:
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 435c10f33e7..515fb117902 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -22,7 +22,7 @@ variables:
# Set this to the contents of bootstrap/sha1sum.txt
# which is generated by bootstrap/template.py --render
#
- SAMBA_CI_CONTAINER_TAG: f0cc64e22c612eb0599984cfc5dd20f36858db59
+ SAMBA_CI_CONTAINER_TAG: 36dd95324f5406f62312648e83fde78a8267b386
#
# We use the ubuntu1804 image as default as
# it matches what we have on sn-devel-184.
diff --git a/bootstrap/config.py b/bootstrap/config.py
index a135456866c..b7ad2f68a53 100644
--- a/bootstrap/config.py
+++ b/bootstrap/config.py
@@ -37,6 +37,7 @@ COMMON = [
'binutils',
'bison',
'curl',
+ 'chrpath',
'flex',
'gcc',
'gdb',
diff --git a/bootstrap/generated-dists/centos6/bootstrap.sh b/bootstrap/generated-dists/centos6/bootstrap.sh
index 129cc3d557b..551d9e773a3 100755
--- a/bootstrap/generated-dists/centos6/bootstrap.sh
+++ b/bootstrap/generated-dists/centos6/bootstrap.sh
@@ -22,6 +22,7 @@ yum install -y \
bind-utils \
binutils \
bison \
+ chrpath \
cups-devel \
curl \
dbus-devel \
diff --git a/bootstrap/generated-dists/centos6/packages.yml b/bootstrap/generated-dists/centos6/packages.yml
index a9225035e02..86eb719d641 100644
--- a/bootstrap/generated-dists/centos6/packages.yml
+++ b/bootstrap/generated-dists/centos6/packages.yml
@@ -8,6 +8,7 @@ packages:
- bind-utils
- binutils
- bison
+ - chrpath
- cups-devel
- curl
- dbus-devel
diff --git a/bootstrap/generated-dists/centos7/bootstrap.sh b/bootstrap/generated-dists/centos7/bootstrap.sh
index fb8ee8b72f6..08debda480b 100755
--- a/bootstrap/generated-dists/centos7/bootstrap.sh
+++ b/bootstrap/generated-dists/centos7/bootstrap.sh
@@ -22,6 +22,7 @@ yum install -y \
bind-utils \
binutils \
bison \
+ chrpath \
compat-gnutls34-devel \
cups-devel \
curl \
diff --git a/bootstrap/generated-dists/centos7/packages.yml b/bootstrap/generated-dists/centos7/packages.yml
index 3d37fd52d51..9b93461ff2c 100644
--- a/bootstrap/generated-dists/centos7/packages.yml
+++ b/bootstrap/generated-dists/centos7/packages.yml
@@ -8,6 +8,7 @@ packages:
- bind-utils
- binutils
- bison
+ - chrpath
- compat-gnutls34-devel
- cups-devel
- curl
diff --git a/bootstrap/generated-dists/centos8/bootstrap.sh b/bootstrap/generated-dists/centos8/bootstrap.sh
index 4b12476dd36..e19a8b169c7 100755
--- a/bootstrap/generated-dists/centos8/bootstrap.sh
+++ b/bootstrap/generated-dists/centos8/bootstrap.sh
@@ -23,6 +23,7 @@ yum install -y \
bind-utils \
binutils \
bison \
+ chrpath \
cups-devel \
curl \
dbus-devel \
diff --git a/bootstrap/generated-dists/centos8/packages.yml b/bootstrap/generated-dists/centos8/packages.yml
index d8e2d02391f..a86bbbdc620 100644
--- a/bootstrap/generated-dists/centos8/packages.yml
+++ b/bootstrap/generated-dists/centos8/packages.yml
@@ -8,6 +8,7 @@ packages:
- bind-utils
- binutils
- bison
+ - chrpath
- cups-devel
- curl
- dbus-devel
diff --git a/bootstrap/generated-dists/debian10/bootstrap.sh b/bootstrap/generated-dists/debian10/bootstrap.sh
index 6970c477b38..758c86f22af 100755
--- a/bootstrap/generated-dists/debian10/bootstrap.sh
+++ b/bootstrap/generated-dists/debian10/bootstrap.sh
@@ -19,6 +19,7 @@ apt-get -y install \
binutils \
bison \
build-essential \
+ chrpath \
curl \
debhelper \
dnsutils \
diff --git a/bootstrap/generated-dists/debian10/packages.yml b/bootstrap/generated-dists/debian10/packages.yml
index 5943f28704b..f5115e99025 100644
--- a/bootstrap/generated-dists/debian10/packages.yml
+++ b/bootstrap/generated-dists/debian10/packages.yml
@@ -8,6 +8,7 @@ packages:
- binutils
- bison
- build-essential
+ - chrpath
- curl
- debhelper
- dnsutils
diff --git a/bootstrap/generated-dists/debian7/bootstrap.sh b/bootstrap/generated-dists/debian7/bootstrap.sh
index ea22b863afb..d201695fc03 100755
--- a/bootstrap/generated-dists/debian7/bootstrap.sh
+++ b/bootstrap/generated-dists/debian7/bootstrap.sh
@@ -19,6 +19,7 @@ apt-get -y install \
binutils \
bison \
build-essential \
+ chrpath \
curl \
debhelper \
dnsutils \
diff --git a/bootstrap/generated-dists/debian7/packages.yml b/bootstrap/generated-dists/debian7/packages.yml
index 3303e68d87b..541704e8b21 100644
--- a/bootstrap/generated-dists/debian7/packages.yml
+++ b/bootstrap/generated-dists/debian7/packages.yml
@@ -8,6 +8,7 @@ packages:
- binutils
- bison
- build-essential
+ - chrpath
- curl
- debhelper
- dnsutils
diff --git a/bootstrap/generated-dists/debian8/bootstrap.sh b/bootstrap/generated-dists/debian8/bootstrap.sh
index 687e7723847..c810ad89009 100755
--- a/bootstrap/generated-dists/debian8/bootstrap.sh
+++ b/bootstrap/generated-dists/debian8/bootstrap.sh
@@ -19,6 +19,7 @@ apt-get -y install \
binutils \
bison \
build-essential \
+ chrpath \
curl \
debhelper \
dnsutils \
diff --git a/bootstrap/generated-dists/debian8/packages.yml b/bootstrap/generated-dists/debian8/packages.yml
index 008d58c9514..170733a19f6 100644
--- a/bootstrap/generated-dists/debian8/packages.yml
+++ b/bootstrap/generated-dists/debian8/packages.yml
@@ -8,6 +8,7 @@ packages:
- binutils
- bison
- build-essential
+ - chrpath
- curl
- debhelper
- dnsutils
diff --git a/bootstrap/generated-dists/debian9/bootstrap.sh b/bootstrap/generated-dists/debian9/bootstrap.sh
index 6970c477b38..758c86f22af 100755
--- a/bootstrap/generated-dists/debian9/bootstrap.sh
+++ b/bootstrap/generated-dists/debian9/bootstrap.sh
@@ -19,6 +19,7 @@ apt-get -y install \
binutils \
bison \
build-essential \
+ chrpath \
curl \
debhelper \
dnsutils \
diff --git a/bootstrap/generated-dists/debian9/packages.yml b/bootstrap/generated-dists/debian9/packages.yml
index 5943f28704b..f5115e99025 100644
--- a/bootstrap/generated-dists/debian9/packages.yml
+++ b/bootstrap/generated-dists/debian9/packages.yml
@@ -8,6 +8,7 @@ packages:
- binutils
- bison
- build-essential
+ - chrpath
- curl
- debhelper
- dnsutils
diff --git a/bootstrap/generated-dists/fedora29/bootstrap.sh b/bootstrap/generated-dists/fedora29/bootstrap.sh
index 1c8357c5cb5..9c094aae396 100755
--- a/bootstrap/generated-dists/fedora29/bootstrap.sh
+++ b/bootstrap/generated-dists/fedora29/bootstrap.sh
@@ -19,6 +19,7 @@ dnf install -y \
bind-utils \
binutils \
bison \
+ chrpath \
cups-devel \
curl \
dbus-devel \
diff --git a/bootstrap/generated-dists/fedora29/packages.yml b/bootstrap/generated-dists/fedora29/packages.yml
index dc37c6f15dd..be10535bfa1 100644
--- a/bootstrap/generated-dists/fedora29/packages.yml
+++ b/bootstrap/generated-dists/fedora29/packages.yml
@@ -8,6 +8,7 @@ packages:
- bind-utils
- binutils
- bison
+ - chrpath
- cups-devel
- curl
- dbus-devel
diff --git a/bootstrap/generated-dists/fedora30/bootstrap.sh b/bootstrap/generated-dists/fedora30/bootstrap.sh
index 1c8357c5cb5..9c094aae396 100755
--- a/bootstrap/generated-dists/fedora30/bootstrap.sh
+++ b/bootstrap/generated-dists/fedora30/bootstrap.sh
@@ -19,6 +19,7 @@ dnf install -y \
bind-utils \
binutils \
bison \
+ chrpath \
cups-devel \
curl \
dbus-devel \
diff --git a/bootstrap/generated-dists/fedora30/packages.yml b/bootstrap/generated-dists/fedora30/packages.yml
index dc37c6f15dd..be10535bfa1 100644
--- a/bootstrap/generated-dists/fedora30/packages.yml
+++ b/bootstrap/generated-dists/fedora30/packages.yml
@@ -8,6 +8,7 @@ packages:
- bind-utils
- binutils
- bison
+ - chrpath
- cups-devel
- curl
- dbus-devel
diff --git a/bootstrap/generated-dists/fedora31/bootstrap.sh b/bootstrap/generated-dists/fedora31/bootstrap.sh
index b423481af67..b882489baa2 100755
--- a/bootstrap/generated-dists/fedora31/bootstrap.sh
+++ b/bootstrap/generated-dists/fedora31/bootstrap.sh
@@ -19,6 +19,7 @@ dnf install -y \
bind-utils \
binutils \
bison \
+ chrpath \
cups-devel \
curl \
dbus-devel \
diff --git a/bootstrap/generated-dists/fedora31/packages.yml b/bootstrap/generated-dists/fedora31/packages.yml
index d56faf8a859..d407300b3ef 100644
--- a/bootstrap/generated-dists/fedora31/packages.yml
+++ b/bootstrap/generated-dists/fedora31/packages.yml
@@ -8,6 +8,7 @@ packages:
- bind-utils
- binutils
- bison
+ - chrpath
- cups-devel
- curl
- dbus-devel
diff --git a/bootstrap/generated-dists/opensuse150/bootstrap.sh b/bootstrap/generated-dists/opensuse150/bootstrap.sh
index a970cde7679..591da07b1d8 100755
--- a/bootstrap/generated-dists/opensuse150/bootstrap.sh
+++ b/bootstrap/generated-dists/opensuse150/bootstrap.sh
@@ -19,6 +19,7 @@ zypper --non-interactive install \
bind-utils \
binutils \
bison \
+ chrpath \
cups-devel \
curl \
dbus-1-devel \
diff --git a/bootstrap/generated-dists/opensuse150/packages.yml b/bootstrap/generated-dists/opensuse150/packages.yml
index 62a4270600a..ba60caba868 100644
--- a/bootstrap/generated-dists/opensuse150/packages.yml
+++ b/bootstrap/generated-dists/opensuse150/packages.yml
@@ -7,6 +7,7 @@ packages:
- bind-utils
- binutils
- bison
+ - chrpath
- cups-devel
- curl
- dbus-1-devel
diff --git a/bootstrap/generated-dists/opensuse151/bootstrap.sh b/bootstrap/generated-dists/opensuse151/bootstrap.sh
index a970cde7679..591da07b1d8 100755
--- a/bootstrap/generated-dists/opensuse151/bootstrap.sh
+++ b/bootstrap/generated-dists/opensuse151/bootstrap.sh
@@ -19,6 +19,7 @@ zypper --non-interactive install \
bind-utils \
binutils \
bison \
+ chrpath \
cups-devel \
curl \
dbus-1-devel \
diff --git a/bootstrap/generated-dists/opensuse151/packages.yml b/bootstrap/generated-dists/opensuse151/packages.yml
index 62a4270600a..ba60caba868 100644
--- a/bootstrap/generated-dists/opensuse151/packages.yml
+++ b/bootstrap/generated-dists/opensuse151/packages.yml
@@ -7,6 +7,7 @@ packages:
- bind-utils
- binutils
- bison
+ - chrpath
- cups-devel
- curl
- dbus-1-devel
diff --git a/bootstrap/generated-dists/ubuntu1404/bootstrap.sh b/bootstrap/generated-dists/ubuntu1404/bootstrap.sh
index e671c7a50c0..01dddb85286 100755
--- a/bootstrap/generated-dists/ubuntu1404/bootstrap.sh
+++ b/bootstrap/generated-dists/ubuntu1404/bootstrap.sh
@@ -19,6 +19,7 @@ apt-get -y install \
binutils \
bison \
build-essential \
+ chrpath \
curl \
debhelper \
dnsutils \
diff --git a/bootstrap/generated-dists/ubuntu1404/packages.yml b/bootstrap/generated-dists/ubuntu1404/packages.yml
index af577b3a329..52e2b0c783f 100644
--- a/bootstrap/generated-dists/ubuntu1404/packages.yml
+++ b/bootstrap/generated-dists/ubuntu1404/packages.yml
@@ -8,6 +8,7 @@ packages:
- binutils
- bison
- build-essential
+ - chrpath
- curl
- debhelper
- dnsutils
diff --git a/bootstrap/generated-dists/ubuntu1604/bootstrap.sh b/bootstrap/generated-dists/ubuntu1604/bootstrap.sh
index cfac3a06211..04ceb1822c4 100755
--- a/bootstrap/generated-dists/ubuntu1604/bootstrap.sh
+++ b/bootstrap/generated-dists/ubuntu1604/bootstrap.sh
@@ -19,6 +19,7 @@ apt-get -y install \
binutils \
bison \
build-essential \
+ chrpath \
curl \
debhelper \
dnsutils \
diff --git a/bootstrap/generated-dists/ubuntu1604/packages.yml b/bootstrap/generated-dists/ubuntu1604/packages.yml
index 7efddb7bbbd..c6cb5e460ae 100644
--- a/bootstrap/generated-dists/ubuntu1604/packages.yml
+++ b/bootstrap/generated-dists/ubuntu1604/packages.yml
@@ -8,6 +8,7 @@ packages:
- binutils
- bison
- build-essential
+ - chrpath
- curl
- debhelper
- dnsutils
diff --git a/bootstrap/generated-dists/ubuntu1804/bootstrap.sh b/bootstrap/generated-dists/ubuntu1804/bootstrap.sh
index 0e5c611665b..e07f1863c31 100755
--- a/bootstrap/generated-dists/ubuntu1804/bootstrap.sh
+++ b/bootstrap/generated-dists/ubuntu1804/bootstrap.sh
@@ -19,6 +19,7 @@ apt-get -y install \
binutils \
bison \
build-essential \
+ chrpath \
curl \
debhelper \
dnsutils \
diff --git a/bootstrap/generated-dists/ubuntu1804/packages.yml b/bootstrap/generated-dists/ubuntu1804/packages.yml
index 2045f092f16..d70426ca5f2 100644
--- a/bootstrap/generated-dists/ubuntu1804/packages.yml
+++ b/bootstrap/generated-dists/ubuntu1804/packages.yml
@@ -8,6 +8,7 @@ packages:
- binutils
- bison
- build-essential
+ - chrpath
- curl
- debhelper
- dnsutils
diff --git a/bootstrap/sha1sum.txt b/bootstrap/sha1sum.txt
index 8117f01d9b4..c9bf561e666 100644
--- a/bootstrap/sha1sum.txt
+++ b/bootstrap/sha1sum.txt
@@ -1 +1 @@
-f0cc64e22c612eb0599984cfc5dd20f36858db59
+36dd95324f5406f62312648e83fde78a8267b386
diff --git a/buildtools/wafsamba/samba_pidl.py b/buildtools/wafsamba/samba_pidl.py
index a34c871d183..b92120edd23 100644
--- a/buildtools/wafsamba/samba_pidl.py
+++ b/buildtools/wafsamba/samba_pidl.py
@@ -108,14 +108,22 @@ def SAMBA_PIDL(bld, pname, source,
t.more_includes = '#' + bld.path.path_from(bld.srcnode)
Build.BuildContext.SAMBA_PIDL = SAMBA_PIDL
-
def SAMBA_PIDL_LIST(bld, name, source,
options='',
output_dir='.',
- generate_tables=True):
+ generate_tables=True,
+ generate_fuzzers=True):
'''A wrapper for building a set of IDL files'''
for p in TO_LIST(source):
bld.SAMBA_PIDL(name, p, options=options, output_dir=output_dir, generate_tables=generate_tables)
+
+ # Some IDL files don't exactly match between name and
+ # "interface" so we need a way to skip those, while other IDL
+ # files have the table generation skipped entirely, on which
+ # the fuzzers rely
+ if generate_tables and generate_fuzzers:
+ interface = p[0:-4] # strip off the .idl suffix
+ bld.SAMBA_NDR_FUZZ(interface, auto_deps=True)
Build.BuildContext.SAMBA_PIDL_LIST = SAMBA_PIDL_LIST
diff --git a/buildtools/wafsamba/samba_python.py b/buildtools/wafsamba/samba_python.py
index cb726cf0bcc..0b96a81ff41 100644
--- a/buildtools/wafsamba/samba_python.py
+++ b/buildtools/wafsamba/samba_python.py
@@ -104,6 +104,10 @@ def SAMBA_PYTHON(bld, name,
if not bld.PYTHON_BUILD_IS_ENABLED():
enabled = False
+ # Save time, no need to build python bindings when fuzzing
+ if bld.env.enable_fuzzing:
+ enabled = False
+
# when we support static python modules we'll need to gather
# the list from all the SAMBA_PYTHON() targets
if init_function_sentinel is not None:
diff --git a/buildtools/wafsamba/wafsamba.py b/buildtools/wafsamba/wafsamba.py
index 5bbcc156fe7..7827d374654 100644
--- a/buildtools/wafsamba/wafsamba.py
+++ b/buildtools/wafsamba/wafsamba.py
@@ -375,7 +375,7 @@ def SAMBA_BINARY(bld, binname, source,
# Fuzzing builds do not build normal binaries
# however we must build asn1compile etc
- if not use_hostcc and bld.env.enable_libfuzzer != fuzzer:
+ if not use_hostcc and bld.env.enable_fuzzing != fuzzer:
SET_TARGET_TYPE(bld, binname, 'DISABLED')
return
diff --git a/buildtools/wafsamba/wscript b/buildtools/wafsamba/wscript
index b9f2f495617..f0b679257b7 100644
--- a/buildtools/wafsamba/wscript
+++ b/buildtools/wafsamba/wscript
@@ -133,8 +133,11 @@ def options(opt):
dest='undefined_sanitizer',
default=False)
gr.add_option('--enable-libfuzzer',
- help=("Build fuzzing binaries (use ADDITIONAL_CFLAGS to specify compiler options for libFuzzer or use a compiler wrapper such as honggfuzz/hfuzz-cc)"),
+ help=("Build fuzzing binaries (use ADDITIONAL_CFLAGS to specify compiler options for libFuzzer or use CC=honggfuzz/hfuzz-cc)"),
action="store_true", dest='enable_libfuzzer', default=False)
+ gr.add_option('--enable-afl-fuzzer',
+ help=("Build fuzzing binaries AFL-style (typically use with CC=afl-gcc)"),
+ action="store_true", dest='enable_afl_fuzzer', default=False)
# Fuzz targets may need additional LDFLAGS that we can't use on
# internal binaries like asn1_compile
@@ -603,9 +606,13 @@ struct foo bar = { .y = 'X', .x = 1 };
eprintf("bla", "bar")
''', define='HAVE__VA_ARGS__MACRO')
+ conf.env.enable_fuzzing = False
+
conf.env.enable_libfuzzer = Options.options.enable_libfuzzer
- if conf.env.enable_libfuzzer:
- conf.DEFINE('ENABLE_LIBFUZZER', 1)
+ conf.env.enable_afl_fuzzer = Options.options.enable_afl_fuzzer
+ if conf.env.enable_libfuzzer or conf.env.enable_afl_fuzzer:
+ conf.env.enable_fuzzing = True
+ conf.DEFINE('FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION', 1)
conf.env.FUZZ_TARGET_LDFLAGS = Options.options.FUZZ_TARGET_LDFLAGS
conf.load('clang_compilation_database')
diff --git a/lib/fuzzing/README.md b/lib/fuzzing/README.md
index 97b49ed0fb1..5a248241248 100644
--- a/lib/fuzzing/README.md
+++ b/lib/fuzzing/README.md
@@ -7,6 +7,7 @@ exceptions such as crashes, assertions or memory corruption.
See [Wikipedia article on fuzzing](https://en.wikipedia.org/wiki/Fuzzing) for
more information.
+# Hongfuzz
## Configure with fuzzing
@@ -15,7 +16,7 @@ Example command line to build binaries for use with
```sh
buildtools/bin/waf -C --without-gettext --enable-debug --enable-developer \
- --address-sanitizer --enable-libfuzzer \
+ --address-sanitizer --enable-libfuzzer --abi-check-disable \
--
Samba Shared Repository
More information about the samba-cvs
mailing list