CVE-2022-50255 tracing: Fix reading strings from synthetic events

High 7.8 Published Updated

A local attacker can crash the Linux kernel by triggering a null pointer dereference in synthetic event tracing when reading user-space strings.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2022-50255?

CVE-2022-50255 is a high-severity vulnerability in Linux kernel, published on 15 Sep 2025. It can only be exploited from the same machine or local network, with no action from the victim.

Official 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

Weakness: CWE-125

Which versions are affected by CVE-2022-50255?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2022-50255?

Apply the vendor's patch.

Is CVE-2022-50255 being exploited?

There is no known exploitation of CVE-2022-50255 in the wild and no public exploit code.

All Linux kernel vulnerabilities

Sources

Also known as DEBIAN-CVE-2022-50255, GHSA-h4gq-9hmg-w96x, ROOT-OS-DEBIAN-11-CVE-2022-50255, UBUNTU-CVE-2022-50255.

Is CVE-2022-50255 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free