{"id":"CVE-2022-50255","summary":"tracing: Fix reading strings from synthetic events","details":"In the Linux kernel, the following vulnerability has been resolved:\n\ntracing: Fix reading strings from synthetic events\n\nThe follow commands caused a crash:\n\n  # cd /sys/kernel/tracing\n  # echo 's:open char file[]' \u003e dynamic_events\n  # echo 'hist:keys=common_pid:file=filename:onchange($file).trace(open,$file)' \u003e events/syscalls/sys_enter_openat/trigger'\n  # echo 1 \u003e events/synthetic/open/enable\n\nBOOM!\n\nThe problem is that the synthetic event field \"char file[]\" will read\nthe value given to it as a string without any memory checks to make sure\nthe address is valid. The above example will pass in the user space\naddress and the sythetic event code will happily call strlen() on it\nand then strscpy() where either one will cause an oops when accessing\nuser space addresses.\n\nUse the helper functions from trace_kprobe and trace_eprobe that can\nread strings safely (and actually succeed when the address is from user\nspace and the memory is mapped in).\n\nNow the above can show:\n\n     packagekitd-1721    [000] ...2.   104.597170: open: file=/usr/lib/rpm/fileattrs/cmake.attr\n    in:imjournal-978     [006] ...2.   104.599642: open: file=/var/lib/rsyslog/imjournal.state.tmp\n     packagekitd-1721    [000] ...2.   104.626308: open: file=/usr/lib/rpm/fileattrs/debuginfo.attr","modified":"2026-04-11T12:44:54.833850Z","published":"2025-09-15T14:02:37.224Z","related":["SUSE-SU-2025:03615-1","SUSE-SU-2025:03628-1","SUSE-SU-2025:3716-1","SUSE-SU-2025:3761-1"],"database_specific":{"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50255.json","cna_assigner":"Linux"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/0934ae9977c27133449b6dd8c6213970e7eece38"},{"type":"WEB","url":"https://git.kernel.org/stable/c/149198d0b884e4606ed1d29b330c70016d878276"},{"type":"WEB","url":"https://git.kernel.org/stable/c/d9c79fbcbdb6cb10c07c85040eaf615180b26c48"},{"type":"WEB","url":"https://git.kernel.org/stable/c/f8bae1853196b52ede50950387f5b48cf83b9815"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50255.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-50255"},{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"bd82631d7ccdc894af2738e47abcba2cb6e7dea9"},{"fixed":"d9c79fbcbdb6cb10c07c85040eaf615180b26c48"},{"fixed":"149198d0b884e4606ed1d29b330c70016d878276"},{"fixed":"f8bae1853196b52ede50950387f5b48cf83b9815"},{"fixed":"0934ae9977c27133449b6dd8c6213970e7eece38"}]}],"database_specific":{"source":"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2022-50255.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"5.10.0"},{"fixed":"5.15.75"}]},{"type":"ECOSYSTEM","events":[{"introduced":"5.16.0"},{"fixed":"5.19.17"}]},{"type":"ECOSYSTEM","events":[{"introduced":"5.20.0"},{"fixed":"6.0.3"}]}],"database_specific":{"source":"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2022-50255.json"}}],"schema_version":"1.7.5"}