tracing: Have show_event_filters/triggers files take trace array ref
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:
tracing: Have show_event_filters/triggers files take trace array ref
The newly added files show_event_filters and show_event_triggers that show all filters or triggers that are set within the trace array do not take a reference for the trace array it is showing. Without taking a reference, the trace_array may be freed via "rmdir" while a task is reading one of theses files. Those files iterate all the events within an instance (trace_array) and nothing prevents that instance from being freed while its data is being read. This causes a use-after-free crash.
Have the open of both those files take the trace_array reference via the trace_array_get() that prevents the trace_array from being freed while the files are opened.
From the CVE record · Linux
The tracing files show_event_filters and show_event_triggers do not hold a reference to the trace array they display. If a task reads either file while the trace array is removed with rmdir, the array can be freed during the read, causing a use-after-free crash.
Engineers running the Linux kernel should check whether their kernel includes the affected tracing files; affected versions were not specified.