[GH-ISSUE #593] Limit the memory size used by the jailed process #416

Closed
opened 2026-05-05 05:49:14 -06:00 by gitea-mirror · 5 comments
Owner

Originally created by @vporton on GitHub (Jun 24, 2016).
Original GitHub issue: https://github.com/netblue30/firejail/issues/593

We need to limit the memory size used by the jailed process, so that a hacked would not run out of memory and swap.

Originally created by @vporton on GitHub (Jun 24, 2016). Original GitHub issue: https://github.com/netblue30/firejail/issues/593 We need to limit the memory size used by the jailed process, so that a hacked would not run out of memory and swap.
gitea-mirror 2026-05-05 05:49:14 -06:00
Author
Owner

@reinerh commented on GitHub (Jun 24, 2016):

ulimit?

<!-- gh-comment-id:228401927 --> @reinerh commented on GitHub (Jun 24, 2016): `ulimit`?
Author
Owner

@vporton commented on GitHub (Jun 24, 2016):

On Fri, 2016-06-24 at 10:02 -0700, Reiner Herrmann wrote:

ulimit?

I am aware about ulimit, but this will be probably a little more
efficient with single firejail executable than running ulimit firejail composed from two commands.

<!-- gh-comment-id:228403162 --> @vporton commented on GitHub (Jun 24, 2016): On Fri, 2016-06-24 at 10:02 -0700, Reiner Herrmann wrote: > ulimit? > I am aware about ulimit, but this will be probably a little more efficient with single `firejail` executable than running `ulimit firejail` composed from two commands.
Author
Owner

@reinerh commented on GitHub (Jun 24, 2016):

It's probably a bit more convenient, I agree, but duplicating functionality already provided by other means also increases the complexity of firejail.

<!-- gh-comment-id:228403948 --> @reinerh commented on GitHub (Jun 24, 2016): It's probably a bit more convenient, I agree, but duplicating functionality already provided by other means also increases the complexity of firejail.
Author
Owner

@chiraag-nataraj commented on GitHub (Jun 24, 2016):

Another way is to assign the process to a cgroup and set limits on the cgroup (which you might be able to do in a config file somewhere).

<!-- gh-comment-id:228465513 --> @chiraag-nataraj commented on GitHub (Jun 24, 2016): Another way is to assign the process to a cgroup and set limits on the cgroup (which you might be able to do in a config file somewhere).
Author
Owner

@netblue30 commented on GitHub (Jun 26, 2016):

Yes, cgroup is the way to go. Set up a control group and pass it to the sandbox using --cgroup.

<!-- gh-comment-id:228608794 --> @netblue30 commented on GitHub (Jun 26, 2016): Yes, cgroup is the way to go. Set up a control group and pass it to the sandbox using --cgroup.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/firejail#416
No description provided.