CVE-2026-90013: tracing: Take trace_array reference when opening options file
In the Linux kernel, the following vulnerability has been resolved:
tracing: Take tracearray reference when opening options file
The options files do not take the tracearray reference for the options they represent. This could cause a use-after-free kernel crash if one of these files is opened by one task and another task removes the instance that the option is for. Because it doesn't take a reference upon opening, it will not stop the removal which will free the options descriptor that is being used.
As the options are somewhat dynamic in their creation at boot up, each file represents a flag in the tracearray. The tracearray has an array of indexes to represent each of these flags that is stored in the traceflagsindex array. The address of the index array element is used to pass to the inode->iprivate pointer. Then that element is read which holds the index (which represents the flag) and then the index is used to calculate the tracearray descriptor from its traceflagsindex array.
One issue is that the index element can not be referenced until the tracearray's reference is taken. To handle this, create a new helper function called: tracearrayoptionsget() that will iterate all the existing tracearrays in the ftracetracearrays list (under the tracetypeslock), and compare the passed in address of the index element with the entire array of the tracearray's traceflagsindex array. If it matches, then up the corresponding tracearray's reference and return.
Affected Software
Event History
Frequently Asked Questions
What conditions are required to trigger the issue?
One task must open an options file for a tracing instance while another task removes that instance. The open file lacks a trace_array reference, allowing the options descriptor to be freed while it is still in use.
What is the expected impact if the race occurs?
The described impact is a use-after-free that can cause a kernel crash.