AZL-117052: CVE-2026-139318 affecting package kernel 6.6.161.1-1
In the Linux kernel, the following vulnerability has been resolved:
bpf: Read the probe of a perf event under eventmutex
For a perf event on a kprobe or uprobe event which was made in tracefs, bpfgetkprobeinfo() and bpfgetuprobeinfo() look the probe up by name in the list of dynamic events, and hand a pointer to its symbol or file name back to the caller. None of the callers holds eventmutex.
The perf event keeps its trace event alive, nothing else. Other dynamic events are removed from the list and freed during the walk. And a probe which shares its event with other probes can be deleted while the event is in use, so even the probe which is found can be freed, together with the string, before the caller has measured and copied it. The result is a use-after-free in the walk, in strlen() and in the copy to user space, or a NULL pointer dereference.
The readers are BPFOBJGETINFOBYFD and fdinfo of a perf link, for whoever holds a descriptor of the link, and BPFTASKFDQUERY. The other side is anybody who may write to dynamicevents, kprobeevents or uprobeevents.
Take eventmutex in bpfgetperfeventinfo() and give the caller a copy of the name, which it has to free.
Affected Software
Event History
Frequently Asked Questions
Who needs access to exploit this issue?
One party must be able to write to dynamic_events, kprobe_events, or uprobe_events to remove dynamic probes. A separate reader must hold a perf link descriptor or use BPF_TASK_FD_QUERY; the affected readers include BPF_OBJ_GET_INFO_BY_FD and perf-link fdinfo.
What failure modes can occur?
Concurrent removal of a dynamic kprobe or uprobe can free probe data while it is being read. This can result in a use-after-free during list traversal, strlen(), or copying data to user space, or in a NULL pointer dereference.
Which configurations are relevant?
The issue concerns perf events associated with kprobe or uprobe events created through tracefs. It requires dynamic probe management through the tracefs dynamic-event interfaces and access to the affected BPF or perf-link information paths.