Skip to content

Conversation

@kernel-patches-daemon-bpf
Copy link

Pull request for series with
subject: x86/bpf: do not audit capability check in do_jit()
version: 2
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=1014021

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: 04a8995
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=1014021
version: 2

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: 04a8995
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=1014021
version: 2

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: 96d31df
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=1014021
version: 2

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: e758657
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=1014021
version: 2

The failure of this check only results in a security mitigation being
applied, slightly affecting performance of the compiled BPF program. It
doesn't result in a failed syscall, an thus auditing a failed LSM
permission check for it is unwanted. For example with SELinux, it causes
a denial to be reported for confined processes running as root, which
tends to be flagged as a problem to be fixed in the policy. Yet
dontauditing or allowing CAP_SYS_ADMIN to the domain may not be
desirable, as it would allow/silence also other checks - either going
against the principle of least privilege or making debugging potentially
harder.

Fix it by changing it from capable() to ns_capable_noaudit(), which
instructs the LSMs to not audit the resulting denials.

Link: https://bugzilla.redhat.com/show_bug.cgi?id=2369326
Fixes: d4e89d2 ("x86/bpf: Call branch history clearing sequence on exit")
Signed-off-by: Ondrej Mosnacek <[email protected]>
Reviewed-by: Paul Moore <[email protected]>
@kernel-patches-daemon-bpf
Copy link
Author

At least one diff in series https://patchwork.kernel.org/project/netdevbpf/list/?series=1014021 irrelevant now. Closing PR.

@kernel-patches-daemon-bpf kernel-patches-daemon-bpf bot deleted the series/1014021=>bpf-next branch October 22, 2025 01:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant