linux-yocto/kernel/events
Peter Zijlstra 8e8bf7bc6a perf: Revert to requiring CAP_SYS_ADMIN for uprobes
[ Upstream commit ba677dbe77 ]

Jann reports that uprobes can be used destructively when used in the
middle of an instruction. The kernel only verifies there is a valid
instruction at the requested offset, but due to variable instruction
length cannot determine if this is an instruction as seen by the
intended execution stream.

Additionally, Mark Rutland notes that on architectures that mix data
in the text segment (like arm64), a similar things can be done if the
data word is 'mistaken' for an instruction.

As such, require CAP_SYS_ADMIN for uprobes.

Fixes: c9e0924e5c ("perf/core: open access to probes for CAP_PERFMON privileged process")
Reported-by: Jann Horn <jannh@google.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/CAG48ez1n4520sq0XrWYDHKiKxE_+WCfAK+qt9qkY4ZiBGmL-5g@mail.gmail.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-07-17 18:32:04 +02:00
..
callchain.c
core.c perf: Revert to requiring CAP_SYS_ADMIN for uprobes 2025-07-17 18:32:04 +02:00
hw_breakpoint_test.c perf/hw_breakpoint: test: Skip the test if dependencies unmet 2022-11-02 12:22:05 +01:00
hw_breakpoint.c perf/hw_breakpoint: Return EOPNOTSUPP for unsupported breakpoint type 2025-06-04 14:40:09 +02:00
internal.h perf/aux: Fix AUX buffer serialization 2024-09-12 11:10:27 +02:00
Makefile
ring_buffer.c perf: Avoid the read if the count is already updated 2025-06-04 14:40:16 +02:00
uprobes.c uprobes: Fix race in uprobe_free_utask 2025-03-13 12:53:24 +01:00