DynamoRIO / DynamoRIO/dynamorio

DR lets unprivileged process re-increase its hard limit

Open
#1,890 1 comment 0 reactions 0 assignees View on GitHub
Bug-AppFail good first issue help wanted OpSys-Linux
Dominant language
C
Stars
3.2k
Forks
629
Avg merge
2d 15h
Merged PRs (30d)
31

Description

setrlimit is defined such that an unprivileged process (without CAP_SYS_RESOURCE) can only irreversibly lower its hard limit. Attempts by an unprivileged process to increase the hard limit should fail, even if the target value is no more than the original value at process start.

However the logic in core/unix/os.c lets a process set its hard limit back to anything up to the original value (minus the space that DR has grabbed). This is is even tested for in suite/tests/client-interface/file_io.c - this test program fails on the setrlimit() call when run native.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.