CVE-2022-50378

7.8 HIGH

📋 TL;DR

This is a use-after-free vulnerability in the Linux kernel's DRM subsystem for Amlogic Meson display drivers. When unloading the driver (e.g., during rmmod), improper cleanup order causes the kernel to access freed memory, potentially leading to system crashes or kernel memory corruption. Systems using affected Amlogic hardware with vulnerable kernel versions are affected.

💻 Affected Systems

Products:
  • Linux kernel with Amlogic Meson DRM driver
Versions: Linux kernel versions before fixes in stable releases (specific commits: 31c519981eb141c7ec39bfd5be25d35f02edb868, 9190d287f7a6b02b50b510045b0edf448ed68e88, 9d33348513c36337f91f1991da23f41514d4de39, d76ff04a72f90767455059c8239b06042cd0ed23)
Operating Systems: Linux distributions using affected kernel versions
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects systems with Amlogic hardware using the meson_drm driver. Requires the driver to be loaded and unloaded.

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

⚠️ Risk & Real-World Impact

🔴

Worst Case

Kernel panic, system crash, or potential privilege escalation if an attacker can trigger the driver unload and manipulate freed memory structures.

🟠

Likely Case

System instability or crash when unloading the affected display driver module, requiring reboot.

🟢

If Mitigated

No impact if the vulnerable driver isn't loaded or if patched kernel is used.

🌐 Internet-Facing: LOW - Requires local access to trigger driver unload.
🏢 Internal Only: MEDIUM - Local users with module loading/unloading privileges could trigger crashes.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ✅ No
Complexity: MEDIUM - Requires local access and ability to unload kernel modules.

Exploitation requires CAP_SYS_MODULE or root privileges to trigger driver unload. The vulnerability is triggered during normal driver cleanup.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Linux kernel with fixes from the referenced commits

Vendor Advisory: https://git.kernel.org/stable/c/31c519981eb141c7ec39bfd5be25d35f02edb868

Restart Required: Yes

Instructions:

1. Update to a patched Linux kernel version from your distribution. 2. For custom kernels, apply the fix commits to the drm/meson driver. 3. Reboot the system after kernel update.

🔧 Temporary Workarounds

Prevent driver unloading

linux

Prevent unloading of the meson_drm driver module to avoid triggering the vulnerability.

echo 'install meson_drm /bin/false' >> /etc/modprobe.d/blacklist-meson.conf

Restrict module loading

linux

Restrict kernel module loading to authorized users only.

sysctl -w kernel.modules_disabled=1
echo 'kernel.modules_disabled=1' >> /etc/sysctl.conf

🧯 If You Can't Patch

  • Restrict module loading/unloading to root only using kernel.modules_disabled or capabilities
  • Monitor for driver unload attempts and system crashes

🔍 How to Verify

Check if Vulnerable:

Check if meson_drm driver is loaded: lsmod | grep meson_drm. Check kernel version: uname -r and compare with patched versions.

Check Version:

uname -r

Verify Fix Applied:

Verify kernel version is updated beyond vulnerable versions. Test unloading driver (if safe): rmmod meson_drm (should not crash).

📡 Detection & Monitoring

Log Indicators:

  • Kernel panic messages
  • KASAN use-after-free warnings in dmesg
  • Driver unload events in system logs

Network Indicators:

  • None - local vulnerability

SIEM Query:

source="kernel" AND ("KASAN" OR "use-after-free" OR "meson_drm")

🔗 References

📤 Share & Export