Linux kernel reference count corruption in synthetic trace events
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 4b147936fa509650beaf638b331573c23ba4d609 · < cf4e31d5da80fae4c9cdbe7af55b7c3ad213f0e4| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
tracing/histograms: Verify event_call identity when updating synth_event refcount
In event_hist_trigger_parse() and hist_unreg_all(), the histogram registration and unregistration paths look up find_synth_event() using trace_event_name(file->event_call) and adjust se->ref if a match is found.
Because find_synth_event() only compares the event basename, registering or removing a histogram on a non-synthetic trace event whose basename matches a synthetic event erroneously modifies the synthetic event's reference count. If a histogram is registered on the non-synthetic event before the synthetic event is created and removed afterwards, se->ref is decremented without a matching increment, allowing the synthetic event to be freed while an active histogram action still holds a pointer to it.
Introduce find_synth_event_call() to verify that &se->call matches file->event_call before adjusting se->ref.
From the CVE record · Linux
The Linux kernel’s histogram tracing code can mistake a non-synthetic trace event for a synthetic event with the same basename and incorrectly change the synthetic event’s reference count. If a histogram is registered on the non-synthetic event before the synthetic event is created and removed afterward, the synthetic event can be freed while an active histogram action still holds a pointer to it. The input does not specify access requirements or whether user interaction is needed.
Engineers running Linux kernels with histogram tracing should check their versions; affected versions are not specified.