tracing: Delay module ref count for "enable_event" trigger
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: Delay module ref count for "enable_event" trigger
Triggers are now delayed from freeing, but can still be triggered until after the RCU grace period has ended. The freeing of the enable_event data is put into the private_data_free() callback, but the put of the module refcount is done immediately.
It is possible that if a module is removed that has an event that would enable (or disable) it is still active, it can read the data of the module after it is removed causing a use-after-free bug.
Move the trace_event_put_ref() that releases the module into the delayed callback so that the module can not be removed until any reference to its events are finished.
From the CVE record · Linux
The Linux kernel tracing enable_event trigger can read freed module data if a module is removed while a trigger referencing its events remains active. This can cause a use-after-free; the input does not specify an attack path, authentication requirements, or user interaction.
Anyone running the Linux kernel should check their kernel version; affected versions are not specified in the input.