[GH-ISSUE #477] Able to set negative niceness for a process as a regular user with firejail #339

Closed
opened 2026-05-05 05:37:22 -06:00 by gitea-mirror · 1 comment
Owner

Originally created by @dirtybytes on GitHub (Apr 23, 2016).
Original GitHub issue: https://github.com/netblue30/firejail/issues/477

Likely not a huge security issue, but still.
According to this: http://linux.die.net/man/2/nice

Only the superuser may specify a negative increment, or priority increase.

And, indeed, nice -n -20 /bin/bash would start bash with 0 niceness value, informing you of the failure. However, a recently implemented --nice option allows you to bypass it, setting the initial niceness of a process to -20, probably because firejail is SUID root. It looks like it can't be done from within the jail itself, but it still allows a regular user to do something he shouldn't be able to using this program.

Originally created by @dirtybytes on GitHub (Apr 23, 2016). Original GitHub issue: https://github.com/netblue30/firejail/issues/477 Likely not a huge security issue, but still. According to this: http://linux.die.net/man/2/nice > Only the superuser may specify a negative increment, or priority increase. And, indeed, `nice -n -20 /bin/bash` would start bash with 0 niceness value, informing you of the failure. However, a recently implemented `--nice` option allows you to bypass it, setting the initial niceness of a process to -20, probably because firejail is SUID root. It looks like it can't be done from within the jail itself, but it still allows a regular user to do something he shouldn't be able to using this program.
gitea-mirror 2026-05-05 05:37:22 -06:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@netblue30 commented on GitHub (May 2, 2016):

Fixed, thank you for the bug.

<!-- gh-comment-id:216230230 --> @netblue30 commented on GitHub (May 2, 2016): Fixed, thank you for the bug.
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#339
No description provided.