proot icon indicating copy to clipboard operation
proot copied to clipboard

Nested invocations of proot fail

Open sattlerc opened this issue 2 years ago • 2 comments

I tried nesting invocations of proot:

$ proot proot proot true

Expected Behavior

The program call should succeed.

Actual Behavior

proot error: ptrace(TRACEME): Operation not permitted
proot error: execve("/usr/bin/true"): Operation not permitted
proot info: It seems your kernel contains this bug: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1202161
To workaround it, set the env. variable PROOT_NO_SECCOMP to 1.
fatal error: see `proot --help`.

The referenced bug is from 2013 and has been fixed for a long time.

Specifications

  • Proot/Care version: master (db16f349)
  • Kernel version: 5.14.14
  • Host distribution: Arch Linux

sattlerc avatar Nov 07 '21 01:11 sattlerc

Before I used master, I used 5.1.0 (I was not able to compile 5.2.0 due to #250). However, that did not even pass this check:

~$ proot true
proot info: pid 15183: terminated with signal 11

I'm guessing that is related to #106.

Setting PROOT_NO_SECCOMP=1 yields no errors here and with the program call from the bug report.

sattlerc avatar Nov 07 '21 01:11 sattlerc

proot -V
 _____ _____              ___
|  __ \  __ \_____  _____|   |_
|   __/     /  _  \/  _  \    _|
|__|  |__|__\_____/\_____/\____| v5.3.0

built-in accelerators: process_vm = yes, seccomp_filter = yes

Visit https://proot-me.github.io for help, bug reports, suggestions, patches, ...
Copyright (C) 2022 PRoot Developers, licensed under GPL v2 or later.

proot proot proot true
proot error: ptrace(TRACEME): Operation not permitted
proot error: execve("/bin/true"): Operation not permitted
proot info: It seems your kernel contains this bug: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1202161
To workaround it, set the env. variable PROOT_NO_SECCOMP to 1.
fatal error: see `proot --help`.

PROOT_NO_SECCOMP=1 proot proot proot true

echo $?
0

Source: https://github.com/proot-me/proot/blob/master/src/cli/cli.c#L131

oxr463 avatar Jan 20 '22 00:01 oxr463