CVE-2026-139050

mtd: rawnand: ndfc: use devm_platform_ioremap_resource()

Published Nov 30, 2026 CVSS n/a EPSS n/a KEV · Not listed
Description
In the Linux kernel, the following vulnerability has been resolved:

mtd: rawnand: ndfc: use devm_platform_ioremap_resource()

Replace the open-coded of_iomap()/iounmap() with the managed
devm_platform_ioremap_resource() helper. This fixes a mapping leak on
driver remove (the old code never called iounmap()) and simplifies the
error path by dropping the manual cleanup in ndfc_probe().

There is no overlapping memory-region concern introduced by this
change: each supported board DT describes a single ndfc node with a
unique 0x2000 register region, and the EBC parent uses dcr-reg rather
than a MEM reg resource, so the newly added request_mem_region() cannot
conflict with an existing reservation. Distinct chip selects map to
distinct 64-bit physical addresses, so CS instances do not overlap.

Analysis

AI-generated

Technical impact

The vulnerability arises from the NDFC raw NAND driver in the Linux kernel, which used manual mapping via ioremap and did not unmap the resource during driver removal. This oversight caused a memory‑mapped I/O region to remain allocated after the driver was unloaded, leading to a resource leak. If the driver is repeatedly loaded and removed, the system could gradually exhaust available memory‑mapped I/O resources, potentially destabilizing the kernel or causing a denial of service.

Affected Systems

The issue affects all Linux kernel builds that include the NDFC driver before the fix, regardless of specific architecture, as the driver is part of the common kernel tree. Boards described in the device tree with a single 0x2000 register region for the NDFC node are impacted, but distinct chip selects map to separate 64‑bit physical addresses, so the leak is confined to the resources requested by each instance. Users of distributions running kernels from 6.1 or earlier without the patch are vulnerable.

Risk and Exploitability

The CVSS score is not provided and EPSS data is unavailable, but the vulnerability is unlikely to be widely exploited because it requires privileged kernel module loading and repeated removal to accumulate a leak. The vulnerability is not listed in CISA’s KEV catalog, indicating no known active exploitation. However, an attacker with local or kernel privileges could intentionally trigger the leak to degrade system stability or exhaust memory resources. Administrators should treat it as a moderate risk that can lead to denial of service.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade to a kernel version that contains the commit that replaces ioremap with devm_platform_ioremap_resource in the NDFC driver.
  • If a kernel upgrade is not immediately possible, apply the upstream patch from commit 02def76d9efddae77e63299652f2f63ff8355450 to your local kernel source, rebuild the module, and load the patched driver.
  • If the NDFC device is unnecessary, blacklist or disable the driver module to avoid accidental load.
  • As a temporary containment measure, avoid repeatedly loading and unloading the NDFC driver; if removal is required, reboot the system to clear the leaked memory region.

Generated by OpenCVE AI on November 30, 2026 at 19:05 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Weaknesses CWE-775
Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: mtd: rawnand: ndfc: use devm_platform_ioremap_resource() Replace the open-coded of_iomap()/iounmap() with the managed devm_platform_ioremap_resource() helper. This fixes a mapping leak on driver remove (the old code never called iounmap()) and simplifies the error path by dropping the manual cleanup in ndfc_probe(). There is no overlapping memory-region concern introduced by this change: each supported board DT describes a single ndfc node with a unique 0x2000 register region, and the EBC parent uses dcr-reg rather than a MEM reg resource, so the newly added request_mem_region() cannot conflict with an existing reservation. Distinct chip selects map to distinct 64-bit physical addresses, so CS instances do not overlap.
Title mtd: rawnand: ndfc: use devm_platform_ioremap_resource()
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References
Weaknesses
  • CWE-775

    Missing Release of File Descriptor or Handle after Effective Lifetime

Sources

Status
PUBLISHED
Assigner
Linux
Published
Updated
Nov 30, 2026, 1:27 PM
Reserved
Nov 30, 2026, 1:22 PM
Status
Received
Published
Nov 30, 2026, 2:18 PM
Modified
Nov 30, 2026, 2:18 PM