CVE-2026-90216: ubi: Fix rollback for explicit UBI device numbers
In the Linux kernel, the following vulnerability has been resolved:
ubi: Fix rollback for explicit UBI device numbers
ubiinitattach() rolls back module initialization failures by scanning ubidevices[0..i-1], where i is the mtd= parameter index. That assumes the parameter index matches the UBI device number.
That assumption is not true when mtd= specifies an explicit ubinum. A successfully attached device can be stored at a higher ubidevices[] slot, and a later failure can miss it during rollback.
Scan the full ubidevices[] array and detach by the actual array index, matching the way UBI devices are stored.
Frequently Asked Questions
Which systems are exposed to this rollback failure?
Systems are exposed when UBI initialization uses mtd= parameters with explicit UBI device numbers and a later initialization step fails. The issue arises because an attached device may be stored in a higher ubi_devices[] slot than its mtd= parameter index.
What condition is required to trigger the issue?
A UBI device must attach successfully using an explicit ubi_num, followed by a module initialization failure. The rollback path can then fail to find and detach the previously attached device.
What should be checked after an initialization failure?
Check whether UBI devices attached before the failure remain present, particularly devices assigned explicit UBI numbers. The affected rollback logic scanned only a range based on parameter position rather than all ubi_devices[] slots.