mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #5116] Filter netlink families with seccomp #2885
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#2885
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 @rusty-snake on GitHub (Apr 23, 2022).
Original GitHub issue: https://github.com/netblue30/firejail/issues/5116
Is your feature request related to a problem? Please describe.
AF_NETLINKexposes a (huge) attack surface for the kernel. See https://github.com/netblue30/firejail/issues/4013#issuecomment-786780504 and #4020 for previous discussions.cc @kris7t @glitsj16
Describe the solution you'd like
The socket syscall looks like
int socket(int domain, int type, int protocol);. We already filter the first argument (domain) withprotocol unix,inet,inet6,netlink. To minimize the attack surface ofAF_NETLINKwe should filter the third/last argument (protocol) if the first isAF_NETLINK(netlink_socket = socket(AF_NETLINK, socket_type, netlink_family);).Describe alternatives you've considered
N/A
Additional context
N/A
@ghost commented on GitHub (Apr 24, 2022):
Would make a nice enhancement. FWIW I always try to run apps without netlink via local overrides. Only in very rare cases it is actually needed. So, in other words, besides netlink filtering we could drop netlink from protocol for known 'good' applications too IMO. More of a note for future reference when doing PR's.