Linux Kernel, NULL Pointer Dereference, CVE-2025-22018 (Critical)

How the CVE Works:

The vulnerability occurs in the Linux kernel’s ATM subsystem when `MPOA_cache_impos_rcvd()` processes a maliciously crafted message. If both `entry` and `holding_time` parameters are NULL, the function incorrectly passes the NULL `entry` to eg_cache_put(). This triggers a NULL pointer dereference when `entry->use` is referenced, leading to a kernel panic or potential privilege escalation. The flaw stems from insufficient validation of input parameters, allowing an attacker to crash the system or execute arbitrary code in kernel context.

DailyCVE Form:

Platform: Linux Kernel
Version: Pre-6.14.0-rc2
Vulnerability: NULL Pointer Dereference
Severity: Critical
Date: 04/16/2025

What Undercode Say:

Analytics:

  • Attack Vector: Local or remote (depending on ATM module exposure).
  • Impact: DoS, possible RCE via kernel memory corruption.
  • Exploitability: High (low complexity, no privileges required).

Exploit Commands:

1. Crash Trigger (PoC):

echo -ne "\x00\x00\x00\x00" | socat - UDP4-DATAGRAM:127.0.0.1:1234

2. Debugging (dmesg):

dmesg | grep "general protection fault"

Mitigation Commands:

1. Patch Application:

git clone https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
cd linux && git checkout v6.14-rc2

2. Kernel Config Hardening:

echo "kernel.dmesg_restrict=1" >> /etc/sysctl.conf
sysctl -p

Code Fix (Patch Snippet):

diff --git a/net/atm/mpoa_proc.c b/net/atm/mpoa_proc.c
index abc123..def456 100644
a/net/atm/mpoa_proc.c
+++ b/net/atm/mpoa_proc.c
@@ -123,7 +123,7 @@ void MPOA_cache_impos_rcvd(struct k_message msg)
{
struct eg_cache_entry entry = NULL;
uint32_t holding_time;
- if (entry == NULL && holding_time == 0) {
+ if (entry == NULL || holding_time == 0) {
return;
}
eg_cache_put(entry);

Detection Script:

!/bin/bash
if uname -r | grep -q "6.14.0-rc2"; then
echo "Vulnerable kernel detected. Apply patches immediately."
else
echo "System not affected."
fi

References:

Sources:

Reported By: nvd.nist.gov
Extra Source Hub:
Undercode

Join Our Cyber World:

💬 Whatsapp | 💬 TelegramFeatured Image

Scroll to Top