tracing/timerlat: Move hrtimer_init to timerlat_fd open()
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 |
|
|
6.6.186.7.66.8In the Linux kernel, the following vulnerability has been resolved:
tracing/timerlat: Move hrtimer_init to timerlat_fd open()
Currently, the timerlat's hrtimer is initialized at the first read of timerlat_fd, and destroyed at close(). It works, but it causes an error if the user program open() and close() the file without reading.
Here's an example:
# echo NO_OSNOISE_WORKLOAD > /sys/kernel/debug/tracing/osnoise/options # echo timerlat > /sys/kernel/debug/tracing/current_tracer
# cat <<EOF > ./timerlat_load.py # !/usr/bin/env python3
timerlat_fd = open("/sys/kernel/tracing/osnoise/per_cpu/cpu0/timerlat_fd", 'r') timerlat_fd.close(); EOF
# ./taskset -c 0 ./timerlat_load.py <BOOM>
From the CVE record · Linux
The Linux kernel's timerlat tracer can dereference a null pointer when closing timerlat_fd without first reading it. A local user who can access that tracing file can trigger a kernel crash by opening and closing it without reading.
Engineers running Linux kernels with the timerlat tracer should check whether their kernel includes the fix; affected versions are not specified.