CVE-2025-21661

5.5 MEDIUM

📋 TL;DR

A memory leak vulnerability in the Linux kernel's GPIO virtuser driver prevents proper cleanup of lookup tables when device creation fails. This causes resource exhaustion over time and blocks subsequent device creation attempts. Systems using GPIO virtuser devices via configfs are affected.

💻 Affected Systems

Products:
  • Linux kernel
Versions: Kernel versions with gpio-virtuser driver before fixes in commits a619cba8c69c434258ff4101d463322cd63e1bdc and d72d0126b1f6981f6ce8b4247305f359958c11b5
Operating Systems: Linux distributions using affected kernel versions
Default Config Vulnerable: ✅ No
Notes: Only vulnerable if gpio-virtuser driver is loaded and used via configfs. Not enabled by default in most distributions.

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

⚠️ Risk & Real-World Impact

🔴

Worst Case

Kernel memory exhaustion leading to system instability, crashes, or denial of service preventing GPIO virtuser device creation.

🟠

Likely Case

Gradual memory leak causing performance degradation over time and inability to create GPIO virtuser devices after failed attempts.

🟢

If Mitigated

Minimal impact with proper monitoring and memory limits in place.

🌐 Internet-Facing: LOW - This is a local kernel driver issue requiring local access.
🏢 Internal Only: MEDIUM - Could affect systems using GPIO virtualization in containerized or virtualized environments.

🎯 Exploit Status

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

Requires local access and ability to create/configure GPIO virtuser devices. Exploitation leads to resource exhaustion rather than privilege escalation.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Kernel versions containing commits a619cba8c69c434258ff4101d463322cd63e1bdc and d72d0126b1f6981f6ce8b4247305f359958c11b5

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

Restart Required: Yes

Instructions:

1. Update Linux kernel to patched version from your distribution vendor. 2. Reboot system to load new kernel. 3. Verify gpio-virtuser driver is not leaking memory with kmemleak monitoring.

🔧 Temporary Workarounds

Disable gpio-virtuser module

linux

Prevent loading of vulnerable driver if not needed

echo 'blacklist gpio_virtuser' > /etc/modprobe.d/blacklist-gpio-virtuser.conf
rmmod gpio_virtuser

Restrict configfs access

linux

Limit who can create GPIO virtuser devices

chmod 750 /sys/kernel/config/gpio-virtuser
setfacl -m u:root:rwx,g:gpio:rx,o:- /sys/kernel/config/gpio-virtuser

🧯 If You Can't Patch

  • Monitor kernel memory usage and restart system if leaks are detected
  • Disable GPIO virtuser functionality if not required for system operation

🔍 How to Verify

Check if Vulnerable:

Check if gpio-virtuser module is loaded: lsmod | grep gpio_virtuser. Check kernel version: uname -r and compare with patched versions.

Check Version:

uname -r

Verify Fix Applied:

After patching, test GPIO virtuser device creation via configfs and monitor for memory leaks with kmemleak.

📡 Detection & Monitoring

Log Indicators:

  • Kernel oom-killer messages
  • Memory allocation failures in dmesg
  • GPIO virtuser probe failure messages

Network Indicators:

  • None - local vulnerability only

SIEM Query:

source="kernel" AND ("gpio_virtuser" OR "out of memory" OR "kmemleak")

🔗 References

📤 Share & Export