CVE-2021-47358

7.8 HIGH

📋 TL;DR

This CVE describes a use-after-free vulnerability in the Linux kernel's greybus UART driver. It allows attackers to potentially execute arbitrary code or cause denial of service by exploiting improper reference counting when user space holds a tty open indefinitely. Systems using affected Linux kernel versions with greybus UART functionality are vulnerable.

💻 Affected Systems

Products:
  • Linux kernel
Versions: Specific kernel versions with the vulnerable greybus UART driver code (check git commits for exact ranges)
Operating Systems: Linux distributions using affected kernel versions
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects systems with greybus UART functionality enabled/used. Greybus is typically for embedded/mobile systems.

📦 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 →

⚠️ Risk & Real-World Impact

🔴

Worst Case

Local privilege escalation to kernel-level code execution, potentially leading to complete system compromise.

🟠

Likely Case

Kernel panic or system crash causing denial of service.

🟢

If Mitigated

Limited impact with proper kernel hardening and minimal greybus usage.

🌐 Internet-Facing: LOW - Requires local access to exploit.
🏢 Internal Only: MEDIUM - Could be exploited by malicious local users or through lateral movement.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ✅ No
Complexity: MEDIUM

Requires local access and knowledge of greybus UART usage. No public exploits known.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Kernel versions with commits 4dc56951a8d9d61d364d346c61a5f1d70b4f5e14 and related fixes

Vendor Advisory: https://git.kernel.org/stable/c/4dc56951a8d9d61d364d346c61a5f1d70b4f5e14

Restart Required: Yes

Instructions:

1. Update Linux kernel to patched version. 2. Reboot system. 3. Verify kernel version post-reboot.

🔧 Temporary Workarounds

Disable greybus UART module

linux

Prevent loading of vulnerable greybus UART driver

echo 'blacklist gb-uart' >> /etc/modprobe.d/blacklist.conf
rmmod gb-uart

🧯 If You Can't Patch

  • Restrict local user access to systems with greybus functionality
  • Implement strict kernel module loading policies

🔍 How to Verify

Check if Vulnerable:

Check if greybus UART module is loaded: lsmod | grep gb-uart

Check Version:

uname -r

Verify Fix Applied:

Verify kernel version includes fix commits and greybus UART functions properly

📡 Detection & Monitoring

Log Indicators:

  • Kernel oops messages
  • System crashes related to tty or greybus

Network Indicators:

  • None - local exploit only

SIEM Query:

Search for kernel panic logs or unexpected system reboots on greybus-enabled systems

🔗 References

📤 Share & Export