CVE-2023-54211: tracing: Fix warning in trace_buffered_event_disable()
In the Linux kernel, the following vulnerability has been resolved:
tracing: Fix warning in tracebufferedeventdisable()
Warning happened in tracebufferedeventdisable() at WARNONONCE(!tracebufferedeventref)
Call Trace: ? warn+0xa5/0x1b0 ? tracebufferedeventdisable+0x189/0x1b0 ftraceeventenabledisable+0x19e/0x3e0 freeprobedata+0x3b/0xa0 unregisterftracefunctionprobefunc+0x6b8/0x800 eventenablefunc+0x2f0/0x3d0 ftraceprocessregex.isra.0+0x12d/0x1b0 ftracefilterwrite+0xe6/0x140 vfswrite+0x1c9/0x6f0 [...]
The cause of the warning is in ftraceeventenabledisable(), tracebufferedeventenable() was called once while tracebufferedeventdisable() was called twice. Reproduction script show as below, for analysis, see the comments: #!/bin/bash
cd /sys/kernel/tracing/
# 1. Register a 'disableevent' command, then: # 1) SOFTDISABLEDBIT was set; # 2) tracebufferedeventenable() was called first time; echo 'cmdlineprocshow:disableevent:initcall:initcallfinish' > \ setftracefilter
# 2. Enable the event registered, then: # 1) SOFTDISABLEDBIT was cleared; # 2) tracebufferedeventdisable() was called first time; echo 1 > events/initcall/initcallfinish/enable
# 3. Try to call into cmdlineprocshow(), then SOFTDISABLEDBIT was # set again!!! cat /proc/cmdline
# 4. Unregister the 'disableevent' command, then: # 1) SOFTDISABLEDBIT was cleared again; # 2) tracebufferedeventdisable() was called second time!!! echo '!cmdlineprocshow:disableevent:initcall:initcallfinish' > \ setftracefilter
To fix it, IIUC, we can change to call tracebufferedeventenable() at fist time soft-mode enabled, and call tracebufferedeventdisable() at last time soft-mode disabled.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
ubuntu/linux-aws-5.4to a version that resolves this vulnerability.Fixed in 5.4.0-1116.126~18.04.1 - Upgrade
Upgrade
ubuntu/linux-azure-5.4to a version that resolves this vulnerability.Fixed in 5.4.0-1121.128~18.04.1 - Upgrade
Upgrade
ubuntu/linux-gcp-5.4to a version that resolves this vulnerability.Fixed in 5.4.0-1120.129~18.04.1 - Upgrade
Upgrade
ubuntu/linux-hwe-5.4to a version that resolves this vulnerability.Fixed in 5.4.0-169.187~18.04.1 - Upgrade
Upgrade
ubuntu/linux-ibm-5.4to a version that resolves this vulnerability.Fixed in 5.4.0-1063.68~18.04.1 - Upgrade
Upgrade
ubuntu/linux-oracle-5.4to a version that resolves this vulnerability.Fixed in 5.4.0-1115.124~18.04.1 - Upgrade
Upgrade
ubuntu/linux-raspi-5.4to a version that resolves this vulnerability.Fixed in 5.4.0-1100.112~18.04.1 - Upgrade
Upgrade
ubuntu/linuxto a version that resolves this vulnerability.Fixed in 5.4.0-169.187 - Upgrade
Upgrade
ubuntu/linux-awsto a version that resolves this vulnerability.Fixed in 5.4.0-1116.126 - Upgrade
Upgrade
ubuntu/linux-aws-5.15to a version that resolves this vulnerability.Fixed in 5.15.0-1049.54~20.04.1 - Upgrade
Upgrade
ubuntu/linux-azureto a version that resolves this vulnerability.Fixed in 5.4.0-1121.128 - Upgrade
Upgrade
ubuntu/linux-azure-5.15to a version that resolves this vulnerability.Fixed in 5.15.0-1051.59~20.04.1 - Upgrade
Upgrade
ubuntu/linux-bluefieldto a version that resolves this vulnerability.Fixed in 5.4.0-1076.82 - Upgrade
Upgrade
ubuntu/linux-gcpto a version that resolves this vulnerability.Fixed in 5.4.0-1120.129 - Upgrade
Upgrade
ubuntu/linux-gcp-5.15to a version that resolves this vulnerability.Fixed in 5.15.0-1046.54~20.04.1 - Upgrade
Upgrade
ubuntu/linux-hwe-5.15to a version that resolves this vulnerability.Fixed in 5.15.0-88.98~20.04.1 - Upgrade
Upgrade
ubuntu/linux-ibmto a version that resolves this vulnerability.Fixed in 5.4.0-1063.68 - Upgrade
Upgrade
ubuntu/linux-ibm-5.15to a version that resolves this vulnerability.Fixed in 5.15.0-1042.45~20.04.1 - Upgrade
Upgrade
ubuntu/linux-intel-iotg-5.15to a version that resolves this vulnerability.Fixed in 5.15.0-1045.51~20.04.1 - Upgrade
Upgrade
ubuntu/linux-iotto a version that resolves this vulnerability.Fixed in 5.4.0-1028.29 - Upgrade
Upgrade
ubuntu/linux-kvmto a version that resolves this vulnerability.Fixed in 5.4.0-1104.111 - Upgrade
Upgrade
ubuntu/linux-lowlatency-hwe-5.15to a version that resolves this vulnerability.Fixed in 5.15.0-88.98~20.04.1 - Upgrade
Upgrade
ubuntu/linux-nvidia-tegra-5.15to a version that resolves this vulnerability.Fixed in 5.15.0-1019.19~20.04.1 - Upgrade
Upgrade
ubuntu/linux-oracleto a version that resolves this vulnerability.Fixed in 5.4.0-1115.124 - Upgrade
Upgrade
ubuntu/linux-oracle-5.15to a version that resolves this vulnerability.Fixed in 5.15.0-1047.53~20.04.1 - Upgrade
Upgrade
ubuntu/linux-raspito a version that resolves this vulnerability.Fixed in 5.4.0-1100.112 - Upgrade
Upgrade
ubuntu/linux-riscv-5.15to a version that resolves this vulnerability.Fixed in 5.15.0-1045.49~20.04.1 - Upgrade
Upgrade
ubuntu/linux-xilinx-zynqmpto a version that resolves this vulnerability.Fixed in 5.4.0-1035.39 - Upgrade
Upgrade
ubuntu/linux-aws-fipsto a version that resolves this vulnerability.Fixed in 5.4.0-1116.126+fips1 - Upgrade
Upgrade
ubuntu/linux-azure-fipsto a version that resolves this vulnerability.Fixed in 5.4.0-1121.128+fips1 - Upgrade
Upgrade
ubuntu/linux-fipsto a version that resolves this vulnerability.Fixed in 5.4.0-1090.100 - Upgrade
Upgrade
ubuntu/linux-gcp-fipsto a version that resolves this vulnerability.Fixed in 5.4.0-1120.129+fips1 - Upgrade
Upgrade
ubuntu/linuxto a version that resolves this vulnerability.Fixed in 5.15.0-88.98 - Upgrade
Upgrade
ubuntu/linux-awsto a version that resolves this vulnerability.Fixed in 5.15.0-1049.54 - Upgrade
Upgrade
ubuntu/linux-azureto a version that resolves this vulnerability.Fixed in 5.15.0-1051.59 - Upgrade
Upgrade
ubuntu/linux-azure-fdeto a version that resolves this vulnerability.Fixed in 5.15.0-1051.59.1 - Upgrade
Upgrade
ubuntu/linux-gcpto a version that resolves this vulnerability.Fixed in 5.15.0-1046.54 - Upgrade
Upgrade
ubuntu/linux-gketo a version that resolves this vulnerability.Fixed in 5.15.0-1046.51 - Upgrade
Upgrade
ubuntu/linux-gkeopto a version that resolves this vulnerability.Fixed in 5.15.0-1032.38 - Upgrade
Upgrade
ubuntu/linux-ibmto a version that resolves this vulnerability.Fixed in 5.15.0-1042.45 - Upgrade
Upgrade
ubuntu/linux-intel-iotgto a version that resolves this vulnerability.Fixed in 5.15.0-1045.51 - Upgrade
Upgrade
ubuntu/linux-kvmto a version that resolves this vulnerability.Fixed in 5.15.0-1046.51 - Upgrade
Upgrade
ubuntu/linux-lowlatencyto a version that resolves this vulnerability.Fixed in 5.15.0-88.98 - Upgrade
Upgrade
ubuntu/linux-nvidiato a version that resolves this vulnerability.Fixed in 5.15.0-1040.40 - Upgrade
Upgrade
ubuntu/linux-nvidia-tegrato a version that resolves this vulnerability.Fixed in 5.15.0-1019.19 - Upgrade
Upgrade
ubuntu/linux-nvidia-tegra-igxto a version that resolves this vulnerability.Fixed in 5.15.0-1006.6 - Upgrade
Upgrade
ubuntu/linux-oracleto a version that resolves this vulnerability.Fixed in 5.15.0-1047.53 - Upgrade
Upgrade
ubuntu/linux-raspito a version that resolves this vulnerability.Fixed in 5.15.0-1042.45 - Upgrade
Upgrade
ubuntu/linux-xilinx-zynqmpto a version that resolves this vulnerability.Fixed in 5.15.0-1025.29 - Upgrade
Upgrade
ubuntu/linux-bluefieldto a version that resolves this vulnerability.Fixed in 5.15.0-1031.33 - Upgrade
Upgrade
ubuntu/linux-intel-iot-realtimeto a version that resolves this vulnerability.Fixed in 5.15.0-1042.44 - Upgrade
Upgrade
ubuntu/linux-realtimeto a version that resolves this vulnerability.Fixed in 5.15.0-1050.56 - Compensating control
Change __ftrace_event_enable_disable() to call trace_buffered_event_enable() at the first time soft mode is enabled, and call trace_buffered_event_disable() at the last time soft mode is disabled.
Event History
Frequently Asked Questions
What is the severity of CVE-2023-54211?
CVE-2023-54211 is classified as a low severity vulnerability.
How do I fix CVE-2023-54211?
To fix CVE-2023-54211, update your Linux kernel to the latest version where the vulnerability has been resolved.
Which Linux kernel versions are affected by CVE-2023-54211?
CVE-2023-54211 affects specific versions of the Linux kernel prior to the fix implementation.
What is the impact of CVE-2023-54211 on system operations?
The impact of CVE-2023-54211 may result in warning messages related to the tracing subsystem but does not lead to a denial of service.
Is CVE-2023-54211 exploitable remotely?
CVE-2023-54211 is not considered remotely exploitable as it pertains to local operations within the kernel.