magma
magma copied to clipboard
Fail to build multiple targets in rootless docker
Hi,
I could not run multiple targets in rootless docker.
For example, if I run the following command with the captainrc
./tools/captain/run.sh ./tools/captain/captainrc
- captainrc
...
FUZZERS=(afl)
afl_TARGETS=(libpng sqlites)
It could build the first target successfully but fail to the following targets. The log in the following targets is as follows:
+ docker build -t magma/afl/sqlites --build-arg fuzzer_name=afl --build-arg target_name=sqlites --build-arg USER_ID=1000 --build-arg GROUP_ID=1000 --build-arg canaries=1 --build-arg isan=1 -f /home/xxx/magma/docker/Dockerfile /home/xxx/magma
error checking context: 'no permission to read from '/home/xxx/magma/workdir/cache/afl/libpng/libpng_read_fuzzer/0/findings/.cur_input''.
sqlites
is a typo; it should be sqlite3
. Is that the reason?
sqlites
is a typo; it should besqlite3
. Is that the reason?
Sorry for my typo. It is the same when using sqlite3
. (The above example is not directed copied from the log so I make a typo)
The following are the details. I use rootless docker and it failed to build a list of targets. (All docker containers and images are killed to avoid some unknown mistakes and then download the magma)
Then I run the following command with the captainrc file.
./tools/captain/run.sh ./tools/captain/captainrc
- captainrc
FUZZERS=(afl)
afl_TARGETS=(libpng libsndfile libtiff libxml2 lua openssl php poppler sqlite3)
- terminal
[2022-08-06 21:19] Obtaining sudo permissions to mount tmpfs
[2022-08-06 21:19] Building magma/afl/libpng
[2022-08-06 21:23] Starting campaigns for libpng_read_fuzzer
[2022-08-06 21:23] Building magma/afl/libsndfile
[2022-08-06 21:23] Container afl/libpng/libpng_read_fuzzer/0 started on CPU 0
[2022-08-06 21:23] Container afl/libpng/libpng_read_fuzzer/0 stopped
[2022-08-06 21:23] Failed to build magma/afl/libsndfile. Check build log for info.
[2022-08-06 21:23] Building magma/afl/libtiff
[2022-08-06 21:24] Failed to build magma/afl/libtiff. Check build log for info.
[2022-08-06 21:24] Building magma/afl/libxml2
[2022-08-06 21:24] Failed to build magma/afl/libxml2. Check build log for info.
[2022-08-06 21:24] Building magma/afl/lua
[2022-08-06 21:24] Failed to build magma/afl/lua. Check build log for info.
[2022-08-06 21:24] Building magma/afl/openssl
[2022-08-06 21:24] Failed to build magma/afl/openssl. Check build log for info.
[2022-08-06 21:24] Building magma/afl/php
[2022-08-06 21:24] Failed to build magma/afl/php. Check build log for info.
[2022-08-06 21:24] Building magma/afl/poppler
[2022-08-06 21:24] Failed to build magma/afl/poppler. Check build log for info.
[2022-08-06 21:24] Building magma/afl/sqlite3
[2022-08-06 21:24] Failed to build magma/afl/sqlite3. Check build log for info.
[2022-08-06 21:24] Waiting for jobs to finish
[2022-08-06 21:24] Obtaining sudo permissions to umount tmpfs
- afl_xxx_build.log
all the failed targets seem has a conflict with the previous target
libpng
+ docker build -t magma/afl/openssl --build-arg fuzzer_name=afl --build-arg target_name=openssl --build-arg USER_ID=1000 --build-arg GROUP_ID=1000 --build-arg canaries=1 --build-arg isan=1 -f /home/xxx/magma/docker/Dockerfile /home/xxx/magma
error checking context: 'can't stat '/home/xxx/magma/workdir_aflbuild/cache/afl/libpng/libpng_read_fuzzer/0/log''.
It is a docker issue rather than this repo. Sorry for bothering you :)