mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #7063] --seccomp= accepts invalid syscall names without warning #3474
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#3474
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?
Originally created by @cobratbq on GitHub (Feb 16, 2026).
Original GitHub issue: https://github.com/netblue30/firejail/issues/7063
Description
I was experimenting with listing
seccomp.keepsyscalls directly. I discovered that (without noticeable warning)newunameis unknown so did not have an effect.Your code (current
master) contains:uname:63Other syscall references list:
newuname:63I think there's also
olduname, but I haven't needed it in whitelisting yet. (Just a heads-up.)Is there any chance you can make an alias for this, or otherwise make
newunamework? This would help w.r.t. whiteliting syscalls, given that applications already start in "highly precariously restricted" environments. 😃Steps to Reproduce
Add
newunametosyscall.keep-list.Expected behavior
Add
newunametosyscall.keep-list and see it show up in seccomp-BPF listing.Actual behavior
Discover that it isn't in the produced seccomp-BPF listing. Thus
newunamecall isn't whitelisted. (I didn't know aboutunameuntil I checked the code.)Behavior without a profile
Almost clean profile because I'm screwing around with whitelisting syscalls. So consider it empty, except for a whole swath of syscalls. :-P
Additional context
Nope.
Environment
firejail0.74Checklist
I'm sorry for being obnoxious but I don't think the checklist is necessary. Scold me if you think I'm wrong. 😓
Log
Not applicable.
Relates to:
@pierretom commented on GitHub (Feb 16, 2026):
I don't think it can be invoked directly by applications, it's used internally by the kernel.
Maybe
firejail --seccomp.keep=unamemight just be enough in your case ?Or try with the syscall number on x86_64
firejail '--seccomp.keep=$63'@cobratbq commented on GitHub (Feb 16, 2026):
Wait .. you can do numbers too! Arghh .. okay that's useful.
When restricting Firefox it eventually kills on 'newuname', which indeed seems to be 'uname' (63) but seems listed "everywhere" as newuname. So, it seems to arrive there eventually. Maybe I got confused by interleaved apparmor messaging or smth, but I don't think I did.
@pierretom commented on GitHub (Feb 16, 2026):
Yes use
unamewith Firefox.You can try to update Firejail too, there are 2 new releases since 0.9.74.
@kmk3 commented on GitHub (Feb 17, 2026):
What distribution name/version?
Why check the code on master if you are using an old version?
This is the tree for 0.9.74:
If the relevant code differs from master, you likely have your answer.
Also, there have been many updates and changes related to syscall mapping after
0.9.78, so it's recommended to use firejail-git if you are having issues with
syscalls:
Does the problem happen with firejail-git?
@cobratbq commented on GitHub (Feb 17, 2026):
Maybe there's misunderstanding: I looked for answers in 'master' and what I found was a proper (and correct) explanation/solution. I report what seems like an undesirable discrepancy.
I'm informing you that the syscall that pages and listings list as 'newuname' is in your code-base known as 'uname', thus complicating use. (Also why I enquired about aliasing.) I didn't look in version-branch because 'master' contains the answer and I'm guessing that's more relevant/practical to you.
Granted, now that I know, I (can) use 'uname' and that fixes my problem, but not reporting it would mean the next person is struggling too, possibly.
I appreciate your upgrade recommendation. The earlier recommendations are very useful too.
@kmk3 commented on GitHub (Feb 17, 2026):
The syscall number/name mapping is pulled straight from the Linux kernel
sources (.tbl files) and there the syscall in question is just called
uname.The older versions are obsolete and are not exposed by the syscall mapping from
the kernel.
It is the same in firejail:
From
uname(2):sys_newunameis the function name for the entrypoint, which is internal tothe kernel.
It is arguably an implementation-specific detail not relevant to userspace.
Glad they helped.
The following PR should clarify things in the man pages:
@kmk3 commented on GitHub (Feb 17, 2026):
This is a more serious issue though.
It should at least warn on invalid syscall names.