CVE-2026-90216: ubi: Fix rollback for explicit UBI device numbers
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
ubi: Fix rollback for explicit UBI device numbers
ubi_init_attach() rolls back module initialization failures by scanning ubi_devices[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 ubi_num. A successfully attached device can be stored at a higher ubi_devices[] slot, and a later failure can miss it during rollback.
Scan the full ubi_devices[] array and detach by the actual array index, matching the way UBI devices are stored.
The Linux kernel CVE team has assigned CVE-2026-90216 to this issue.
Affected and fixed versions
===========================
Issue introduced in 3.11 with commit 83ff59a066637a6c28844bbf43009459408240f4 and fixed in 5.10.270 with commit 83c978921688af40dcab6db74882d1ff9b0b765c Issue introduced in 3.11 with commit 83ff59a066637a6c28844bbf43009459408240f4 and fixed in 5.15.221 with commit 6b92e66ec6dd8019e8efb2a568ef7c967c5a18c5 Issue introduced in 3.11 with commit 83ff59a066637a6c28844bbf43009459408240f4 and fixed in 6.1.188 with commit 4417ab6ecad01cf2d01045ef8104c95a66b0e893 Issue introduced in 3.11 with commit 83ff59a066637a6c28844bbf43009459408240f4 and fixed in 6.6.157 with commit 552e565ed8846e7db143e4a6bdf3f5677453c686 Issue introduced in 3.11 with commit 83ff59a066637a6c28844bbf43009459408240f4 and fixed in 6.12.110 with commit 9754f049d5f1945d4c691d1f52824eb8daf8f9be Issue introduced in 3.11 with commit 83ff59a066637a6c28844bbf43009459408240f4 and fixed in 6.18.52 with commit e3f7e58189bc222971ddc860f1716f37e51ba996 Issue introduced in 3.11 with commit 83ff59a066637a6c28844bbf43009459408240f4 and fixed in 7.2.6 with commit 87b3da4acb860605643ebee312178f13b20744cf Issue introduced in 3.11 with commit 83ff59a066637a6c28844bbf43009459408240f4 and fixed in 7.3-rc1 with commit 5b0a6b554e12a97f9771a9a9f4ea1f5457373c73
Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.
Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at
https://cve.org/CVERecord/?id=CVE-2026-90216
will be updated if fixes are backported, please check that for the most up to date information about this issue.
Affected files
==============
The file(s) affected by this issue are:
drivers/mtd/ubi/build.c
Mitigation
==========
The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:
https://git.kernel.org/stable/c/83c978921688af40dcab6db74882d1ff9b0b765c https://git.kernel.org/stable/c/6b92e66ec6dd8019e8efb2a568ef7c967c5a18c5 https://git.kernel.org/stable/c/4417ab6ecad01cf2d01045ef8104c95a66b0e893 https://git.kernel.org/stable/c/552e565ed8846e7db143e4a6bdf3f5677453c686 https://git.kernel.org/stable/c/9754f049d5f1945d4c691d1f52824eb8daf8f9be https://git.kernel.org/stable/c/e3f7e58189bc222971ddc860f1716f37e51ba996 https://git.kernel.org/stable/c/87b3da4acb860605643ebee312178f13b20744cf https://git.kernel.org/stable/c/5b0a6b554e12a97f9771a9a9f4ea1f5457373c73