CVE-2024-36940

7.8 HIGH

📋 TL;DR

This CVE describes a double-free vulnerability in the Linux kernel's pinctrl subsystem. The pinctrl_enable() function incorrectly frees a devm-managed pointer that is already automatically freed by devm_pinctrl_dev_release(), potentially leading to memory corruption. This affects all Linux systems using vulnerable kernel versions with the pinctrl subsystem enabled.

💻 Affected Systems

Products:
  • Linux kernel
Versions: Specific affected versions not explicitly stated in CVE description; check kernel commit history for exact ranges.
Operating Systems: Linux distributions using vulnerable kernel versions
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects systems with pinctrl subsystem enabled (common on embedded and many server 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 →

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 privilege escalation if an attacker can trigger the double-free and control subsequent memory allocations.

🟠

Likely Case

System instability, kernel crashes, or denial of service when pinctrl operations are performed.

🟢

If Mitigated

No impact if the vulnerability is not triggered through pinctrl operations.

🌐 Internet-Facing: LOW - Requires local access or ability to execute code on the system.
🏢 Internal Only: MEDIUM - Local users or processes could potentially trigger the vulnerability.

🎯 Exploit Status

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

Exploitation requires triggering specific pinctrl operations and controlling memory layout; no public exploits known.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Kernel versions containing commits: 288bc4aa75f150d6f1ee82dd43c6da1b438b6068, 41f88ef8ba387a12f4a2b8c400b6c9e8e54b2cca, 5038a66dad0199de60e5671603ea6623eb9e5c79, 558c8039fdf596a584a92c171cbf3298919c448c, 735f4c6b6771eafe336404c157ca683ad72a040d

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

Restart Required: Yes

Instructions:

1. Update Linux kernel to patched version from your distribution vendor. 2. Reboot system to load new kernel.

🔧 Temporary Workarounds

Disable pinctrl subsystem

linux

Remove or disable pinctrl module if not required (may break hardware functionality)

modprobe -r pinctrl_core
echo 'blacklist pinctrl_core' > /etc/modprobe.d/blacklist-pinctrl.conf

🧯 If You Can't Patch

  • Restrict local user access to prevent untrusted users from triggering pinctrl operations
  • Implement strict process isolation and limit system calls that could trigger the vulnerability

🔍 How to Verify

Check if Vulnerable:

Check kernel version and compare with patched commits: uname -r and examine kernel source for vulnerable code

Check Version:

uname -r

Verify Fix Applied:

Verify kernel version includes the fix commits: grep -r 'pinctrl_enable' /usr/src/linux-source-*/drivers/pinctrl/core.c

📡 Detection & Monitoring

Log Indicators:

  • Kernel panic messages
  • Oops messages related to pinctrl or memory corruption
  • System crashes during pinctrl operations

Network Indicators:

  • None - local vulnerability only

SIEM Query:

source="kernel" AND ("pinctrl" OR "double free" OR "kernel panic")

🔗 References

📤 Share & Export