Conversation
…itialization isCapSysPtraceSet was evaluated when the package was initialized, from the effective capability set. Extensions whose binary carries its file capabilities without the effective bit (setcap ...+ip) only make them effective in main(), so the check always failed: every namespace lookup took the slower fallback (a root readlink process) and logged a false "CAP_SYS_PTRACE capability is not set" warning.
|
Claude finished @achoimet's task in 27s —— View job Claude's Review
|
|




Why
ociruntimedecides once, when the package is initialized, whetherCAP_SYS_PTRACEis in the effective set (var isCapSysPtraceSet = hasCap(unix.CAP_SYS_PTRACE)). Without it, every namespace lookup falls back to spawning a rootreadlinkprocess and logs "CAP_SYS_PTRACE capability is not set. Using fallback with reduced performance."extension-container and extension-host are moving their file capabilities from
setcap …+eipto+ip, so that a missing capability no longer makesexecfail (the extension crash-loops today). Their capabilities then only become effective inmain()(extruntime.RaiseCapabilities), after package initialization, and this check always sees them missing: every attack would take the slow path, with a false warning.Seen in the E2E logs of steadybit/extension-container#525: the warning appears 7 times in the PR run vs once on
main.What
Evaluate the check on first use (
sync.OnceValue), which happens when an attack runs, aftermain()has raised the capabilities. Nothing changes for binaries that keep the effective bit.Related
RaiseCapabilitiessetcap +ip, they will depend on this fix