• 公告ID (KylinSec-SA-2024-3282)

摘要:

In the Linux kernel, the following vulnerability has been resolved:tracing/osnoise: Do not unregister events twiceNicolas reported that using: # trace-cmd record -e all -M 10 -p osnoise --pollResulted 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 anunregistered tracepoint.This happens on trace-cmd because it first stops tracing, andthen switches the tracer to nop. Which is equivalent to: # cd /sys/kernel/tracing/ # echo osnoise > current_tracer # echo 0 > tracing_on # echo nop > current_tracerThe osnoise tracer stops the workload when no trace instanceis actually collecting data. This can be caused both bydisabling tracing or disabling the tracer itself.To avoid unregistering events twice, use the existingtrace_osnoise_callback_enabled variable to check if the events(and the workload) are actually active before trying todeactivate them.

安全等级: Low

公告ID: KylinSec-SA-2024-3282

发布日期: 2024年8月6日

关联CVE: CVE-2022-48848  

  • 详细介绍

1. 漏洞描述

   

In the Linux kernel, the following vulnerability has been resolved:tracing/osnoise: Do not unregister events twiceNicolas reported that using: # trace-cmd record -e all -M 10 -p osnoise --pollResulted 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 anunregistered tracepoint.This happens on trace-cmd because it first stops tracing, andthen switches the tracer to nop. Which is equivalent to: # cd /sys/kernel/tracing/ # echo osnoise > current_tracer # echo 0 > tracing_on # echo nop > current_tracerThe osnoise tracer stops the workload when no trace instanceis actually collecting data. This can be caused both bydisabling tracing or disabling the tracer itself.To avoid unregistering events twice, use the existingtrace_osnoise_callback_enabled variable to check if the events(and the workload) are actually active before trying todeactivate them.

2. 影响范围

cve名称 产品 组件 是否受影响

3. 影响组件

    无

4. 修复版本

    无

5. 修复方法

   无

6. 下载链接

    无
上一篇:KylinSec-SA-2024-3281 下一篇:KylinSec-SA-2024-3283