CVE-2022-50812 security: Restrict CONFIG_ZERO_CALL_USED_REGS to gcc or clang > 15.0.6
A bug in clang's zero-call-used-regs feature causes NULL pointer dereferences in the Linux kernel, leading to potential denial of service.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Not stated
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2022-50812?
CVE-2022-50812 is a vulnerability in Linux, published on 30 Dec 2025.
Official description
In the Linux kernel, the following vulnerability has been resolved:
security: Restrict CONFIG_ZERO_CALL_USED_REGS to gcc or clang > 15.0.6
A bad bug in clang's implementation of -fzero-call-used-regs can result in NULL pointer dereferences (see the links above the check for more information). Restrict CONFIG_CC_HAS_ZERO_CALL_USED_REGS to either a supported GCC version or a clang newer than 15.0.6, which will catch both a theoretical 15.0.7 and the upcoming 16.0.0, which will both have the bug fixed.
Which versions are affected by CVE-2022-50812?
How do I fix CVE-2022-50812?
Apply the vendor's patch.
Is CVE-2022-50812 being exploited?
There is no known exploitation of CVE-2022-50812 in the wild and no public exploit code.
Sources
Also known as DEBIAN-CVE-2022-50812, GHSA-r8mh-3p67-p8fm, UBUNTU-CVE-2022-50812.