Global Register Vulnerability in Linux Kernel - s390 Architecture
Summary
CVE-2022-49804: In the Linux kernel, the following vulnerability has been resolved: s390: avoid using global register for current_stack_pointer Commit 30de14b1884b ("s390: current_stack_pointer shouldn't be a function") made current_sta... Affects linux versions < 6.0.10-1. Fixed in 6.0.10-1. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
The Linux kernel is the core component of many operating systems, providing essential services for hardware and software interaction. It is highly modular and supports a wide range of architectures, including s390, which is designed for IBM's mainframe systems. The kernel is responsible for managing system resources, and its integrity is crucial for system stability and security. This vulnerability specifically affects the s390 architecture, where a change in the handling of the current stack pointer has led to potential stack corruption issues.
Vulnerability Detail
In the Linux kernel, a vulnerability was introduced when the current_stack_pointer was made a global register variable. This change, made in commit 30de14b1884b, revealed a long-standing bug in older versions of the GCC compiler, specifically versions prior to 8.4. These versions generate faulty code that can lead to stack corruptions, posing significant risks to system stability and security. The minimal GCC version required to build the kernel is declared as 5.1, but the issue cannot be fixed in all older GCC versions, necessitating a workaround.
How To Fix
Minimum fixed version
6.0.10-1
This is the first release that contains the fix.
sudo apt-get install --only-upgrade linux
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
As a workaround, avoid using the global register variable for current_stack_pointer in the kernel code. This is a temporary measure until the kernel can be updated to a version that resolves the issue.
Conclusion
The vulnerability CVE-2022-49804 in the Linux kernel for the s390 architecture poses significant risks due to stack corruption caused by older GCC versions. Users are advised to update their kernel to the patched version 6.0.10-1 or later to mitigate these risks. For those unable to update, a temporary workaround is available.
See every vulnerability recorded for linux →
FAQ
CVE-2022-49804 is a vulnerability in the Linux kernel affecting the s390 architecture, which can lead to stack corruption due to a bug in older GCC versions.
You can use Vulert, which monitors and alerts for open-source vulnerabilities in real-time. Check your application against this vulnerability using the Vulert playground at Vulert Scanner.
GCC versions prior to 8.4 are affected, as they generate broken code that can lead to stack corruption.
If you cannot update your GCC version, you should implement the workaround by avoiding the use of the global register variable for current_stack_pointer until you can upgrade.
Yes, the permanent fix is to update the Linux kernel to version 6.0.10-1 or later, which resolves the issue.
Related vulnerabilities
Recent vulnerabilities recorded for linux.