angr/archr

docker mount failed when creating angrProjectBow

jacky-wilson opened this issue · 6 comments

Hi,

When I tried to run "python test/test_bow_angr.py", I got the following error:

mount: /tmp/archr_mounts/ad53a3e1edbb4216b30219b3673052f70833dc42fd2576dda50f2f10d64982c0: special device /home/johnson/dockers/overlay2/7953906f2439673aefed891c9c8d16681e6de7a9a512a8701618cfb0a7c330ea/merged does not exist.

umount: /tmp/archr_mounts/ad53a3e1edbb4216b30219b3673052f70833dc42fd2576dda50f2f10d64982c0: not mounted.
Traceback (most recent call last):
File "test_bow_angr.py", line 42, in
test_env_angr()
File "test_bow_angr.py", line 31, in test_env_angr
angr_checks(t)
File "test_bow_angr.py", line 14, in angr_checks
project = apb.fire()
File "/home/johnson/virtualenvs/angr-aeg/lib/python3.5/site-packages/archr-8.18.10.5-py3.5.egg/archr/arsenal/angr_project.py", line 30, in fire
self.project = angr.Project(the_binary, preload_libs=the_libs, lib_opts=lib_opts, main_opts=bin_opts, **kwargs)
File "/home/johnson/opensource/security/angr-dev/angr/angr/project.py", line 115, in init
raise Exception("Not a valid binary file: %s" % repr(thing))
Exception: Not a valid binary file: '/tmp/archr_mounts/ad53a3e1edbb4216b30219b3673052f70833dc42fd2576dda50f2f10d64982c0/usr/bin/env'

By debugging the program line by line, I found that this problem is caused by the following line in docker_target.py/mount_local function

os.system(_super_mount_cmd + "mount -o bind %s %s" % (self._merged_path, self.local_path))

My os is ubuntu 16.04 and docker version is 18.03.0-ce.

The following is the content in /etc/docker/daemon.json:

{
"iptables": false,
"ip-masq": false,
"storage-driver": "overlay2",
"graph": "/home/johnson/dockers"
}

Would you please help me figure out the problem, or just show me your configuration file?

@rhelmot what's your docker version?

Solved by deleting "graph": "/home/johnson/dockers". The problem is probably caused by file permissions of docker. Thanks @rhelmot.