CVE-2024-56766

7.8 HIGH

📋 TL;DR

This CVE describes a double-free vulnerability in the Linux kernel's MTD (Memory Technology Device) subsystem, specifically in the atmel_pmecc_create_user() function. The vulnerability occurs when memory allocated with devm_kzalloc() is incorrectly freed with kfree(), potentially leading to memory corruption. Systems running affected Linux kernel versions with MTD/NAND support are at risk.

💻 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 MTD/NAND support and when using Atmel PMECC functionality. Embedded systems and IoT devices using NAND flash are particularly vulnerable.

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

⚠️ Risk & Real-World Impact

🔴

Worst Case

Kernel panic or system crash leading to denial of service, or potential privilege escalation if an attacker can manipulate the freed memory to execute arbitrary code.

🟠

Likely Case

System instability, crashes, or denial of service when the vulnerable code path is triggered during NAND operations.

🟢

If Mitigated

No impact if the vulnerable code path is not executed or if proper kernel hardening prevents exploitation.

🌐 Internet-Facing: LOW - This is a kernel-level vulnerability that typically requires local access or specific hardware interaction to trigger.
🏢 Internal Only: MEDIUM - Local users or processes with appropriate permissions could potentially trigger this vulnerability, leading to system instability.

🎯 Exploit Status

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

Exploitation requires triggering the specific code path in atmel_pmecc_create_user(), which may require specific hardware or driver configuration. Local access or ability to interact with NAND devices is typically needed.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Kernel versions containing the fix commits: 1562871ef613fa9492aa0310933eff785166a90e, 3d825a241e65f7e3072978729e79d735ec40b80e, 6ea15205d7e2b811fbbdf79783f686f58abfb4b7, ca9818554b0f33e87f38e4bfa2dac056692d46cc, d2f090ea57f8d6587e09d4066f740a8617767b3d

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

Restart Required: Yes

Instructions:

1. Update Linux kernel to a version containing the fix commits. 2. For distributions: Apply security updates from your vendor. 3. Rebuild and install kernel if compiling from source. 4. Reboot system to load patched kernel.

🔧 Temporary Workarounds

Disable MTD/NAND support

all

Remove or disable MTD and NAND support in kernel configuration if not required

# Reconfigure kernel without CONFIG_MTD and CONFIG_MTD_NAND options
# Rebuild and install kernel

🧯 If You Can't Patch

  • Restrict access to users who can trigger NAND operations
  • Implement kernel hardening features like KASLR and stack protection

🔍 How to Verify

Check if Vulnerable:

Check kernel version and configuration for MTD/NAND support. Examine kernel source for vulnerable atmel_pmecc_create_user() function.

Check Version:

uname -r

Verify Fix Applied:

Verify kernel version includes the fix commits. Check that the atmel_pmecc_create_user() function no longer contains the double-free code.

📡 Detection & Monitoring

Log Indicators:

  • Kernel panic messages
  • OOM (Out of Memory) errors
  • MTD/NAND driver error messages in dmesg

Network Indicators:

  • None - this is a local vulnerability

SIEM Query:

Search for kernel panic events or MTD/NAND error messages in system logs

🔗 References

📤 Share & Export