You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
setrlimit(RLIMIT_MSGQUEUE) fails with EPERM, even to its current value #15944
setrlimit/prlimit64 with RLIMIT_MSGQUEUE always fails with EPERM under runsc, including when the new limit equals the current one. RLIMIT_MSGQUEUE is not in setableLimits in pkg/sentry/syscalls/linux/sys_rlimit.go, and prlimit64 returns EPERM for any resource missing from that map.
On Linux, an unprivileged process may set any RLIMIT_MSGQUEUE value up to its hard limit.
This breaks sandboxes that set every rlimit before running a program. nsjail is one: with its default configuration it calls setrlimit(RLIMIT_MSGQUEUE, <current soft limit>) and aborts on failure, so no jail can start under runsc unless all rlimits are disabled (--disable_rlimits).
setableLimits already lists limits that are accepted but not enforced (Core, ProcessCount, RealTimePriority, "to avoid returning EPERM, since some apps expect them to succeed"). POSIX message queues are not implemented, so MessageQueueBytes could join that list the same way.
Steps to reproduce
docker run --rm --runtime=runsc python:3-alpine python3 -c '
import resource
r = resource.RLIMIT_MSGQUEUE
cur = resource.getrlimit(r)
print(cur)
resource.setrlimit(r, cur)
print("ok")'
Linux (runc): prints (819200, 819200) then ok.
runsc release-20261012.0, and master as of 2026-10-18: prints (819200, 819200), then ValueError: not allowed to raise maximum limit. Python reports EPERM from setrlimit that way.
runsc version
runsc version release-20261012.0
spec: 1.2.1
Also reproduced with a nightly build (release-20261012.0-139-g73eaa38549eb).
docker version (if using docker)
Reproduced under containerd 2.2 (k3s 1.35) with RuntimeClass handler runsc, default platform (systrap). The repro above is the docker equivalent.
uname
Linux 6.8.0 x86_64 (host)
Possible fix
Add limits.MessageQueueBytes to setableLimits next to the other accepted-but-not-enforced limits. Enforcing it is unnecessary while mq_open is unimplemented.
Activity
net, contain: run under gVisor (skip an unused link cache, tolerate a…
Allow setting RLIMIT_MSGQUEUE
Allow setting RLIMIT_MSGQUEUE