CVE-2022-48848

Severity CVSS v4.0:
Pending analysis
Type:
Unavailable / Other
Publication date:
16/07/2024
Last modified:
24/07/2024

Description

In the Linux kernel, the following vulnerability has been resolved:<br /> <br /> tracing/osnoise: Do not unregister events twice<br /> <br /> Nicolas reported that using:<br /> <br /> # trace-cmd record -e all -M 10 -p osnoise --poll<br /> <br /> Resulted in the following kernel warning:<br /> <br /> ------------[ cut here ]------------<br /> WARNING: CPU: 0 PID: 1217 at kernel/tracepoint.c:404 tracepoint_probe_unregister+0x280/0x370<br /> [...]<br /> CPU: 0 PID: 1217 Comm: trace-cmd Not tainted 5.17.0-rc6-next-20220307-nico+ #19<br /> RIP: 0010:tracepoint_probe_unregister+0x280/0x370<br /> [...]<br /> CR2: 00007ff919b29497 CR3: 0000000109da4005 CR4: 0000000000170ef0<br /> Call Trace:<br /> <br /> osnoise_workload_stop+0x36/0x90<br /> tracing_set_tracer+0x108/0x260<br /> tracing_set_trace_write+0x94/0xd0<br /> ? __check_object_size.part.0+0x10a/0x150<br /> ? selinux_file_permission+0x104/0x150<br /> vfs_write+0xb5/0x290<br /> ksys_write+0x5f/0xe0<br /> do_syscall_64+0x3b/0x90<br /> entry_SYSCALL_64_after_hwframe+0x44/0xae<br /> RIP: 0033:0x7ff919a18127<br /> [...]<br /> ---[ end trace 0000000000000000 ]---<br /> <br /> The warning complains about an attempt to unregister an<br /> unregistered tracepoint.<br /> <br /> This happens on trace-cmd because it first stops tracing, and<br /> then switches the tracer to nop. Which is equivalent to:<br /> <br /> # cd /sys/kernel/tracing/<br /> # echo osnoise &gt; current_tracer<br /> # echo 0 &gt; tracing_on<br /> # echo nop &gt; current_tracer<br /> <br /> The osnoise tracer stops the workload when no trace instance<br /> is actually collecting data. This can be caused both by<br /> disabling tracing or disabling the tracer itself.<br /> <br /> To avoid unregistering events twice, use the existing<br /> trace_osnoise_callback_enabled variable to check if the events<br /> (and the workload) are actually active before trying to<br /> deactivate them.

Vulnerable products and versions

CPE From Up to
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 5.16 (including) 5.16.15 (excluding)