HIGH Introduced in 5.2
mtd AFSV2 OOB
CVE-2026-89954
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:H
KernelScan AI6.1MEDIUM
01Description
In the Linux kernel, the following vulnerability has been resolved: mtd: afs: validate v2 image info bounds The AFS v2 parser uses footer[8] to locate the image information block inside the current erase block, then uses the image information region_count to walk entries from a fixed local array. The footer offset and region count come from flash contents and are not checked against the erase block or the local image-info array before use. Reject v2 entries whose image information offset would underflow the erase block calculation, and reject region counts that cannot fit in the local image-info array before walking region entries.
02KernelScan AI Analysis
Risk summary
An attacker who can place a crafted image on a device's MTD flash can trigger out-of-bounds reads in the kernel's AFS v2 partition parser, potentially leaking kernel stack data or crashing the system. The vulnerability is exploitable at boot when the parser probes the flash, requiring physical access to the flash chip or a reflashing interface. Embedded and bare-metal appliances with NOR/NAND flash are primarily at risk.
Vulnerability analysis
The AFS v2 flash partition parser trusts two values read directly from flash contents — an image information offset stored in the footer and a region count stored in the image information block — without checking them against the erase block size or the size of a fixed local array. A crafted flash image can set the offset large enough to underflow the erase block calculation, or set the region count to exceed the array bounds, causing the kernel to read beyond a stack-local buffer. This can leak kernel stack data or crash the kernel with a page fault. The fix adds validation that rejects entries whose offset would underflow the erase block or whose region count cannot fit in the local array before either value is used. The parser runs automatically when an MTD device is probed at boot, so an attacker only needs to place a crafted image on the flash chip — typically requiring physical access to the device or a compromised firmware update path.
Lifecycle
03Fix Versions
| Branch | Introduced | Fixed in | Patch commit |
|---|---|---|---|
| 5.10 | 5.2 | 5.10.270 | 1bec05a68414 |
| 5.15 | 5.2 | 5.15.221 | 3ad8ff12fd44 |
| 6.1 | 5.2 | 6.1.188 | 875daa3c7508 |
| 6.12 | 5.2 | 6.12.110 | 1edea8900ca3 |
| 6.18 | 5.2 | 6.18.51 | 18916f475057 |
| 6.6 | 5.2 | 6.6.157 | da740539e8f3 |
| 7.2 | 5.2 | 7.2.5 | d14e6298139f |
| mainline | 5.2 | 7.3 | e9290031f736 |
| cip/5.10 | 5.2 | 5.10.271-cip78 | 1bec05a68414 |
| cip/6.1 | 5.2 | 6.1.189-cip61 | 875daa3c7508 |
| cip/6.1-rt | 5.2 | 6.1.189-cip61-rt32 | 875daa3c7508 |
| cip/6.12 | 5.2 | 6.12.111-cip32 | 1edea8900ca3 |
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.111-cip32 |
| cip/6.1 | Fixed in 6.1.189-cip61 |
| cip/6.1-rt | Fixed in 6.1.189-cip61-rt32 |
| cip/5.10 | Fixed in 5.10.271-cip78 |
| cip/5.10-rt | Affected — no CIP fix yet (latest 5.10.268-cip77-rt34) |