panda-re / lava

LAVA: Large-scale Automated Vulnerability Addition
Other
371 stars 60 forks source link

(Question) Copying over users #37

Open benjaminjellison opened 5 years ago

benjaminjellison commented 5 years ago

I'm trying to install LAVA on an AWS EC2 instance, and I got stuck on the setup. Here was the error message:

[setup.py] Running in docker [bash -c "cd /home/bjelli2/lava/tools/btrace && bash compile.sh"] . . . 
[docker run --rm -v /home/bjelli2:/home/bjelli2 -v /etc/passwd:/etc/passwd:ro -v /etc/group:/etc/group:ro -v /etc/shadow:/etc/shadow:ro -v /etc/gshadow:/etc/gshadow:ro lava32 su -l bjelli2 -c bash -c "cd /home/bjelli2/lava/tools/btrace && bash compile.sh"]
No passwd entry for user 'bjelli2'

Authentication is done outside the instance, so my username isn't stored in the normal places. I'd like to know what the purpose of copying /etc/passwd and the others serves, and if it could be bypassed.

AndrewFasano commented 5 years ago

I spent some time looking into this and I think all these file mappings are unnecessary. Instead we can use the --user $UID argument to ensure that the guest and host have the same view of the filesystem. I pushed a start to fixing this to the fix_37 branch, but it's not quite finished yet. Hope to have it working and merged into master soon.