CVE-2022-50778
Linux Kernel vulnerability analysis and mitigation

Overview

CVE-2022-50778 is a vulnerability in the Linux kernel's FORTIFY_SOURCE implementation, specifically in the __compiletime_strlen() function when used alongside CONFIG_UBSAN_LOCAL_BOUNDS (UBSAN_BOUNDS_LOCAL). The flaw causes a runtime panic due to an out-of-bounds array access triggered when __builtin_object_size() returns the maximum size of a set of possible string values rather than the actual runtime string size, leading to an access beyond the end of a shorter string. It was published on December 24, 2025, and affects the Linux kernel. The CVSS category is estimated as Medium (Feedly).

Technical details

The root cause is an improper handling of __builtin_object_size() semantics within __compiletime_strlen() (CWE-125: Out-of-bounds Read). When CONFIG_FORTIFY_SOURCE=y and CONFIG_UBSAN_LOCAL_BOUNDS=y are both enabled, __compiletime_strlen() uses __builtin_object_size(str, 1) to determine string length, but for control-flow-dependent strings (e.g., those assigned in a switch statement), the compiler returns the maximum possible object size across all branches. This causes the subsequent NUL-termination check to access memory beyond the end of shorter strings at runtime, triggering a UBSAN local bounds fault. The issue was observed in hidinput_allocate() during Android CTS testing (android.hardware.input.cts.tests) (Feedly). Patches are available in the Linux kernel stable tree (Kernel Git).

Impact

Exploitation of this vulnerability results in a kernel runtime panic (denial of service) on systems with both CONFIG_FORTIFY_SOURCE and CONFIG_UBSAN_LOCAL_BOUNDS enabled. The out-of-bounds read in the FORTIFY string-length check can crash the kernel when processing HID input device initialization, affecting availability. There is no known direct path to privilege escalation or data exfiltration from this specific bug, making the primary impact a local denial of service on affected kernel configurations (Feedly).

Mitigation and workarounds

Apply the upstream Linux kernel patches that fix __compiletime_strlen() to correctly handle control-flow-dependent strings under UBSAN_LOCAL_BOUNDS. The fixes are available in the Linux stable tree at the following commits: 5d59ad2, d07c0acb, and ed42391. As a temporary workaround, disabling CONFIG_UBSAN_LOCAL_BOUNDS or CONFIG_FORTIFY_SOURCE in the kernel build configuration will prevent the panic, though this reduces security hardening. Distributions shipping kernels with both options enabled (common in Android and some hardened Linux builds) should prioritize applying the patch (Feedly).

Additional resources


SourceThis report was generated using AI

Related Linux Kernel vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-64557NONEN/A
  • Linux Kernel logoLinux Kernel
  • kernel-rt-selftests-internal
NoNoJul 29, 2026
CVE-2026-64556NONEN/A
  • Linux Kernel logoLinux Kernel
  • kernel-64k-devel
NoNoJul 29, 2026
CVE-2026-64555NONEN/A
  • Linux Kernel logoLinux Kernel
  • linux-azure-fde-6.14
NoNoJul 27, 2026
CVE-2026-64554NONEN/A
  • Linux Kernel logoLinux Kernel
  • linux-gcp-6.14
NoYesJul 27, 2026
CVE-2026-64553NONEN/A
  • Linux Kernel logoLinux Kernel
  • kernel-rt-64k-debug-modules-internal
NoYesJul 27, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management