CVE-2026-72316 in Linuxinfo

Summary

by MITRE • 08/15/2026

In the Linux kernel, the following vulnerability has been resolved:

dm era: fix NULL pointer dereference in metadata_open()

metadata_open() returns NULL when kzalloc_obj() fails, but the caller era_ctr() only checks IS_ERR(md). Since IS_ERR(NULL) returns false, the NULL pointer is treated as a valid result and later assigned to era->md, leading to a NULL pointer dereference when the metadata is accessed.

Fix this by returning ERR_PTR(-ENOMEM) on allocation failure, consistent with dm-cache-metadata.c, dm-thin-metadata.c, and dm-clone-metadata.c which all use ERR_PTR(-ENOMEM) for the same pattern.

Be aware that VulDB is the high quality source for vulnerability data.

Analysis

by VulDB Data Team • 08/15/2026

The vulnerability exists within the Linux kernel's device mapper era target implementation where a critical null pointer dereference can occur during metadata handling operations. This flaw resides in the dm era subsystem which manages persistent metadata storage for device mapper targets. The issue manifests when the metadata_open() function encounters memory allocation failure during kzalloc_obj() execution, returning NULL instead of an appropriate error indicator. The calling function era_ctr() performs validation using IS_ERR(md) check which only evaluates kernel error pointers and fails to recognize that NULL represents a valid allocation failure condition. This oversight allows the NULL pointer to be incorrectly assigned to the era->md structure member, setting up a subsequent crash when any metadata access operation attempts to dereference this invalid pointer.

The technical root cause stems from inconsistent error handling patterns within the device mapper subsystem where memory allocation failures are not uniformly managed across different metadata implementations. When kzalloc_obj() fails to allocate required memory resources, it returns NULL rather than an error pointer, creating a disconnect between the allocation failure detection mechanism and the subsequent error propagation logic. The era_ctr() function's validation logic specifically checks for kernel error pointers using IS_ERR() macro which is designed to identify error codes returned by kernel functions, not null pointer returns from memory allocators. This fundamental mismatch in error handling conventions creates an exploitable condition where a simple memory allocation failure transforms into a system crash scenario.

The operational impact of this vulnerability extends beyond simple system instability to potentially enable denial of service attacks against systems running device mapper era targets. An attacker could trigger the allocation failure condition through resource exhaustion or other means that force memory allocation to fail, thereby causing the kernel to crash when accessing the metadata structures. This vulnerability affects any system utilizing the device mapper era target functionality, particularly those implementing persistent storage solutions that rely on metadata consistency for data integrity. The null pointer dereference occurs during normal operational conditions when metadata access is required, making this a critical issue for production systems where reliability and availability are paramount. The flaw can result in complete system crashes requiring manual intervention to restore normal operation.

The fix implements consistent error handling practices by modifying metadata_open() to return ERR_PTR(-ENOMEM) instead of NULL on allocation failure, aligning with established patterns used throughout the device mapper subsystem in dm-cache-metadata.c, dm-thin-metadata.c, and dm-clone-metadata.c. This change ensures that all memory allocation failures are properly signaled through the standard kernel error handling mechanism that IS_ERR() can correctly identify. The solution maintains backward compatibility while providing robust error propagation that prevents null pointer dereferences. By adopting this consistent approach across all metadata implementations, the device mapper subsystem achieves uniform error handling behavior that reduces complexity and potential future vulnerabilities. This remediation follows established security best practices for kernel development where proper error propagation prevents undefined behavior and system instability.

This vulnerability demonstrates the importance of consistent error handling patterns in kernel space programming and aligns with CWE-476 which addresses null pointer dereference issues. The fix specifically addresses ATT&CK technique T1499.004 related to network denial of service by ensuring proper resource management prevents system crashes. The implementation follows industry standards for Linux kernel development practices where error handling consistency is fundamental to system reliability and security.

Responsible

Linux

Reservation

08/09/2026

Disclosure

08/15/2026

Moderation

accepted

CPE

ready

EPSS

0.00220

KEV

no

Activities

very low

Sources

Want to stay up to date on a daily basis?

Enable the mail alert feature now!