angr / phuzzer

The new phuzzing framework!
BSD 2-Clause "Simplified" License
154 stars 24 forks source link

Docker crashes on unicorn install #12

Closed aug2uag closed 2 years ago

aug2uag commented 3 years ago

I'm building on OSX 10.15.7 (19H15) and Docker daemon crashes on the next to final step in Dockerfile:

root@208321af4963:/# cd /phuzzers/
root@208321af4963:/phuzzers# ls
AFLplusplus  ijon
root@208321af4963:/phuzzers# cd AFLplusplus/
root@208321af4963:/phuzzers/AFLplusplus# ls
Android.bp              LICENSE             afl-c++         afl-clang-fast++      afl-compiler-rt.o  afl-plot           config.h          libAFLDriver.a      test-instr.c
CONTRIBUTING.md         Makefile            afl-c++.8       afl-clang-fast++.8    afl-fuzz           afl-showmap        custom_mutators   libAFLQemuDriver.a  testcases
Changelog.md            QuickStartGuide.md  afl-cc          afl-clang-fast.8      afl-g++            afl-system-config  dictionaries      libdislocator.so    types.h
Dockerfile              README.md           afl-cc.8        afl-cmin              afl-gcc            afl-tmin           docs              libtokencap.so      unicorn_mode
GNUmakefile             TODO.md             afl-clang       afl-cmin.bash         afl-gotcpu         afl-whatsup        dynamic_list.txt  qemu_mode           utils
GNUmakefile.gcc_plugin  afl-analyze         afl-clang++     afl-compiler-rt-32.o  afl-llvm-rt-32.o   afl-wine-trace     include           src
GNUmakefile.llvm        afl-as              afl-clang-fast  afl-compiler-rt-64.o  afl-llvm-rt-64.o   as                 instrumentation   test
root@208321af4963:/phuzzers/AFLplusplus# cd unicorn_mode && unset CFLAGS && sh ./build_unicorn_support.sh^C
root@208321af4963:/phuzzers/AFLplusplus# cd unicorn_mode/
root@208321af4963:/phuzzers/AFLplusplus/unicorn_mode# unset CFLAGS && sh ./build_unicorn_support.sh 
=================================================
UnicornAFL build script
=================================================

[*] Performing basic sanity checks...
[+] All checks passed!
[*] Making sure unicornafl is checked out
[*] initializing unicornafl submodule
Synchronizing submodule url for 'unicornafl'
[+] Got unicornafl.
[*] Checking out fb2fc9f2
M   config.h
HEAD is now at fb2fc9f2 try fix for CFLAGS in samples
[*] making sure afl++ header files match
[*] Configuring Unicorn build...
[+] Configuration complete.
[*] Attempting to build unicornafl (fingers crossed!)...
make -C qemu distclean
make[1]: Entering directory '/phuzzers/AFLplusplus/unicorn_mode/unicornafl/qemu'
rm -f *.timestamp
find . \( -name '*.l[oa]' -o -name '*.so' -o -name '*.dll' -o -name '*.mo' -o -name '*.[oda]' \) -type f -exec rm {} +
rm -f TAGS *~ */*~
rm -f config-host.h config-host.h-timestamp
for d in x86_64-softmmu  arm-softmmu  armeb-softmmu  m68k-softmmu  aarch64-softmmu  aarch64eb-softmmu  mips-softmmu  mipsel-softmmu  mips64-softmmu  mips64el-softmmu  ppc-softmmu  sparc-softmmu sparc64-softmmu ; do \
if test -d $d; then make -C $d clean || exit 1; fi; \
        done
make[2]: Entering directory '/phuzzers/AFLplusplus/unicorn_mode/unicornafl/qemu/x86_64-softmmu'
rm -f *.timestamp
rm -f *.a *~ qemu-system-x86_64
rm -f 
make[2]: Leaving directory '/phuzzers/AFLplusplus/unicorn_mode/unicornafl/qemu/x86_64-softmmu'
make[2]: Entering directory '/phuzzers/AFLplusplus/unicorn_mode/unicornafl/qemu/arm-softmmu'
rm -f *.timestamp
rm -f *.a *~ qemu-system-arm
rm -f 
make[2]: Leaving directory '/phuzzers/AFLplusplus/unicorn_mode/unicornafl/qemu/arm-softmmu'
make[2]: Entering directory '/phuzzers/AFLplusplus/unicorn_mode/unicornafl/qemu/armeb-softmmu'
rm -f *.timestamp
rm -f *.a *~ qemu-system-armeb
rm -f 
make[2]: Leaving directory '/phuzzers/AFLplusplus/unicorn_mode/unicornafl/qemu/armeb-softmmu'
make[2]: Entering directory '/phuzzers/AFLplusplus/unicorn_mode/unicornafl/qemu/m68k-softmmu'
rm -f *.timestamp
rm -f *.a *~ qemu-system-m68k
rm -f 
make[2]: Leaving directory '/phuzzers/AFLplusplus/unicorn_mode/unicornafl/qemu/m68k-softmmu'
make[2]: Entering directory '/phuzzers/AFLplusplus/unicorn_mode/unicornafl/qemu/aarch64-softmmu'
rm -f *.timestamp
rm -f *.a *~ qemu-system-aarch64
rm -f 
make[2]: Leaving directory '/phuzzers/AFLplusplus/unicorn_mode/unicornafl/qemu/aarch64-softmmu'
make[2]: Entering directory '/phuzzers/AFLplusplus/unicorn_mode/unicornafl/qemu/aarch64eb-softmmu'
rm -f *.timestamp
rm -f *.a *~ qemu-system-aarch64eb
rm -f 
make[2]: Leaving directory '/phuzzers/AFLplusplus/unicorn_mode/unicornafl/qemu/aarch64eb-softmmu'
make[2]: Entering directory '/phuzzers/AFLplusplus/unicorn_mode/unicornafl/qemu/mips-softmmu'
rm -f *.timestamp
rm -f *.a *~ qemu-system-mips
rm -f 
make[2]: Leaving directory '/phuzzers/AFLplusplus/unicorn_mode/unicornafl/qemu/mips-softmmu'
make[2]: Entering directory '/phuzzers/AFLplusplus/unicorn_mode/unicornafl/qemu/mipsel-softmmu'
rm -f *.timestamp
rm -f *.a *~ qemu-system-mipsel
rm -f 
make[2]: Leaving directory '/phuzzers/AFLplusplus/unicorn_mode/unicornafl/qemu/mipsel-softmmu'
make[2]: Entering directory '/phuzzers/AFLplusplus/unicorn_mode/unicornafl/qemu/mips64-softmmu'
rm -f *.timestamp
rm -f *.a *~ qemu-system-mips64
rm -f 
make[2]: Leaving directory '/phuzzers/AFLplusplus/unicorn_mode/unicornafl/qemu/mips64-softmmu'
make[2]: Entering directory '/phuzzers/AFLplusplus/unicorn_mode/unicornafl/qemu/mips64el-softmmu'
rm -f *.timestamp
rm -f *.a *~ qemu-system-mips64el
rm -f 
make[2]: Leaving directory '/phuzzers/AFLplusplus/unicorn_mode/unicornafl/qemu/mips64el-softmmu'
make[2]: Entering directory '/phuzzers/AFLplusplus/unicorn_mode/unicornafl/qemu/ppc-softmmu'
rm -f *.timestamp
rm -f *.a *~ qemu-system-ppc
rm -f 
make[2]: Leaving directory '/phuzzers/AFLplusplus/unicorn_mode/unicornafl/qemu/ppc-softmmu'
make[2]: Entering directory '/phuzzers/AFLplusplus/unicorn_mode/unicornafl/qemu/sparc-softmmu'
rm -f *.timestamp
rm -f *.a *~ qemu-system-sparc
rm -f 
make[2]: Leaving directory '/phuzzers/AFLplusplus/unicorn_mode/unicornafl/qemu/sparc-softmmu'
make[2]: Entering directory '/phuzzers/AFLplusplus/unicorn_mode/unicornafl/qemu/sparc64-softmmu'
rm -f *.timestamp
rm -f *.a *~ qemu-system-sparc64
rm -f 
make[2]: Leaving directory '/phuzzers/AFLplusplus/unicorn_mode/unicornafl/qemu/sparc64-softmmu'
rm -f config-host.mak config-host.h*
rm -f config.log config.status
for d in x86_64-softmmu  arm-softmmu  armeb-softmmu  m68k-softmmu  aarch64-softmmu  aarch64eb-softmmu  mips-softmmu  mipsel-softmmu  mips64-softmmu  mips64el-softmmu  ppc-softmmu  sparc-softmmu sparc64-softmmu ; do \
rm -rf $d || exit 1 ; \
        done
make[1]: Leaving directory '/phuzzers/AFLplusplus/unicorn_mode/unicornafl/qemu'
rm -rf *.d *.o
rm -rf libunicornafl* unicornafl*.lib unicornafl*.dll unicornafl*.a unicornafl*.def unicornafl*.exp cygunicornafl*.dll
make -C samples clean
make[1]: Entering directory '/phuzzers/AFLplusplus/unicorn_mode/unicornafl/samples'
rm -rf *.o sample_arm sample_armeb sample_arm64 sample_arm64eb sample_mips sample_ppc sample_sparc sample_x86 shellcode mem_apis sample_x86_32_gdt_and_seg_regs sample_batch_reg sample_m68k
make[1]: Leaving directory '/phuzzers/AFLplusplus/unicorn_mode/unicornafl/samples'
make -C tests/unit clean
make[1]: Entering directory '/phuzzers/AFLplusplus/unicorn_mode/unicornafl/tests/unit'
rm -rf test_hang test_gdt_idt_x86 test_tb_x86 test_hookcounts test_multihook test_x86_rip_bug test_mem_high test_x86_shl_enter_leave test_mem_map_ptr test_pc_change test_x86 test_sanity test_mem_map test_x86_soft_paging x86_soft_paging_low.bin tb_x86.bin gdt_idx.bin pc_change.bin high_address.bin
make[1]: Leaving directory '/phuzzers/AFLplusplus/unicorn_mode/unicornafl/tests/unit'
cd qemu && \
./configure --cc="cc" --extra-cflags="-DUNICORN_HAS_X86 -DUNICORN_HAS_ARM -DUNICORN_HAS_ARMEB -DUNICORN_HAS_M68K -DUNICORN_HAS_ARM64 -DUNICORN_HAS_ARM64EB -DUNICORN_HAS_MIPS -DUNICORN_HAS_MIPSEL -DUNICORN_HAS_MIPS64 -DUNICORN_HAS_MIPS64EL -DUNICORN_HAS_PPC -DUNICORN_HAS_SPARC -fPIC -DUNICORN_AFL -fvisibility=hidden" --target-list="x86_64-softmmu, arm-softmmu, armeb-softmmu, m68k-softmmu, aarch64-softmmu, aarch64eb-softmmu, mips-softmmu, mipsel-softmmu, mips64-softmmu, mips64el-softmmu, ppc-softmmu, sparc-softmmu,sparc64-softmmu," --disable-debug-info
Source path       /phuzzers/AFLplusplus/unicorn_mode/unicornafl/qemu
C compiler        cc
Host C compiler   cc
Objective-C compiler clang
ARFLAGS           rv
CFLAGS            -O3 
QEMU_CFLAGS       -fPIE -DPIE -m64 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -DUNICORN_HAS_X86 -DUNICORN_HAS_ARM -DUNICORN_HAS_ARMEB -DUNICORN_HAS_M68K -DUNICORN_HAS_ARM64 -DUNICORN_HAS_ARM64EB -DUNICORN_HAS_MIPS -DUNICORN_HAS_MIPSEL -DUNICORN_HAS_MIPS64 -DUNICORN_HAS_MIPS64EL -DUNICORN_HAS_PPC -DUNICORN_HAS_SPARC -fPIC -DUNICORN_AFL -fvisibility=hidden  -Wendif-labels -Wmissing-include-dirs -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-declaration -Wold-style-definition -Wtype-limits -fstack-protector-strong
LDFLAGS           -Wl,--warn-common -Wl,-z,relro -Wl,-z,now -pie -m64 -O3 
make              make
host CPU          x86_64
host big endian   no
target list       x86_64-softmmu  arm-softmmu  armeb-softmmu  m68k-softmmu  aarch64-softmmu  aarch64eb-softmmu  mips-softmmu  mipsel-softmmu  mips64-softmmu  mips64el-softmmu  ppc-softmmu  sparc-softmmu sparc64-softmmu 
tcg debug enabled no
strip binaries    yes
static build      no
mingw32 support   no
PIE               yes
make -C qemu -j
make[1]: Entering directory '/phuzzers/AFLplusplus/unicorn_mode/unicornafl/qemu'
  GEN   config-host.h
  CC    qemu-timer.o
  CC    ../uc.o
  CC    ../list.o
  CC    tcg-runtime.o
  CC    util/qemu-timer-common.o
  CC    qemu-log.o
  CC    qom/cpu.o
  CC    util/cutils.o
  CC    glib_compat.o
  CC    util/qemu-thread-posix.o
  CC    vl.o
  CC    util/bitmap.o
  CC    ../afl.o
  CC    util/oslib-posix.o
  CC    util/bitops.o
  CC    util/aes.o
  CC    util/crc32c.o
  CC    util/host-utils.o
  CC    util/getauxval.o
  GEN   mips-softmmu/config-target.h
  GEN   x86_64-softmmu/config-target.h
  GEN   aarch64eb-softmmu/config-target.h
  GEN   armeb-softmmu/config-target.h
  GEN   aarch64-softmmu/config-target.h
  GEN   ppc-softmmu/config-target.h
  GEN   sparc64-softmmu/config-target.h
  GEN   mipsel-softmmu/config-target.h
  GEN   sparc-softmmu/config-target.h
  GEN   m68k-softmmu/config-target.h
  GEN   arm-softmmu/config-target.h
  GEN   mips64-softmmu/config-target.h
  GEN   mips64el-softmmu/config-target.h
  CC    aarch64eb-softmmu/exec.o
  CC    mips-softmmu/cpus.o
  CC    mips-softmmu/ioport.o
  CC    aarch64eb-softmmu/translate-all.o
  CC    aarch64eb-softmmu/cpu-exec.o
  CC    aarch64eb-softmmu/tcg/optimize.o
  CC    aarch64eb-softmmu/tcg/tcg.o
  CC    mips-softmmu/fpu/softfloat.o
  CC    aarch64eb-softmmu/fpu/softfloat.o
  CC    aarch64eb-softmmu/cpus.o
  CC    mips-softmmu/memory.o
  CC    mips-softmmu/exec.o
  CC    aarch64eb-softmmu/target-arm/translate.o
  CC    mips-softmmu/memory_mapping.o
  CC    aarch64eb-softmmu/cputlb.o
  CC    aarch64eb-softmmu/memory_mapping.o
  CC    mips-softmmu/hw/mips/cputimer.o
  CC    mips-softmmu/tcg/optimize.o
  CC    mips-softmmu/translate-all.o
  CC    mips-softmmu/cpu-exec.o
  CC    mips-softmmu/tcg/tcg.o
  CC    mips-softmmu/cputlb.o
  CC    mips-softmmu/target-mips/translate.o
  CC    aarch64eb-softmmu/ioport.o
  CC    aarch64eb-softmmu/memory.o
  CC    aarch64eb-softmmu/target-arm/op_helper.o
  CC    armeb-softmmu/cpu-exec.o
  CC    mips-softmmu/target-mips/lmi_helper.o
  CC    mips-softmmu/target-mips/op_helper.o
  CC    mips-softmmu/target-mips/helper.o
  CC    aarch64eb-softmmu/target-arm/cpu.o
  CC    m68k-softmmu/translate-all.o
  CC    m68k-softmmu/fpu/softfloat.o
  CC    ppc-softmmu/ioport.o
  CC    mips-softmmu/target-mips/dsp_helper.o
  CC    ppc-softmmu/hw/ppc/ppc.o
  CC    armeb-softmmu/translate-all.o
  CC    armeb-softmmu/tcg/optimize.o
  CC    ppc-softmmu/cpus.o
  CC    m68k-softmmu/tcg/tcg.o
  CC    armeb-softmmu/exec.o
  CC    ppc-softmmu/fpu/softfloat.o
  CC    armeb-softmmu/fpu/softfloat.o
  CC    m68k-softmmu/tcg/optimize.o
  CC    ppc-softmmu/translate-all.o
  CC    ppc-softmmu/exec.o
  CC    aarch64eb-softmmu/target-arm/helper.o
  CC    x86_64-softmmu/cpu-exec.o
  CC    armeb-softmmu/tcg/tcg.o
  CC    mips-softmmu/target-mips/cpu.o
  CC    mips-softmmu/target-mips/msa_helper.o
  CC    ppc-softmmu/tcg/tcg.o
  CC    m68k-softmmu/exec.o
  CC    ppc-softmmu/memory.o
  CC    armeb-softmmu/cputlb.o
  CC    armeb-softmmu/memory_mapping.o
  CC    aarch64eb-softmmu/target-arm/iwmmxt_helper.o
  CC    aarch64eb-softmmu/target-arm/neon_helper.o
  CC    aarch64eb-softmmu/target-arm/psci.o
  CC    ppc-softmmu/cpu-exec.o
  CC    armeb-softmmu/memory.o
  CC    x86_64-softmmu/fpu/softfloat.o
  CC    x86_64-softmmu/tcg/tcg.o
  CC    armeb-softmmu/cpus.o
  CC    x86_64-softmmu/cpus.o
  CC    armeb-softmmu/ioport.o
  CC    sparc64-softmmu/cpu-exec.o
  CC    sparc64-softmmu/fpu/softfloat.o
  CC    m68k-softmmu/cpus.o
  CC    x86_64-softmmu/memory.o
  CC    sparc64-softmmu/translate-all.o
  CC    ppc-softmmu/memory_mapping.o
  CC    sparc64-softmmu/exec.o
  CC    sparc64-softmmu/cpus.o
  CC    aarch64eb-softmmu/target-arm/translate-a64.o
  CC    ppc-softmmu/tcg/optimize.o
  CC    ppc-softmmu/cputlb.o
  CC    ppc-softmmu/target-ppc/dfp_helper.o
  CC    aarch64eb-softmmu/target-arm/unicorn_aarch64.o
  CC    x86_64-softmmu/exec.o
  CC    armeb-softmmu/target-arm/cpu.o
  CC    m68k-softmmu/cpu-exec.o
  CC    armeb-softmmu/target-arm/op_helper.o
  CC    x86_64-softmmu/translate-all.o
  CC    sparc64-softmmu/tcg/optimize.o
  CC    sparc64-softmmu/ioport.o
  CC    armeb-softmmu/target-arm/helper.o
  CC    x86_64-softmmu/ioport.o
  CC    sparc64-softmmu/tcg/tcg.o
  CC    armeb-softmmu/target-arm/translate.o
  CC    ppc-softmmu/hw/ppc/ppc_booke.o
  CC    x86_64-softmmu/tcg/optimize.o
  CC    sparc64-softmmu/cputlb.o
  CC    mips-softmmu/target-mips/unicorn.o
  CC    ppc-softmmu/target-ppc/mmu_helper.o
  CC    ppc-softmmu/target-ppc/mmu-hash32.o
  CC    m68k-softmmu/ioport.o
  CC    armeb-softmmu/target-arm/neon_helper.o
  CC    sparc64-softmmu/target-sparc/cpu.o
  CC    sparc64-softmmu/target-sparc/fop_helper.o
  CC    sparc64-softmmu/memory_mapping.o
  CC    sparc64-softmmu/target-sparc/cc_helper.o
  CC    armeb-softmmu/target-arm/iwmmxt_helper.o
  CC    ppc-softmmu/target-ppc/cpu-models.o
  CC    sparc64-softmmu/target-sparc/translate.o
  CC    aarch64eb-softmmu/target-arm/cpu64.o
  CC    sparc64-softmmu/memory.o
  CC    aarch64eb-softmmu/target-arm/helper-a64.o
  CC    ppc-softmmu/target-ppc/timebase_helper.o
  CC    sparc64-softmmu/target-sparc/mmu_helper.o
  CC    x86_64-softmmu/cputlb.o
  CC    ppc-softmmu/target-ppc/int_helper.o
  CC    ppc-softmmu/target-ppc/fpu_helper.o
  CC    armeb-softmmu/target-arm/psci.o
  CC    armeb-softmmu/target-arm/unicorn_arm.o
  CC    sparc64-softmmu/target-sparc/helper.o
  CC    ppc-softmmu/target-ppc/excp_helper.o
  CC    sparc-softmmu/tcg/tcg.o
  CC    sparc64-softmmu/target-sparc/int64_helper.o
  CC    aarch64eb-softmmu/target-arm/crypto_helper.o
  CC    sparc64-softmmu/target-sparc/win_helper.o
  CC    sparc64-softmmu/target-sparc/ldst_helper.o
  CC    sparc-softmmu/cpus.o
  CC    sparc-softmmu/fpu/softfloat.o
  CC    armeb-softmmu/target-arm/crypto_helper.o
  CC    sparc-softmmu/translate-all.o
  CC    mipsel-softmmu/cputlb.o
  CC    aarch64-softmmu/cpus.o
  CC    mipsel-softmmu/fpu/softfloat.o
  CC    ppc-softmmu/target-ppc/unicorn.o
  CC    sparc64-softmmu/target-sparc/unicorn64.o
  CC    mipsel-softmmu/cpu-exec.o
  CC    mipsel-softmmu/exec.o
  CC    mipsel-softmmu/tcg/optimize.o
  CC    mipsel-softmmu/hw/mips/cputimer.o
  CC    mipsel-softmmu/ioport.o
  CC    sparc-softmmu/tcg/optimize.o
  CC    mipsel-softmmu/translate-all.o
  CC    sparc-softmmu/cpu-exec.o
  CC    mipsel-softmmu/memory_mapping.o
  CC    mipsel-softmmu/cpus.o
  CC    mipsel-softmmu/tcg/tcg.o
  CC    mipsel-softmmu/memory.o
  CC    m68k-softmmu/cputlb.o
  CC    aarch64-softmmu/translate-all.o
  CC    sparc-softmmu/ioport.o
  CC    sparc-softmmu/memory.o
  CC    sparc-softmmu/exec.o
  CC    ppc-softmmu/target-ppc/misc_helper.o
  CC    ppc-softmmu/target-ppc/mem_helper.o
  CC    sparc-softmmu/cputlb.o
  CC    aarch64-softmmu/tcg/tcg.o
  CC    ppc-softmmu/target-ppc/../libdecnumber/decNumber.o
  CC    ppc-softmmu/target-ppc/../libdecnumber/decContext.o
  CC    aarch64-softmmu/tcg/optimize.o
  CC    aarch64-softmmu/fpu/softfloat.o
  CC    m68k-softmmu/memory.o
  CC    ppc-softmmu/target-ppc/translate.o
  CC    sparc-softmmu/memory_mapping.o
  CC    sparc-softmmu/target-sparc/translate.o
  CC    ppc-softmmu/target-ppc/../libdecnumber/dpd/decimal128.o
  CC    mipsel-softmmu/target-mips/lmi_helper.o
  CC    mipsel-softmmu/target-mips/op_helper.o
  CC    mipsel-softmmu/target-mips/translate.o
  CC    aarch64-softmmu/ioport.o
  CC    aarch64-softmmu/memory.o
  CC    aarch64-softmmu/cpu-exec.o
  CC    aarch64-softmmu/exec.o
  CC    mipsel-softmmu/target-mips/dsp_helper.o
  CC    aarch64-softmmu/cputlb.o
  CC    mips64el-softmmu/translate-all.o
  CC    mips64el-softmmu/cpu-exec.o
  CC    mips64el-softmmu/ioport.o
  CC    mips64el-softmmu/cpus.o
  CC    mips64el-softmmu/exec.o
  CC    mips64el-softmmu/memory.o
  CC    mips64el-softmmu/fpu/softfloat.o
  CC    sparc64-softmmu/target-sparc/vis_helper.o
  CC    mips64el-softmmu/tcg/optimize.o
  CC    mips64el-softmmu/tcg/tcg.o
  CC    m68k-softmmu/target-m68k/translate.o
  CC    ppc-softmmu/target-ppc/../libdecnumber/dpd/decimal32.o
  CC    mipsel-softmmu/target-mips/helper.o
  CC    aarch64-softmmu/memory_mapping.o
  CC    mipsel-softmmu/target-mips/cpu.o
  CC    mips64-softmmu/cpu-exec.o
  CC    ppc-softmmu/target-ppc/../libdecnumber/dpd/decimal64.o
  CC    mips64el-softmmu/memory_mapping.o
  CC    mips64el-softmmu/cputlb.o
  CC    mips64-softmmu/cputlb.o
  CC    mips64-softmmu/memory.o
  CC    mips64-softmmu/tcg/tcg.o
  CC    mips64-softmmu/fpu/softfloat.o
  CC    mips64-softmmu/exec.o
  CC    mips64-softmmu/tcg/optimize.o
  CC    m68k-softmmu/memory_mapping.o
  CC    x86_64-softmmu/target-i386/helper.o
  CC    mips64-softmmu/translate-all.o
  CC    mips64-softmmu/ioport.o
  CC    sparc-softmmu/target-sparc/helper.o
  CC    x86_64-softmmu/target-i386/translate.o
  CC    sparc-softmmu/target-sparc/cpu.o
  CC    x86_64-softmmu/hw/i386/pc.o
  CC    aarch64-softmmu/target-arm/translate.o
  CC    aarch64-softmmu/target-arm/op_helper.o
  CC    mips64-softmmu/cpus.o
  CC    sparc-softmmu/target-sparc/fop_helper.o
  CC    mipsel-softmmu/target-mips/msa_helper.o
  CC    m68k-softmmu/target-m68k/op_helper.o
  CC    arm-softmmu/translate-all.o
  CC    sparc-softmmu/target-sparc/cc_helper.o
  CC    sparc-softmmu/target-sparc/win_helper.o
  CC    arm-softmmu/exec.o
  CC    arm-softmmu/cpu-exec.o
  CC    x86_64-softmmu/memory_mapping.o
  CC    arm-softmmu/tcg/tcg.o
  CC    aarch64-softmmu/target-arm/helper.o
  CC    aarch64-softmmu/target-arm/cpu.o
  CC    aarch64-softmmu/target-arm/neon_helper.o
  CC    mips64el-softmmu/target-mips/op_helper.o
  CC    m68k-softmmu/target-m68k/cpu.o
  CC    arm-softmmu/tcg/optimize.o
  CC    arm-softmmu/fpu/softfloat.o
  CC    mips64-softmmu/target-mips/dsp_helper.o
  CC    m68k-softmmu/target-m68k/unicorn.o
  CC    arm-softmmu/ioport.o
  CC    mips64-softmmu/memory_mapping.o
  CC    mips64-softmmu/hw/mips/cputimer.o
  CC    x86_64-softmmu/target-i386/cc_helper.o
  CC    arm-softmmu/memory.o
  CC    x86_64-softmmu/target-i386/excp_helper.o
  CC    sparc-softmmu/target-sparc/ldst_helper.o
  CC    mips64el-softmmu/target-mips/translate.o
  CC    mips64el-softmmu/hw/mips/cputimer.o
  CC    aarch64-softmmu/target-arm/translate-a64.o
  CC    mips64-softmmu/target-mips/helper.o
  CC    mips64-softmmu/target-mips/lmi_helper.o
  CC    aarch64-softmmu/target-arm/cpu64.o
  CC    mipsel-softmmu/target-mips/unicorn.o
  CC    mips64-softmmu/target-mips/op_helper.o
  CC    arm-softmmu/target-arm/helper.o
  CC    mips64el-softmmu/target-mips/lmi_helper.o
  CC    mips64-softmmu/target-mips/cpu.o
  CC    mips64el-softmmu/target-mips/dsp_helper.o
  CC    mips64-softmmu/target-mips/msa_helper.o
  CC    aarch64-softmmu/target-arm/psci.o
  CC    sparc-softmmu/target-sparc/mmu_helper.o
  CC    arm-softmmu/cputlb.o
  CC    mips64-softmmu/target-mips/translate.o
  CC    aarch64-softmmu/target-arm/iwmmxt_helper.o
  CC    x86_64-softmmu/target-i386/int_helper.o
  CC    arm-softmmu/memory_mapping.o
  CC    aarch64-softmmu/target-arm/helper-a64.o
  CC    aarch64-softmmu/target-arm/unicorn_aarch64.o
  CC    x86_64-softmmu/target-i386/smm_helper.o
  CC    x86_64-softmmu/target-i386/fpu_helper.o
  CC    m68k-softmmu/target-m68k/helper.o
  CC    x86_64-softmmu/target-i386/svm_helper.o
  CC    sparc-softmmu/target-sparc/int32_helper.o
  CC    sparc-softmmu/target-sparc/unicorn.o
  CC    aarch64-softmmu/target-arm/crypto_helper.o
  CC    arm-softmmu/target-arm/translate.o
  CC    arm-softmmu/target-arm/op_helper.o
  CC    arm-softmmu/cpus.o
  CC    x86_64-softmmu/target-i386/cpu.o
  CC    mips64el-softmmu/target-mips/helper.o
  CC    mips64-softmmu/target-mips/unicorn.o
  CC    mips64el-softmmu/target-mips/msa_helper.o
  CC    x86_64-softmmu/target-i386/mem_helper.o
  CC    arm-softmmu/target-arm/neon_helper.o
  CC    x86_64-softmmu/target-i386/seg_helper.o
  CC    x86_64-softmmu/target-i386/misc_helper.o
  CC    arm-softmmu/target-arm/iwmmxt_helper.o
  CC    mips64el-softmmu/target-mips/cpu.o
  CC    arm-softmmu/target-arm/cpu.o
  CC    mips64el-softmmu/target-mips/unicorn.o
  CC    arm-softmmu/target-arm/psci.o
  CC    arm-softmmu/target-arm/crypto_helper.o
  CC    x86_64-softmmu/target-i386/arch_memory_mapping.o
  CC    arm-softmmu/target-arm/unicorn_arm.o
  CC    x86_64-softmmu/target-i386/unicorn.o
Error response from daemon: Bad response from Docker engine
twizmwazin commented 3 years ago

The Error response from daemon: Bad response from Docker engine at the end makes me suspect this is a docker issue rather than a specific issue in our dockerfile. Are you able to reproduce this reliably? Assuming you're using docker desktop for mac, is it possible this is a resource constraint in the VM?

aug2uag commented 3 years ago

Agreed. Usually though, I'm able to build images. What concerns me is my inability to find an image to pull, would there be one on Dockerhub or elsewhere?

I tried building on VirtualBox VM but encounter the following issue (the email for support is no longer active):

~/phuzzers/ijon/llvm_mode$ LLVM_CONFIG=llvm-config-10 CC=clang-10 make
[*] Checking for working 'llvm-config'...
[*] Checking for working 'clang-10'...
[*] Checking for '../afl-showmap'...
[+] All set and ready to build.
clang-10 -O3 -funroll-loops -Wall -D_FORTIFY_SOURCE=2 -g -Wno-pointer-sign -DAFL_PATH=\"/usr/local/lib/afl\" -DBIN_PATH=\"/usr/local/bin\" -DLLVM_BINDIR=\"/usr/lib/llvm-10/bin\" -DVERSION=\"2.51b-ijon\"  afl-clang-fast.c -o ../afl-clang-fast 
ln -sf afl-clang-fast ../afl-clang-fast++
g++ `llvm-config-10 --cxxflags` -fno-rtti -fpic -O3 -funroll-loops -Wall -D_FORTIFY_SOURCE=2 -g -Wno-pointer-sign -DLLVM_BINDIR=\"/usr/lib/llvm-10/bin\" -DVERSION=\"2.51b-ijon\" -Wno-variadic-macros -shared afl-llvm-pass.so.cc -o ../afl-llvm-pass.so `llvm-config-10 --ldflags` 
cc1plus: warning: command line option ‘-Wno-pointer-sign’ is valid for C/ObjC but not for C++
clang-10 -O3 -funroll-loops -Wall -D_FORTIFY_SOURCE=2 -g -Wno-pointer-sign -DAFL_PATH=\"/usr/local/lib/afl\" -DBIN_PATH=\"/usr/local/bin\" -DLLVM_BINDIR=\"/usr/lib/llvm-10/bin\" -DVERSION=\"2.51b-ijon\"  -fPIC -c afl-llvm-rt.o.c -o ../afl-llvm-rt.o
[*] Building 32-bit variant of the runtime (-m32)... success!
[*] Building 64-bit variant of the runtime (-m64)... success!
[*] Testing the CC wrapper and instrumentation output...
unset AFL_USE_ASAN AFL_USE_MSAN AFL_INST_RATIO; AFL_QUIET=1 AFL_PATH=. AFL_CC=clang-10 ../afl-clang-fast -O3 -funroll-loops -Wall -D_FORTIFY_SOURCE=2 -g -Wno-pointer-sign -DAFL_PATH=\"/usr/local/lib/afl\" -DBIN_PATH=\"/usr/local/bin\" -DLLVM_BINDIR=\"/usr/lib/llvm-10/bin\" -DVERSION=\"2.51b-ijon\"  ../test-instr.c -o test-instr 
clang-10 -Xclang -load -Xclang ../afl-llvm-pass.so -include../llvm_mode/afl-rt.h -D_USE_IJON -Qunused-arguments -O3 -funroll-loops -Wall -D_FORTIFY_SOURCE=2 -g -Wno-pointer-sign -DAFL_PATH="/usr/local/lib/afl" -DBIN_PATH="/usr/local/bin" -DLLVM_BINDIR="/usr/lib/llvm-10/bin" -DVERSION="2.51b-ijon" ../test-instr.c -o test-instr -fno-omit-frame-pointer -rdynamic -g -O3 -funroll-loops -D__AFL_HAVE_MANUAL_CONTROL=1 -D__AFL_COMPILER=1 -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION=1 -D__AFL_LOOP(_A)=({ static volatile char *_B __attribute__((used));  _B = (char*)"##SIG_AFL_PERSISTENT##"; __attribute__((visibility("default"))) int _L(unsigned int) __asm__("__afl_persistent_loop"); _L(_A); }) -D__AFL_INIT()=do { static volatile char *_A __attribute__((used));  _A = (char*)"##SIG_AFL_DEFER_FORKSRV##"; __attribute__((visibility("default"))) void _I(void) __asm__("__afl_manual_init"); _I(); } while (0) ../afl-llvm-rt.o 
echo 0 | ../afl-showmap -m none -q -o .test-instr0 ./test-instr
echo 1 | ../afl-showmap -m none -q -o .test-instr1 ./test-instr

Oops, the instrumentation does not seem to be behaving correctly!

Please ping <lcamtuf@google.com> to troubleshoot the issue.

make: *** [Makefile:113: test_build] Error 1
aug2uag commented 3 years ago

The above wouldn't build on root (VirtualBox issues a user), the /phuzzer directory was moved to $HOME as a workaround.

aug2uag commented 3 years ago

It seems this image utilizes phuzzer: https://github.com/Pascal-0x90/phuzzer_docker

Trying to run sample:

# python3 -m phuzzer -i -c 4 /input/sample
[*] Creating fuzzer...
CRITICAL | 2021-04-07 21:51:05,815 | phuzzer.phuzzers | ###############################################################################
###############################################################################
###############################################################################
###############################################################################
############# ATTENTION: YOUR SYSTEM IS MISCONFIGURED FOR FUZZING #############
############# ATTENTION: YOUR SYSTEM IS MISCONFIGURED FOR FUZZING #############
############# ATTENTION: YOUR SYSTEM IS MISCONFIGURED FOR FUZZING #############
############# ATTENTION: YOUR SYSTEM IS MISCONFIGURED FOR FUZZING #############
############# ATTENTION: YOUR SYSTEM IS MISCONFIGURED FOR FUZZING #############
############# ATTENTION: YOUR SYSTEM IS MISCONFIGURED FOR FUZZING #############
############# ATTENTION: YOUR SYSTEM IS MISCONFIGURED FOR FUZZING #############
############# ATTENTION: YOUR SYSTEM IS MISCONFIGURED FOR FUZZING #############
############# ATTENTION: YOUR SYSTEM IS MISCONFIGURED FOR FUZZING #############
###############################################################################
###############################################################################
###############################################################################
###############################################################################
####### THE FUZZER WILL NOT RUN. AND IT IS ***YOUR FAULT***!!!!!!!!!!!!  ######
####### DIRECTLY BELOW THIS, THERE ARE CONCRETE REASONS FOR WHY THIS IS  ######
####### IF YOU COMPLAIN TO US ON GITHUB ABOUT THIS NOT WORKING, AND YOU  ######
####### DON'T RESOLVE THESE ISSUES FIRST, WE WILL NOT HELP YOU!!!!!!!!!  ######
####### PLEASE RESOLVE THE ISSUES BELOW.    THEY LITERALLY TELL YOU WHAT ######
####### YOU HAVE TO EXECUTE. DO NOT ASK FOR HELP IF YOU ARE SEEING THIS  ######
####### MESSAGE; JUST FIX THE PROBLEM WITH YOUR SYSTEM!!!!!!!!!!!!!!!!!  ######
###############################################################################
###############################################################################
###############################################################################
!!!! AFL WARNING: We probably want the fork() children to run first
++++ TO FIX THIS, LITERALLY JUST EXECUTE THIS COMMAND:
     echo 1 | sudo tee /proc/sys/kernel/sched_child_runs_first
###############################################################################
###############################################################################
###############################################################################
####### FIX THE ABOVE ISSUES BEFORE ASKING FOR HELP. THE TEXT LITERALLY  ######
####### TELLS YOU HOW TO DO IT. DO NOT ASK FOR HELP ABOUT THIS BEFORE    ######
####### FIXING THE ABOVE ISSUES. IF YOU ARE SEEING THIS MESSAGE, YOUR    ######
####### SYSTEM MISCONFIGURATION IS *******YOUR FAULT*********!!!!!!!!!!! ######
###############################################################################
###############################################################################
#######                                                                  ######
#######                                                                  ######
#######                GET YOUR SYSTEM SETUP FIXED!!!!!!!!!!             ######
#######                                                                  ######
#######                                                                  ######
###############################################################################
###############################################################################

###############################################################################
###############################################################################
###############################################################################
###############################################################################
############# ATTENTION: YOUR SYSTEM IS MISCONFIGURED FOR FUZZING #############
############# ATTENTION: YOUR SYSTEM IS MISCONFIGURED FOR FUZZING #############
############# ATTENTION: YOUR SYSTEM IS MISCONFIGURED FOR FUZZING #############
############# ATTENTION: YOUR SYSTEM IS MISCONFIGURED FOR FUZZING #############
############# ATTENTION: YOUR SYSTEM IS MISCONFIGURED FOR FUZZING #############
############# ATTENTION: YOUR SYSTEM IS MISCONFIGURED FOR FUZZING #############
############# ATTENTION: YOUR SYSTEM IS MISCONFIGURED FOR FUZZING #############
############# ATTENTION: YOUR SYSTEM IS MISCONFIGURED FOR FUZZING #############
############# ATTENTION: YOUR SYSTEM IS MISCONFIGURED FOR FUZZING #############
###############################################################################
###############################################################################
###############################################################################
###############################################################################
####### THE FUZZER WILL NOT RUN. AND IT IS ***YOUR FAULT***!!!!!!!!!!!!  ######
####### DIRECTLY BELOW THIS, THERE ARE CONCRETE REASONS FOR WHY THIS IS  ######
####### IF YOU COMPLAIN TO US ON GITHUB ABOUT THIS NOT WORKING, AND YOU  ######
####### DON'T RESOLVE THESE ISSUES FIRST, WE WILL NOT HELP YOU!!!!!!!!!  ######
####### PLEASE RESOLVE THE ISSUES BELOW.    THEY LITERALLY TELL YOU WHAT ######
####### YOU HAVE TO EXECUTE. DO NOT ASK FOR HELP IF YOU ARE SEEING THIS  ######
####### MESSAGE; JUST FIX THE PROBLEM WITH YOUR SYSTEM!!!!!!!!!!!!!!!!!  ######
###############################################################################
###############################################################################
###############################################################################
!!!! AFL WARNING: We probably want the fork() children to run first
++++ TO FIX THIS, LITERALLY JUST EXECUTE THIS COMMAND:
     echo 1 | sudo tee /proc/sys/kernel/sched_child_runs_first
###############################################################################
###############################################################################
###############################################################################
####### FIX THE ABOVE ISSUES BEFORE ASKING FOR HELP. THE TEXT LITERALLY  ######
####### TELLS YOU HOW TO DO IT. DO NOT ASK FOR HELP ABOUT THIS BEFORE    ######
####### FIXING THE ABOVE ISSUES. IF YOU ARE SEEING THIS MESSAGE, YOUR    ######
####### SYSTEM MISCONFIGURATION IS *******YOUR FAULT*********!!!!!!!!!!! ######
###############################################################################
###############################################################################
#######                                                                  ######
#######                                                                  ######
#######                GET YOUR SYSTEM SETUP FIXED!!!!!!!!!!             ######
#######                                                                  ######
#######                                                                  ######
###############################################################################
###############################################################################

###############################################################################
###############################################################################
###############################################################################
###############################################################################
############# ATTENTION: YOUR SYSTEM IS MISCONFIGURED FOR FUZZING #############
############# ATTENTION: YOUR SYSTEM IS MISCONFIGURED FOR FUZZING #############
############# ATTENTION: YOUR SYSTEM IS MISCONFIGURED FOR FUZZING #############
############# ATTENTION: YOUR SYSTEM IS MISCONFIGURED FOR FUZZING #############
############# ATTENTION: YOUR SYSTEM IS MISCONFIGURED FOR FUZZING #############
############# ATTENTION: YOUR SYSTEM IS MISCONFIGURED FOR FUZZING #############
############# ATTENTION: YOUR SYSTEM IS MISCONFIGURED FOR FUZZING #############
############# ATTENTION: YOUR SYSTEM IS MISCONFIGURED FOR FUZZING #############
############# ATTENTION: YOUR SYSTEM IS MISCONFIGURED FOR FUZZING #############
###############################################################################
###############################################################################
###############################################################################
###############################################################################
####### THE FUZZER WILL NOT RUN. AND IT IS ***YOUR FAULT***!!!!!!!!!!!!  ######
####### DIRECTLY BELOW THIS, THERE ARE CONCRETE REASONS FOR WHY THIS IS  ######
####### IF YOU COMPLAIN TO US ON GITHUB ABOUT THIS NOT WORKING, AND YOU  ######
####### DON'T RESOLVE THESE ISSUES FIRST, WE WILL NOT HELP YOU!!!!!!!!!  ######
####### PLEASE RESOLVE THE ISSUES BELOW.    THEY LITERALLY TELL YOU WHAT ######
####### YOU HAVE TO EXECUTE. DO NOT ASK FOR HELP IF YOU ARE SEEING THIS  ######
####### MESSAGE; JUST FIX THE PROBLEM WITH YOUR SYSTEM!!!!!!!!!!!!!!!!!  ######
###############################################################################
###############################################################################
###############################################################################
!!!! AFL WARNING: We probably want the fork() children to run first
++++ TO FIX THIS, LITERALLY JUST EXECUTE THIS COMMAND:
     echo 1 | sudo tee /proc/sys/kernel/sched_child_runs_first
###############################################################################
###############################################################################
###############################################################################
####### FIX THE ABOVE ISSUES BEFORE ASKING FOR HELP. THE TEXT LITERALLY  ######
####### TELLS YOU HOW TO DO IT. DO NOT ASK FOR HELP ABOUT THIS BEFORE    ######
####### FIXING THE ABOVE ISSUES. IF YOU ARE SEEING THIS MESSAGE, YOUR    ######
####### SYSTEM MISCONFIGURATION IS *******YOUR FAULT*********!!!!!!!!!!! ######
###############################################################################
###############################################################################
#######                                                                  ######
#######                                                                  ######
#######                GET YOUR SYSTEM SETUP FIXED!!!!!!!!!!             ######
#######                                                                  ######
#######                                                                  ######
###############################################################################
###############################################################################
###############################################################################
###############################################################################
###############################################################################
###############################################################################
############# ATTENTION: YOUR SYSTEM IS MISCONFIGURED FOR FUZZING #############
############# ATTENTION: YOUR SYSTEM IS MISCONFIGURED FOR FUZZING #############
############# ATTENTION: YOUR SYSTEM IS MISCONFIGURED FOR FUZZING #############
############# ATTENTION: YOUR SYSTEM IS MISCONFIGURED FOR FUZZING #############
############# ATTENTION: YOUR SYSTEM IS MISCONFIGURED FOR FUZZING #############
############# ATTENTION: YOUR SYSTEM IS MISCONFIGURED FOR FUZZING #############
############# ATTENTION: YOUR SYSTEM IS MISCONFIGURED FOR FUZZING #############
############# ATTENTION: YOUR SYSTEM IS MISCONFIGURED FOR FUZZING #############
############# ATTENTION: YOUR SYSTEM IS MISCONFIGURED FOR FUZZING #############
###############################################################################
###############################################################################
###############################################################################
###############################################################################
####### THE FUZZER WILL NOT RUN. AND IT IS ***YOUR FAULT***!!!!!!!!!!!!  ######
####### DIRECTLY BELOW THIS, THERE ARE CONCRETE REASONS FOR WHY THIS IS  ######
####### IF YOU COMPLAIN TO US ON GITHUB ABOUT THIS NOT WORKING, AND YOU  ######
####### DON'T RESOLVE THESE ISSUES FIRST, WE WILL NOT HELP YOU!!!!!!!!!  ######
####### PLEASE RESOLVE THE ISSUES BELOW.    THEY LITERALLY TELL YOU WHAT ######
####### YOU HAVE TO EXECUTE. DO NOT ASK FOR HELP IF YOU ARE SEEING THIS  ######
####### MESSAGE; JUST FIX THE PROBLEM WITH YOUR SYSTEM!!!!!!!!!!!!!!!!!  ######
###############################################################################
###############################################################################
###############################################################################
!!!! AFL WARNING: We probably want the fork() children to run first
++++ TO FIX THIS, LITERALLY JUST EXECUTE THIS COMMAND:
     echo 1 | sudo tee /proc/sys/kernel/sched_child_runs_first
###############################################################################
###############################################################################
###############################################################################
####### FIX THE ABOVE ISSUES BEFORE ASKING FOR HELP. THE TEXT LITERALLY  ######
####### TELLS YOU HOW TO DO IT. DO NOT ASK FOR HELP ABOUT THIS BEFORE    ######
####### FIXING THE ABOVE ISSUES. IF YOU ARE SEEING THIS MESSAGE, YOUR    ######
####### SYSTEM MISCONFIGURATION IS *******YOUR FAULT*********!!!!!!!!!!! ######
###############################################################################
###############################################################################
#######                                                                  ######
#######                                                                  ######
#######                GET YOUR SYSTEM SETUP FIXED!!!!!!!!!!             ######
#######                                                                  ######
#######                                                                  ######
###############################################################################
###############################################################################
Traceback (most recent call last):
  File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/usr/local/lib/python3.6/dist-packages/phuzzer/__main__.py", line 196, in <module>
    main()
  File "/usr/local/lib/python3.6/dist-packages/phuzzer/__main__.py", line 113, in main
    resume=args.resume, target_opts=args.target_opts
  File "/usr/local/lib/python3.6/dist-packages/phuzzer/phuzzers/__init__.py", line 84, in phactory
    return AFL(**kwargs)
  File "/usr/local/lib/python3.6/dist-packages/phuzzer/phuzzers/afl.py", line 52, in __init__
    super().__init__(target=target, seeds=seeds, dictionary=dictionary, create_dictionary=create_dictionary, timeout=timeout)
  File "/usr/local/lib/python3.6/dist-packages/phuzzer/phuzzers/__init__.py", line 63, in __init__
    self.check_environment()
  File "/usr/local/lib/python3.6/dist-packages/phuzzer/phuzzers/__init__.py", line 182, in check_environment
    cls._check_environment()
  File "/usr/local/lib/python3.6/dist-packages/phuzzer/phuzzers/afl.py", line 308, in _check_environment
    raise InstallError(err)
phuzzer.errors.InstallError: ###############################################################################
###############################################################################
###############################################################################
###############################################################################
############# ATTENTION: YOUR SYSTEM IS MISCONFIGURED FOR FUZZING #############
############# ATTENTION: YOUR SYSTEM IS MISCONFIGURED FOR FUZZING #############
############# ATTENTION: YOUR SYSTEM IS MISCONFIGURED FOR FUZZING #############
############# ATTENTION: YOUR SYSTEM IS MISCONFIGURED FOR FUZZING #############
############# ATTENTION: YOUR SYSTEM IS MISCONFIGURED FOR FUZZING #############
############# ATTENTION: YOUR SYSTEM IS MISCONFIGURED FOR FUZZING #############
############# ATTENTION: YOUR SYSTEM IS MISCONFIGURED FOR FUZZING #############
############# ATTENTION: YOUR SYSTEM IS MISCONFIGURED FOR FUZZING #############
############# ATTENTION: YOUR SYSTEM IS MISCONFIGURED FOR FUZZING #############
###############################################################################
###############################################################################
###############################################################################
###############################################################################
####### THE FUZZER WILL NOT RUN. AND IT IS ***YOUR FAULT***!!!!!!!!!!!!  ######
####### DIRECTLY BELOW THIS, THERE ARE CONCRETE REASONS FOR WHY THIS IS  ######
####### IF YOU COMPLAIN TO US ON GITHUB ABOUT THIS NOT WORKING, AND YOU  ######
####### DON'T RESOLVE THESE ISSUES FIRST, WE WILL NOT HELP YOU!!!!!!!!!  ######
####### PLEASE RESOLVE THE ISSUES BELOW.    THEY LITERALLY TELL YOU WHAT ######
####### YOU HAVE TO EXECUTE. DO NOT ASK FOR HELP IF YOU ARE SEEING THIS  ######
####### MESSAGE; JUST FIX THE PROBLEM WITH YOUR SYSTEM!!!!!!!!!!!!!!!!!  ######
###############################################################################
###############################################################################
###############################################################################
!!!! AFL WARNING: We probably want the fork() children to run first
++++ TO FIX THIS, LITERALLY JUST EXECUTE THIS COMMAND:
     echo 1 | sudo tee /proc/sys/kernel/sched_child_runs_first
###############################################################################
###############################################################################
###############################################################################
####### FIX THE ABOVE ISSUES BEFORE ASKING FOR HELP. THE TEXT LITERALLY  ######
####### TELLS YOU HOW TO DO IT. DO NOT ASK FOR HELP ABOUT THIS BEFORE    ######
####### FIXING THE ABOVE ISSUES. IF YOU ARE SEEING THIS MESSAGE, YOUR    ######
####### SYSTEM MISCONFIGURATION IS *******YOUR FAULT*********!!!!!!!!!!! ######
###############################################################################
###############################################################################
#######                                                                  ######
#######                                                                  ######
#######                GET YOUR SYSTEM SETUP FIXED!!!!!!!!!!             ######
#######                                                                  ######
#######                                                                  ######
###############################################################################
###############################################################################
aug2uag commented 3 years ago

Ran the suggested command yet it's still same misconfiguration result:

# echo 1 | tee /proc/sys/kernel/sched_child_runs_first
tee: /proc/sys/kernel/sched_child_runs_first: Read-only file system
1
twizmwazin commented 3 years ago

By default procfs in docker I believe is read-only, you might have success if you run the container as privileged. These commands are intended to be run outside of the docker container. I am unsure if there is an easy mechanism to get a host shell in docker for mac. Most of our testing occurs on linux hosts, but if you can identify a good way to do this on docker for mac, I think it would be a good script or documentation addition.

aug2uag commented 3 years ago

Yes! The --privileged option seems to work, is there a way to skip the iPython terminal/REPL? Also, would the process terminate over time or continue unless terminated? I'm going to be testing this on various binaries, thanks for your help!

# echo 1 | tee /proc/sys/kernel/sched_child_runs_first
1
# python3 -m phuzzer -i -c 4 /input/sample
[*] Creating fuzzer...
WARNING | 2021-04-07 23:36:15,690 | phuzzer.phuzzers | creating a dictionary of string references within target "/input/sample"
WARNING | 2021-04-07 23:36:15,858 | angr.analyses.cfg.cfg_fast | "collect_data_references" is deprecated and will be removed soon. Please use "data_references" instead
INFO    | 2021-04-07 23:36:16,382 | phuzzer.phuzzers.afl | could resume, but starting over upon request
afl_dir /usr/bin/afl-unix
afl_bin=/usr/bin/afl-unix/afl-fuzz
[*] Starting fuzzer...
WARNING | 2021-04-07 23:36:17,937 | phuzzer.phuzzers.afl | No seeds provided - using 'fuzz'
[!]
[!] Launching ipython shell. Relevant variables:
[!]
[!] fuzzer
[!]
Python 3.6.9 (default, Jul 17 2020, 12:50:27) 
Type "copyright", "credits" or "license" for more information.

IPython 5.5.0 -- An enhanced Interactive Python.
?         -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object', use 'object??' for extra details.

In [1]: fuzzer
Out[1]: <phuzzer.phuzzers.afl.AFL at 0x7f348f87a358>

In [2]: fuzzer.AFL_PLUSPLUS
Out[2]: 'AFL++'

In [5]: fuzzer.AFL
Out[5]: 'AFL'

In [6]: fuzzer.afl_bin_dir
Out[6]: '/usr/bin/afl-unix'

In [7]: fuzzer.found_crash
Out[7]: <bound method Phuzzer.found_crash of <phuzzer.phuzzers.afl.AFL object at 0x7f348f87a358>>

In [8]: fuzzer.found_crash()
Out[8]: False

In [9]: exit()

^C] 4 fuzzers running until stopped by you completed 0 at 0 execs/sec with 0 cycles finding 1 paths and 0 crashes 
[*] Aborting wait. Ctrl-C again for KeyboardInterrupt.
[*] Terminating fuzzer.
[*] 4 fuzzers running until stopped by you completed 0 at 0 execs/sec with 0 cycles finding 1 paths and 0 crashes 
github-actions[bot] commented 2 years ago

This issue has been marked as stale because it has no recent activity. Please comment or add the pinned tag to prevent this issue from being closed.

github-actions[bot] commented 2 years ago

This issue has been closed due to inactivity.