coresight: perf: Retrieve path and source from event data
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:
coresight: perf: Retrieve path and source from event data
ETM perf callbacks currently use the per-CPU csdev_src pointer, which can race with updates during device registration and unregistration.
The AUX setup already builds and stores the path in the event data. Use this path to retrieve the source instead of csdev_src to avoid the race.
Export coresight_get_source() and add etm_event_get_ctxt_path() to retrieve the context's path and its source with READ_ONCE() / WRITE_ONCE() accessors. Give the comments to explain why this approach is safe when pause or resume callbacks preempt the disable callback (e.g. via NMI).
From the CVE record · Linux
Linux kernel CoreSight ETM perf callbacks use a per-CPU source pointer that can race with device registration or unregistration. The description does not specify an attacker-controlled outcome or whether network access, authentication, or user interaction is required.
Engineers running Linux kernels with CoreSight ETM perf support should check whether their kernel includes the fix; affected versions are not specified.