CVE-2022-49804

7.8 HIGH

📋 TL;DR

A compiler bug in older GCC versions (before 8.4) causes the Linux kernel on s390 architecture to generate corrupted stack pointer code, leading to stack corruption vulnerabilities. This affects Linux systems running on IBM s390/s390x mainframe architecture with vulnerable GCC toolchains. Attackers could potentially exploit this to crash systems or execute arbitrary code.

💻 Affected Systems

Products:
  • Linux Kernel
Versions: Kernel versions with commit 30de14b1884b up to patches a478952a8ac4/e3c11025bcd2
Operating Systems: Linux distributions running on s390/s390x architecture
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects systems compiled with GCC versions older than 8.4 (specifically GCC < 8.4, < 9.1). Modern distributions typically use newer compilers.

📦 What is this software?

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

⚠️ Risk & Real-World Impact

🔴

Worst Case

Kernel panic, system crash, or potential arbitrary code execution with kernel privileges leading to complete system compromise.

🟠

Likely Case

System instability, crashes, or denial of service due to stack corruption during normal kernel operations.

🟢

If Mitigated

Minimal impact if using GCC 8.4+ or patched kernel versions; systems remain stable with proper compiler toolchains.

🌐 Internet-Facing: LOW - Requires local access or kernel-level compromise; not directly exploitable over network.
🏢 Internal Only: MEDIUM - Could be exploited by malicious local users or through other kernel vulnerabilities to escalate privileges.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ✅ No
Complexity: HIGH - Requires specific compiler conditions and s390 architecture; not trivial to weaponize.

Exploitation depends on triggering the compiler bug during kernel compilation, making reliable exploitation difficult.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Kernel commits a478952a8ac44e32316dc046a063a7dc34825aa6 and e3c11025bcd2142a61abe5806b2f86a0e78118df

Vendor Advisory: https://git.kernel.org/stable/c/a478952a8ac44e32316dc046a063a7dc34825aa6

Restart Required: Yes

Instructions:

1. Update Linux kernel to version containing fixes a478952a8ac4/e3c11025bcd2. 2. Recompile kernel if using custom builds. 3. Reboot system to load patched kernel.

🔧 Temporary Workarounds

Use GCC 8.4+ for kernel compilation

linux

Ensure kernel compilation uses GCC version 8.4 or later where the compiler bug is fixed.

gcc --version
export CC=gcc-8.4
make CC=gcc-8.4

🧯 If You Can't Patch

  • Ensure all kernel builds use GCC 8.4 or newer toolchains
  • Restrict local user access and monitor for kernel panic/crash events

🔍 How to Verify

Check if Vulnerable:

Check kernel version and GCC compiler version used for compilation: uname -r and review kernel build logs for GCC version.

Check Version:

uname -r

Verify Fix Applied:

Verify kernel includes fix commits: grep -r 'a478952a8ac4\|e3c11025bcd2' /usr/src/linux-headers-$(uname -r)/

📡 Detection & Monitoring

Log Indicators:

  • Kernel panic messages
  • Stack corruption errors in dmesg
  • System crashes/reboots

SIEM Query:

source="kernel" AND ("panic" OR "stack corruption" OR "Oops")

🔗 References

📤 Share & Export