CVE-2022-48848
tracing/osnoise: Do not unregister events twice
Severity Score
Exploit Likelihood
Affected Versions
Public Exploits
0Exploited in Wild
-Decision
Descriptions
In the Linux kernel, the following vulnerability has been resolved:
tracing/osnoise: Do not unregister events twice
Nicolas reported that using:
# trace-cmd record -e all -M 10 -p osnoise --poll
Resulted in the following kernel warning:
------------[ cut here ]------------
WARNING: CPU: 0 PID: 1217 at kernel/tracepoint.c:404 tracepoint_probe_unregister+0x280/0x370
[...]
CPU: 0 PID: 1217 Comm: trace-cmd Not tainted 5.17.0-rc6-next-20220307-nico+ #19
RIP: 0010:tracepoint_probe_unregister+0x280/0x370
[...]
CR2: 00007ff919b29497 CR3: 0000000109da4005 CR4: 0000000000170ef0
Call Trace:
<TASK>
osnoise_workload_stop+0x36/0x90
tracing_set_tracer+0x108/0x260
tracing_set_trace_write+0x94/0xd0
? __check_object_size.part.0+0x10a/0x150
? selinux_file_permission+0x104/0x150
vfs_write+0xb5/0x290
ksys_write+0x5f/0xe0
do_syscall_64+0x3b/0x90
entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x7ff919a18127
[...]
---[ end trace 0000000000000000 ]---
The warning complains about an attempt to unregister an
unregistered tracepoint.
This happens on trace-cmd because it first stops tracing, and
then switches the tracer to nop. Which is equivalent to:
# cd /sys/kernel/tracing/
# echo osnoise > current_tracer
# echo 0 > tracing_on
# echo nop > current_tracer
The osnoise tracer stops the workload when no trace instance
is actually collecting data. This can be caused both by
disabling tracing or disabling the tracer itself.
To avoid unregistering events twice, use the existing
trace_osnoise_callback_enabled variable to check if the events
(and the workload) are actually active before trying to
deactivate them.
En el kernel de Linux, se resolvió la siguiente vulnerabilidad: rastreo/osnoise: no cancelar el registro de eventos dos veces Nicolas informó que al usar: # trace-cmd record -e all -M 10 -p osnoise --poll resultó en la siguiente advertencia del kernel: ------------[ cortar aquí ]------------ ADVERTENCIA: CPU: 0 PID: 1217 en kernel/tracepoint.c:404 tracepoint_probe_unregister+0x280/0x370 [ ...] CPU: 0 PID: 1217 Comm: Trace-CMD No contaminado 5.17.0-RC6-Next-20220307-Nico+ #19 RIP: 0010: TRACEPOINT_PROBE_UNREGister+ 0x280/0x370 [...] CR2: 00007ff919b29497 CR3: 00000001099DA4005 CR4: 0000000000170ef0 Seguimiento de llamadas: osnoise_workload_stop+0x36/0x90 tracing_set_tracer+0x108/0x260 tracing_set_trace_write+0x94/0xd0 ? __check_object_size.part.0+0x10a/0x150 ? selinux_file_permission+0x104/0x150 vfs_write+0xb5/0x290 ksys_write+0x5f/0xe0 do_syscall_64+0x3b/0x90 Entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x7ff919a18127 [...] ---[ final de seguimiento 0000000000000000 ]--- La advertencia se queja de un intento de cancelar el registro de un punto de seguimiento no registrado. Esto sucede en trace-cmd porque primero detiene el rastreo y luego cambia el rastreador a nop. Lo que equivale a: # cd /sys/kernel/tracing/ # echo osnoise > current_tracer # echo 0 > tracing_on # echo nop > current_tracer El rastreador osnoise detiene la carga de trabajo cuando ninguna instancia de seguimiento está recopilando datos. Esto puede deberse tanto a la desactivación del rastreo como a la desactivación del propio rastreador. Para evitar cancelar el registro de eventos dos veces, use la variable trace_osnoise_callback_enabled existente para verificar si los eventos (y la carga de trabajo) están realmente activos antes de intentar desactivarlos.
CVSS Scores
SSVC
- Decision:Track
Timeline
- 2024-07-16 CVE Reserved
- 2024-07-16 CVE Published
- 2024-07-17 EPSS Updated
- 2024-09-11 CVE Updated
- ---------- Exploited in Wild
- ---------- KEV Due Date
- ---------- First Exploit
CWE
CAPEC
References (3)
URL | Tag | Source |
---|---|---|
https://git.kernel.org/stable/c/2fac8d6486d5c34e2ec7028580142b8209da3f92 | Vuln. Introduced |
URL | Date | SRC |
---|
URL | Date | SRC |
---|---|---|
https://git.kernel.org/stable/c/4e10787d18379d9b296290c2288097feddef16d4 | 2022-03-16 | |
https://git.kernel.org/stable/c/f0cfe17bcc1dd2f0872966b554a148e888833ee9 | 2022-03-09 |
URL | Date | SRC |
---|
Affected Vendors, Products, and Versions
Vendor | Product | Version | Other | Status | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Vendor | Product | Version | Other | Status | <-- --> | Vendor | Product | Version | Other | Status |
Linux Search vendor "Linux" | Linux Kernel Search vendor "Linux" for product "Linux Kernel" | >= 5.16 < 5.16.15 Search vendor "Linux" for product "Linux Kernel" and version " >= 5.16 < 5.16.15" | en |
Affected
| ||||||
Linux Search vendor "Linux" | Linux Kernel Search vendor "Linux" for product "Linux Kernel" | >= 5.16 < 5.17 Search vendor "Linux" for product "Linux Kernel" and version " >= 5.16 < 5.17" | en |
Affected
|