mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[PR #6200] [MERGED] landlock: fix struct initialization #5871
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#5871
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/6200
Author: @kmk3
Created: 2/7/2024
Status: ✅ Merged
Merged: 2/8/2024
Merged by: @kmk3
Base:
master← Head:landlock-fix-struct-init📝 Commits (1)
07163ddlandlock: fix struct initialization📊 Changes
1 file changed (+2 additions, -2 deletions)
View changed files
📝
src/firejail/landlock.c(+2 -2)📄 Description
Recently (as of Landlock ABI 4), the
handled_access_netfield wasadded to the
landlock_ruleset_attrstruct in the Linux kernel (inlinux/landlock.h). In src/firejail/landlock.c, that field is not being
set in the struct (as we currently do not use it) before passing it to
the
landlock_create_full_rulesetsyscall, so it is likely to containrandom garbage when used, resulting in the syscall returning EINVAL:
So ensure that all structs in src/firejail/landlock.c are initialized to
0 before using them.
Note: Arch has recently (2024-01-31) updated the linux-api-headers
package from version 6.4-1 to 6.7-1[1]. The former version is not affected
(as it does not contain the extra struct field in linux/landlock.h),
while the latter is.
Fixes #6195.
Relates to #6078.
[1]
b4223b0c2bReported-by: @curiosityseeker
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.