Linux kernel privilege bypass in perf kernel callchain access
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
perf/core: Check kernel access when kernel callchains are requested
perf_event_open() currently gates perf_allow_kernel() only on !attr.exclude_kernel.
However, users can still request kernel callchain collection with attr.exclude_callchain_kernel == 0 even when attr.exclude_kernel == 1. That still requires kernel profiling privilege, but the existing check does not enforce it.
Update the permission check to call perf_allow_kernel() when either kernel sampling is requested or kernel callchains are requested.
This keeps permission checks aligned with requested data and prevents unprivileged use of kernel callchain capture.
From the CVE record · Linux
The Linux kernel's perf_event_open() permission check does not enforce kernel profiling privilege when kernel callchains are requested but kernel sampling is excluded. A local unprivileged user can request kernel callchain capture by setting exclude_kernel to 1 and exclude_callchain_kernel to 0; no other user interaction is described.
Administrators running the Linux kernel should check their installations; affected versions are not specified.