tpm2-software / tpm2-tss

OSS implementation of the TCG TPM2 Software Stack (TSS2)
https://tpm2-software.github.io
BSD 2-Clause "Simplified" License
749 stars 365 forks source link

tests: fuzzing: OSS-Fuzz build error #1419

Closed johnandersen777 closed 5 years ago

johnandersen777 commented 5 years ago
Step #1: Step 13/15 : RUN git clone --depth 1   https://github.com/tpm2-software/tpm2-tss $SRC/tpm2-tss/
Step #1:  ---> Running in ffc384e17846
Step #1: Cloning into '/src/tpm2-tss'...
Step #1: Removing intermediate container ffc384e17846
Step #1:  ---> 80a167a9a1e4
Step #1: Step 14/15 : WORKDIR $SRC/tpm2-tss/
Step #1:  ---> Running in 8eecfa3b4a95
Step #1: Removing intermediate container 8eecfa3b4a95
Step #1:  ---> ad39a11a12fe
Step #1: Step 15/15 : COPY build.sh $SRC/
Step #1:  ---> 39feb1ec2397
Step #1: Successfully built 39feb1ec2397
Step #1: Successfully tagged gcr.io/oss-fuzz/tpm2-tss:latest
Finished Step #1
Starting Step #2
Step #2: Already have image: gcr.io/oss-fuzz/tpm2-tss
Step #2: ++ tempfile
Step #2: + SRCMAP=/tmp/file5dLQ1o
Step #2: + echo '{}'
Step #2: ++ find /src -name .git -type d
Step #2: + for DOT_GIT_DIR in '$(find $SRC -name ".git" -type d)'
Step #2: ++ dirname /src/tpm2-tss/.git
Step #2: + GIT_DIR=/src/tpm2-tss
Step #2: + cd /src/tpm2-tss
Step #2: ++ git config --get remote.origin.url
Step #2: + GIT_URL=https://github.com/tpm2-software/tpm2-tss
Step #2: ++ git rev-parse HEAD
Step #2: + GIT_REV=010ec6016dd3957d35951cb2a8ebf95658812b13
Step #2: + jq_inplace /tmp/file5dLQ1o '."/src/tpm2-tss" = { type: "git", url: "https://github.com/tpm2-software/tpm2-tss", rev: "010ec6016dd3957d35951cb2a8ebf95658812b13" }'
Step #2: ++ tempfile
Step #2: + F=/tmp/fileXzTuDr
Step #2: + cat /tmp/file5dLQ1o
Step #2: + jq '."/src/tpm2-tss" = { type: "git", url: "https://github.com/tpm2-software/tpm2-tss", rev: "010ec6016dd3957d35951cb2a8ebf95658812b13" }'
Step #2: + mv /tmp/fileXzTuDr /tmp/file5dLQ1o
Step #2: ++ find /src -name .svn -type d
Step #2: + for DOT_SVN_DIR in '$(find $SRC -name ".svn" -type d)'
Step #2: ++ dirname /src/libfuzzer/.svn
Step #2: + SVN_DIR=/src/libfuzzer
Step #2: + cd /src/libfuzzer
Step #2: ++ svn info
Step #2: ++ grep '^URL:'
Step #2: ++ sed 's/URL: //g'
Step #2: + SVN_URL=https://llvm.org/svn/llvm-project/compiler-rt/trunk/lib/fuzzer
Step #2: ++ svn info -r HEAD
Step #2: ++ grep '^Revision:'
Step #2: ++ sed 's/Revision: //g'
Step #2: + SVN_REV=361111
Step #2: + jq_inplace /tmp/file5dLQ1o '."/src/libfuzzer" = { type: "svn", url: "https://llvm.org/svn/llvm-project/compiler-rt/trunk/lib/fuzzer", rev: "361111" }'
Step #2: ++ tempfile
Step #2: + F=/tmp/file4mXQGJ
Step #2: + cat /tmp/file5dLQ1o
Step #2: + jq '."/src/libfuzzer" = { type: "svn", url: "https://llvm.org/svn/llvm-project/compiler-rt/trunk/lib/fuzzer", rev: "361111" }'
Step #2: + mv /tmp/file4mXQGJ /tmp/file5dLQ1o
Step #2: ++ find /src -name .hg -type d
Step #2: + '[' '' '!=' '' ']'
Step #2: + cat /tmp/file5dLQ1o
Step #2: + rm /tmp/file5dLQ1o
Step #2: {
Step #2:   "/src/tpm2-tss": {
Step #2:     "type": "git",
Step #2:     "url": "https://github.com/tpm2-software/tpm2-tss",
Step #2:     "rev": "010ec6016dd3957d35951cb2a8ebf95658812b13"
Step #2:   },
Step #2:   "/src/libfuzzer": {
Step #2:     "type": "svn",
Step #2:     "url": "https://llvm.org/svn/llvm-project/compiler-rt/trunk/lib/fuzzer",
Step #2:     "rev": "361111"
Step #2:   }
Step #2: }
Finished Step #2
Starting Step #3
Step #3: Pulling image: gcr.io/oss-fuzz-base/msan-builder
Step #3: Using default tag: latest
Step #3: latest: Pulling from oss-fuzz-base/msan-builder
Step #3: 9ff7e2e5f967: Already exists
Step #3: 59856638ac9f: Already exists
Step #3: 6f317d6d954b: Already exists
Step #3: a9dde5e2a643: Already exists
Step #3: 71da8bdf969a: Pulling fs layer
Step #3: 91d98dfc886d: Pulling fs layer
Step #3: 6d7e9db3bfce: Pulling fs layer
Step #3: 5982cb1af4e4: Pulling fs layer
Step #3: dbacadefd838: Pulling fs layer
Step #3: 7d1c8c2a3680: Pulling fs layer
Step #3: cbeee14d053a: Pulling fs layer
Step #3: da127b46bb8c: Pulling fs layer
Step #3: 0ec0b4292550: Pulling fs layer
Step #3: 1f49baece0a3: Pulling fs layer
Step #3: ea0909107c32: Pulling fs layer
Step #3: 7e79b5032b73: Pulling fs layer
Step #3: cbeee14d053a: Waiting
Step #3: da127b46bb8c: Waiting
Step #3: 0ec0b4292550: Waiting
Step #3: 1f49baece0a3: Waiting
Step #3: ea0909107c32: Waiting
Step #3: 7e79b5032b73: Waiting
Step #3: 5982cb1af4e4: Waiting
Step #3: 7d1c8c2a3680: Waiting
Step #3: dbacadefd838: Waiting
Step #3: 91d98dfc886d: Verifying Checksum
Step #3: 91d98dfc886d: Download complete
Step #3: 6d7e9db3bfce: Download complete
Step #3: dbacadefd838: Verifying Checksum
Step #3: dbacadefd838: Download complete
Step #3: 7d1c8c2a3680: Verifying Checksum
Step #3: 7d1c8c2a3680: Download complete
Step #3: 71da8bdf969a: Verifying Checksum
Step #3: 71da8bdf969a: Download complete
Step #3: da127b46bb8c: Verifying Checksum
Step #3: da127b46bb8c: Download complete
Step #3: 0ec0b4292550: Verifying Checksum
Step #3: 0ec0b4292550: Download complete
Step #3: 1f49baece0a3: Verifying Checksum
Step #3: 1f49baece0a3: Download complete
Step #3: cbeee14d053a: Verifying Checksum
Step #3: cbeee14d053a: Download complete
Step #3: ea0909107c32: Verifying Checksum
Step #3: ea0909107c32: Download complete
Step #3: 71da8bdf969a: Pull complete
Step #3: 91d98dfc886d: Pull complete
Step #3: 6d7e9db3bfce: Pull complete
Step #3: 5982cb1af4e4: Verifying Checksum
Step #3: 5982cb1af4e4: Download complete
Step #3: 7e79b5032b73: Verifying Checksum
Step #3: 7e79b5032b73: Download complete
Step #3: 5982cb1af4e4: Pull complete
Step #3: dbacadefd838: Pull complete
Step #3: 7d1c8c2a3680: Pull complete
Step #3: cbeee14d053a: Pull complete
Step #3: da127b46bb8c: Pull complete
Step #3: 0ec0b4292550: Pull complete
Step #3: 1f49baece0a3: Pull complete
Step #3: ea0909107c32: Pull complete
Step #3: 7e79b5032b73: Pull complete
Step #3: Digest: sha256:785cccab9c2ec79960c5e39c46ee7612945bc2c385ffdb87b987025193758dd3
Step #3: Status: Downloaded newer image for gcr.io/oss-fuzz-base/msan-builder:latest
Finished Step #3
Starting Step #4
Step #4: Already have image: gcr.io/oss-fuzz/tpm2-tss
Step #4: ---------------------------------------------------------------
Step #4: ar: creating /usr/lib/libFuzzingEngine.a
Step #4: Compiling libFuzzer to /usr/lib/libFuzzingEngine.a...  done.
Step #4: CC=clang
Step #4: CXX=clang++
Step #4: CFLAGS=-O1 -fno-omit-frame-pointer -gline-tables-only -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -fsanitize=address -fsanitize-address-use-after-scope -fsanitize=fuzzer-no-link
Step #4: CXXFLAGS=-O1 -fno-omit-frame-pointer -gline-tables-only -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -fsanitize=address -fsanitize-address-use-after-scope -fsanitize=fuzzer-no-link -stdlib=libc++
Step #4: ---------------------------------------------------------------
Step #4: + cd /src/tpm2-tss/
Step #4: + export LD_LIBRARY_PATH=/usr/local/bin
Step #4: + LD_LIBRARY_PATH=/usr/local/bin
Step #4: + export GEN_FUZZ=1
Step #4: + GEN_FUZZ=1
Step #4: + ./bootstrap
Step #4: Generating file lists: src_vars.mk
Step #4: Generating fuzz tests
Step #4: aclocal: installing 'm4/ax_ac_append_to_file.m4' from '/usr/share/aclocal/ax_ac_append_to_file.m4'
Step #4: aclocal: installing 'm4/ax_ac_print_to_file.m4' from '/usr/share/aclocal/ax_ac_print_to_file.m4'
Step #4: aclocal: installing 'm4/ax_add_am_macro_static.m4' from '/usr/share/aclocal/ax_add_am_macro_static.m4'
Step #4: aclocal: installing 'm4/ax_am_macros_static.m4' from '/usr/share/aclocal/ax_am_macros_static.m4'
Step #4: aclocal: installing 'm4/ax_check_compile_flag.m4' from '/usr/share/aclocal/ax_check_compile_flag.m4'
Step #4: aclocal: installing 'm4/ax_check_enable_debug.m4' from '/usr/share/aclocal/ax_check_enable_debug.m4'
Step #4: aclocal: installing 'm4/ax_check_link_flag.m4' from '/usr/share/aclocal/ax_check_link_flag.m4'
Step #4: aclocal: installing 'm4/ax_check_preproc_flag.m4' from '/usr/share/aclocal/ax_check_preproc_flag.m4'
Step #4: aclocal: installing 'm4/ax_code_coverage.m4' from '/usr/share/aclocal/ax_code_coverage.m4'
Step #4: aclocal: installing 'm4/ax_file_escapes.m4' from '/usr/share/aclocal/ax_file_escapes.m4'
Step #4: aclocal: installing 'm4/ax_is_release.m4' from '/usr/share/aclocal/ax_is_release.m4'
Step #4: aclocal: installing 'm4/ax_normalize_path.m4' from '/usr/share/aclocal/ax_normalize_path.m4'
Step #4: aclocal: installing 'm4/ax_prog_doxygen.m4' from '/usr/share/aclocal/ax_prog_doxygen.m4'
Step #4: aclocal: installing 'm4/ax_valgrind_check.m4' from '/usr/share/aclocal/ax_valgrind_check.m4'
Step #4: aclocal: installing 'm4/libtool.m4' from '/usr/share/aclocal/libtool.m4'
Step #4: aclocal: installing 'm4/ltoptions.m4' from '/usr/share/aclocal/ltoptions.m4'
Step #4: aclocal: installing 'm4/ltsugar.m4' from '/usr/share/aclocal/ltsugar.m4'
Step #4: aclocal: installing 'm4/ltversion.m4' from '/usr/share/aclocal/ltversion.m4'
Step #4: aclocal: installing 'm4/lt~obsolete.m4' from '/usr/share/aclocal/lt~obsolete.m4'
Step #4: aclocal: installing 'm4/pkg.m4' from '/usr/share/aclocal/pkg.m4'
Step #4: libtoolize: putting auxiliary files in '.'.
Step #4: libtoolize: linking file './ltmain.sh'
Step #4: configure.ac:29: installing './compile'
Step #4: configure.ac:23: installing './config.guess'
Step #4: configure.ac:23: installing './config.sub'
Step #4: configure.ac:12: installing './install-sh'
Step #4: configure.ac:12: installing './missing'
Step #4: Makefile.am: installing './depcomp'
Step #4: parallel-tests: installing './test-driver'
Step #4: + ./configure CC=clang CXX=clang++ --enable-debug --with-fuzzing=ossfuzz --enable-tcti-fuzzing --enable-tcti-device=no --enable-tcti-mssim=no --disable-doxygen-doc --disable-shared
Step #4: checking for a BSD-compatible install... /usr/bin/install -c
Step #4: checking whether build environment is sane... yes
Step #4: checking for a thread-safe mkdir -p... /bin/mkdir -p
Step #4: checking for gawk... no
Step #4: checking for mawk... mawk
Step #4: checking whether make sets $(MAKE)... yes
Step #4: checking whether make supports nested variables... yes
Step #4: checking whether make supports nested variables... (cached) yes
Step #4: checking build system type... x86_64-pc-linux-gnu
Step #4: checking host system type... x86_64-pc-linux-gnu
Step #4: configure: error: Invalid policy. Valid policies: git-directory, minor-version.
Finished Step #4
ERROR
ERROR: build step 4 "gcr.io/oss-fuzz/tpm2-tss" failed: exit status 1

Making this issue here so I remind myself to fix this.

Related: https://github.com/google/oss-fuzz/tree/master/projects/tpm2-tss

diabonas commented 5 years ago

Your Dockerfile needs an update of Autoconf Archive to at least version 2017.03.21 due to https://github.com/tpm2-software/tpm2-tss/pull/141, see e.g. the tpm2-software-container Dockerfile.

The tpm2-tss Dockerfile should be updated as well or be replaced by the organisation-wide one.