CVE-2022-50474

5.5 MEDIUM

📋 TL;DR

This is a memory leak vulnerability in the Linux kernel's macintosh subsystem. When device registration fails in macio_add_one_device(), dynamically allocated device names aren't properly freed, leading to gradual memory exhaustion. This affects systems using PowerPC-based Apple hardware with Linux kernels containing the vulnerable code.

💻 Affected Systems

Products:
  • Linux kernel
Versions: Specific vulnerable kernel versions between the introduction of the bug and its fix; exact range depends on distribution backports.
Operating Systems: Linux distributions running on PowerPC-based Apple hardware (PowerMac, iMac G5, etc.)
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects systems with CONFIG_PPC_PMAC enabled (PowerPC Apple hardware support). Most modern x86 systems are not affected.

📦 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

Sustained exploitation could cause kernel memory exhaustion leading to system instability, crashes, or denial of service requiring reboot.

🟠

Likely Case

Gradual memory consumption over time causing performance degradation, potentially leading to system instability if triggered repeatedly.

🟢

If Mitigated

Minimal impact with proper monitoring and memory limits in place; system remains functional but may experience performance issues.

🌐 Internet-Facing: LOW - Requires local access or ability to trigger the specific device registration failure scenario.
🏢 Internal Only: MEDIUM - Could be exploited by local users or through other vulnerabilities to degrade system performance.

🎯 Exploit Status

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

Exploitation requires triggering device registration failures in the macio subsystem, which typically requires local access or specific hardware conditions.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Kernel versions containing commit 19ded60b40e86b0903c8d5bd0161437ed5107a8b or later

Vendor Advisory: https://git.kernel.org/stable/c/19ded60b40e86b0903c8d5bd0161437ed5107a8b

Restart Required: Yes

Instructions:

1. Update Linux kernel to patched version from your distribution. 2. For custom kernels, apply commit 19ded60b40e86b0903c8d5bd0161437ed5107a8b. 3. Reboot system to load new kernel.

🔧 Temporary Workarounds

Disable macintosh subsystem

linux

Remove macintosh device support if not needed on PowerPC Apple hardware

echo "blacklist macintosh" >> /etc/modprobe.d/blacklist.conf
update-initramfs -u

🧯 If You Can't Patch

  • Implement memory usage monitoring and alerts for kernel memory exhaustion
  • Restrict local user access to systems running vulnerable kernels

🔍 How to Verify

Check if Vulnerable:

Check kernel version and CONFIG_PPC_PMAC setting: uname -r && grep CONFIG_PPC_PMAC /boot/config-$(uname -r)

Check Version:

uname -r

Verify Fix Applied:

Verify kernel version is patched: uname -r should be newer than vulnerable versions with the fix backported

📡 Detection & Monitoring

Log Indicators:

  • Kernel oom-killer messages
  • System memory exhaustion warnings in dmesg
  • Repeated device registration failures

Network Indicators:

  • None - local vulnerability only

SIEM Query:

source="kernel" AND ("out of memory" OR "oom-killer" OR "macio" AND "failed")

🔗 References

📤 Share & Export