CVE-2026-139050: mtd: rawnand: ndfc: use devm_platform_ioremap_resource()
In the Linux kernel, the following vulnerability has been resolved:
mtd: rawnand: ndfc: use devmplatformioremapresource()
Replace the open-coded ofiomap()/iounmap() with the managed devmplatformioremapresource() 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 ndfcprobe().
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 requestmemregion() cannot conflict with an existing reservation. Distinct chip selects map to distinct 64-bit physical addresses, so CS instances do not overlap.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
Replace the open-coded of_iomap()/iounmap() mapping in the NDFC driver with devm_platform_ioremap_resource().
Event History
Frequently Asked Questions
When does the resource leak occur?
The leak occurs when the NDFC driver is removed, because the previous implementation mapped the register resource but did not call iounmap() during removal.
Does the change create a risk of conflicting memory-region reservations?
No. Supported board device trees define one NDFC node with a unique 0x2000 register region, while the EBC parent uses dcr-reg rather than a MEM resource. Separate chip-select instances also use distinct 64-bit physical addresses.
What component needs to be present for this issue to be relevant?
The issue is relevant to Linux kernel deployments using the MTD raw NAND NDFC driver. The described behavior specifically concerns that driver's register mapping and removal path.