ioi / isolate

Sandbox for securely executing untrusted programs
Other
1.1k stars 161 forks source link

Assertion Failure Issue #154

Closed raviprakash007 closed 5 months ago

raviprakash007 commented 6 months ago

While Running isolate, I tried following command as root user and the response is not in favor.

$ isolate --cg -s -b 13 -M /var/local/lib/isolate/13/metadata.txt --stderr-to-stdout -i /dev/null -t 15.0 -x 0 -w 20.0 -k 128000 -p120 --cg-mem=512000 -f 4096 -E HOME=/tmp -E PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" -E LANG -E LANGUAGE -E LC_ALL -E JUDGE0_HOMEPAGE -E JUDGE0_SOURCE_CODE -E JUDGE0_MAINTAINER -E JUDGE0_VERSION -d /etc:noexec --run -- /bin/bash $(basename /var/local/lib/isolate/13/box/compile.sh) > /var/local/lib/isolate/13/compile_output.txt

Response: isolate: cg.c:31: cg_makepath: Assertion `(size_t) out < len' failed.

gollux commented 6 months ago

Ah, it looks like your setup uses insanely long paths in the control group tree. Committed a fix, please give it a try.

raviprakash007 commented 6 months ago

PATH_MAX size is 256 on most of the Linux flavours, So, will your change make an impact? The path size was already 256.

gollux commented 6 months ago

I don't think so, it's usually 4096.

raviprakash007 commented 5 months ago

Fixed by adding larger size to PATH.