CVE-2022-50255
Unknown Unknown - Not Provided
BaseFortify

Publication date: 2025-09-15

Last updated on: 2025-11-25

Assigner: kernel.org

Description
In the Linux kernel, the following vulnerability has been resolved: tracing: Fix reading strings from synthetic events The follow commands caused a crash: # cd /sys/kernel/tracing # echo 's:open char file[]' > dynamic_events # echo 'hist:keys=common_pid:file=filename:onchange($file).trace(open,$file)' > events/syscalls/sys_enter_openat/trigger' # echo 1 > events/synthetic/open/enable BOOM! The problem is that the synthetic event field "char file[]" will read the value given to it as a string without any memory checks to make sure the address is valid. The above example will pass in the user space address and the sythetic event code will happily call strlen() on it and then strscpy() where either one will cause an oops when accessing user space addresses. Use the helper functions from trace_kprobe and trace_eprobe that can read strings safely (and actually succeed when the address is from user space and the memory is mapped in). Now the above can show: packagekitd-1721 [000] ...2. 104.597170: open: file=/usr/lib/rpm/fileattrs/cmake.attr in:imjournal-978 [006] ...2. 104.599642: open: file=/var/lib/rsyslog/imjournal.state.tmp packagekitd-1721 [000] ...2. 104.626308: open: file=/usr/lib/rpm/fileattrs/debuginfo.attr
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2025-09-15
Last Modified
2025-11-25
Generated
2026-06-16
AI Q&A
2025-09-15
EPSS Evaluated
2026-06-14
NVD
Affected Vendors & Products
Showing 3 associated CPEs
Vendor Product Version / Range
linux linux_kernel From 5.15.160 (inc) to 5.16 (inc)
linux linux_kernel From 5.15.160 (inc) to 5.16 (inc)
linux linux_kernel From 5.15.160 (inc) to 5.16 (inc)
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-125 The product reads data past the end, or before the beginning, of the intended buffer.
Attack-Flow Graph
AI Quick Actions
Instant insights powered by AI
Executive Summary

This vulnerability in the Linux kernel's tracing subsystem involves improper handling of strings from synthetic events. Specifically, the synthetic event field "char file[]" reads a string value without validating the memory address, which can lead to the kernel calling strlen() and strscpy() on invalid user space addresses. This causes a crash (kernel oops) when accessing user space memory incorrectly. The fix involves using helper functions that safely read strings from user space memory.

Impact Analysis

This vulnerability can cause the Linux kernel to crash when certain tracing commands are executed, leading to a denial of service. An attacker or user with access to the tracing interface could exploit this to cause system instability or downtime by triggering the kernel crash.

Detection Guidance

This vulnerability can be detected by attempting to reproduce the crash using the commands that trigger the issue in the Linux kernel tracing subsystem. The commands to test are: cd /sys/kernel/tracing echo 's:open char file[]' > dynamic_events echo 'hist:keys=common_pid:file=filename:onchange($file).trace(open,$file)' > events/syscalls/sys_enter_openat/trigger echo 1 > events/synthetic/open/enable If these commands cause a kernel crash (oops), the system is vulnerable. The problem arises because the synthetic event field "char file[]" reads user space addresses without proper memory checks.

Mitigation Strategies

Immediate mitigation involves avoiding the use of synthetic events that read strings from user space without proper memory checks. Specifically, do not enable or create synthetic events that use the "char file[]" field as shown in the example commands. Additionally, update the Linux kernel to a version where this issue is fixed, which uses helper functions from trace_kprobe and trace_eprobe to safely read strings from user space memory.

Chat Assistant
Ask questions about this CVE
Hi! I’m here to help you understand CVE-2022-50255. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70
EPSS Chart