mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[PR #6878] [MERGED] feature: add arg-max-count / arg-max-len to firejail.config #6215
Labels
No labels
LTS merge
LTS merge
bug
bug
converted-to-discussion
doc-todo
documentation
duplicate
enhancement
file-transfer
firecfg
firejail-in-firejail
firetools
graphics
help wanted
information_old
installation
invalid
modif
moved
needinfo
networking
notabug
notourbug
old-version
overlayfs
packaging
profile-request
pull-request
question
question_old
removal
runtime-permissions
sandbox-ipc
security
stale
wiki
wiki
wontfix
wordpress
workaround
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/firejail#6215
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/netblue30/firejail/pull/6878
Author: @tht2005
Created: 8/21/2025
Status: ✅ Merged
Merged: 10/30/2025
Merged by: @kmk3
Base:
master← Head:make-max-args-configurable📝 Commits (10+)
bf64a37feature: add max-arg-count and max-arg-len to firejail.config1396541change type of max_arg_count and max_arg_len to unsigned long0188d3buse long for max-arg-count49ac6edonly alloc fullargv when needed3af47f3max-arg-count: limit the alloc size of fullargv3fd86admax-arg-count: add debug messages67ae33bmax-arg-count: fix fullargv length checka5c0111max-arg-count: rename size var to fullargv_sz428f1bemax-arg-count: memset fullargv75eda63max-arg-count: turn max-arg-count into int again📊 Changes
5 files changed (+70 additions, -11 deletions)
View changed files
📝
etc/firejail.config(+12 -0)📝
src/firejail/checkcfg.c(+23 -0)📝
src/firejail/firejail.h(+3 -3)📝
src/firejail/main.c(+30 -7)📝
src/firejail/restricted_shell.c(+2 -1)📄 Description
Firejail can not run when number of arguments is too much ( > 128) so we should replace hardcoded MAX_ARGS=128 by a global configurable option.
We can implement a simple vector (like std::vector) so that we can have as many arguments as the heap can contain, i think this is safe because if it use too much memory we can kill the program after. I would like to hear opinion of maintainers about this.
Closes #4633
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.