HIGH Introduced in 5.7
mtd GluebiPartition TypeConfusion
CVE-2026-98833
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
01Description
In the Linux kernel, the following vulnerability has been resolved: mtd: core: call _get_device() with the master MTD __get_mtd_device() calls the master's _get_device() callback with mtd, which may be a partition. __put_mtd_device() passes the master. This breaks gluebi partitions because gluebi_get_device() uses container_of() and therefore requires the master MTD. Pass the master to _get_device(), matching _put_device().
02KernelScan AI Analysis
Risk summary
A local attacker with access to MTD character devices can trigger a type confusion in the gluebi driver by opening a partition, causing the kernel to compute an incorrect structure address via container_of(). This leads to memory corruption that can be exploited for privilege escalation or kernel crash. Systems using UBI/gluebi on MTD partitions (common in embedded devices) are at risk.
Vulnerability analysis
The MTD core's __get_mtd_device() function incorrectly passes a partition pointer to the master device's _get_device() callback, while the corresponding __put_mtd_device() correctly passes the master pointer. The gluebi driver's _get_device() callback uses container_of() on the received pointer expecting the master MTD structure; when a partition pointer is passed instead, the container_of() calculation yields an invalid gluebi structure address. Subsequent dereferences of this bogus pointer corrupt kernel memory. The fix aligns __get_mtd_device() with __put_mtd_device() by passing the master pointer. The vulnerability is reachable by any local process that can open an MTD partition backed by gluebi (typically requiring root or CAP_SYS_ADMIN, but potentially accessible to container workloads if the MTD device node is passed through or has permissive permissions).
Lifecycle
03Fix Versions
| Branch | Introduced | Fixed in | Patch commit |
|---|---|---|---|
| 5.15 | 5.7 | 5.15.224 | 522e821e4165 |
| 6.1 | 5.7 | 6.1.191 | e7e37358408b |
| 6.12 | 5.7 | 6.12.113 | 95c8f36293c2 |
| 6.18 | 5.7 | 6.18.56 | f971f1c63cf7 |
| 6.6 | 5.7 | 6.6.160 | d94731cafa57 |
| 7.2 | 5.7 | 7.2.10 | dc482a281a19 |
| mainline | 5.7 | 7.3 | 12b31d1acd20 |
| cip/6.12 | 5.7 | 6.12.114-cip34 | 95c8f36293c2 |
04CIP Kernels
State of the newest release of each Civil Infrastructure Platform SLTS tree, from CIP's own fix records.
| CIP tree | State |
|---|---|
| cip/6.12 | Fixed in 6.12.114-cip34 |
| cip/6.1 | Affected — no CIP fix yet (latest 6.1.190-cip62) |
| cip/6.1-rt | Affected — no CIP fix yet (latest 6.1.189-cip61-rt32) |
| cip/5.10 | Affected — no CIP fix yet (latest 5.10.272-cip79) |
| cip/5.10-rt | Affected — no CIP fix yet (latest 5.10.272-cip79-rt35) |