CVE-2026-139318: bpf: Read the probe of a perf event under event_mutex

Published Nov 30, 2026
·
Updated

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

1 affected component
Linux Linux kernel

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Compensating control

    In bpf_get_perf_event_info(), hold event_mutex while looking up kprobe/uprobe probe data and return a caller-owned copy of the probe name.

Event History

Nov 30, 2026
CVE Published
via MITRE·01:33 PM
Data Sourced
via MITRE·01:33 PM
Description
Data Sourced
via NVD·02:18 PM
Description

Frequently Asked Questions

1

Who can trigger the vulnerable read paths?

The affected readers are BPF_OBJ_GET_INFO_BY_FD, fdinfo for a perf link, and BPF_TASK_FD_QUERY. A caller needs a descriptor for the relevant perf link for the fdinfo path.

2

What concurrent activity is required for exploitation?

An attacker needs the ability to write dynamic event configuration through dynamic_events, kprobe_events, or uprobe_events while a reader queries perf-event probe information. The race involves kprobe or uprobe events created in tracefs, especially when probes sharing an event are removed.

3

What failures can this race cause?

It can cause a use-after-free while walking dynamic events, during strlen(), or while copying a probe symbol or file name to user space. It can also cause a NULL pointer dereference.

4

How is the issue resolved?

The fix takes event_mutex in bpf_get_perf_event_info() and returns a copied probe name to the caller, rather than exposing a pointer that may be freed concurrently.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203