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.
Published: 2026-10-18
Score: 4.4 Medium
EPSS: < 1% Very Low
KEV: No
Impact: Denial of Service
Action: Immediate Patch
AI Analysis

Impact

An earlier version of the block2mtd driver in the Linux kernel performed a modulus operation on the install size using the erase_size module parameter as the divisor. When erase_size was set to zero, the kernel experienced a divide‑by‑zero error during module initialization, causing a panic. The resultant crash brings the entire operating system down, presenting a denial of service impact. The flaw is confined to the driver‑initialization phase and does not grant additional access or expose data.

Affected Systems

All Linux kernel releases where the block2mtd driver is compiled and enabled are susceptible. Any system that loads the module with the erase_size parameter set to zero, or leaves it at the default that can be overridden, will trigger the fault. The vulnerability exists in the upstream kernel code and is therefore present in all distributions that ship the unmodified block2mtd driver, regardless of vendor. The version range is not explicitly listed, but any build containing the patched source is safe.

Risk and Exploitability

The CVSS score is 4.4, indicating moderate severity, while the EPSS score remains below 1%. The vulnerability is not in CISA’s KEV list. Based on the description, it is inferred that an attacker would need local privileged access to write to the module parameter through the sysfs interface or to load the module as root. An adversary with such capabilities can easily trigger a kernel panic, resulting in a denial of service. In environments where only non-privileged users can manipulate kernel modules, the likelihood of exploitation is low; however, once a privileged foothold exists, the risk becomes high.

Generated by OpenCVE AI on October 23, 2026 at 07:42 UTC.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Update the Linux kernel to a version that contains the block2mtd divide‑by‑zero fix
  • If the block2mtd module is not required, blacklist or remove it from the system to prevent accidental loading
  • When the module is enabled, configure the erase_size parameter to a non‑zero value or omit the parameter entirely; use a modprobe configuration file to enforce a safe default

Generated by OpenCVE AI on October 23, 2026 at 07:42 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Debian DLA Debian DLA DLA-4850-1 linux-6.12 security update
History

Fri, 30 Oct 2026 12:45:00 +0000


Fri, 23 Oct 2026 06:45:00 +0000

Type Values Removed Values Added
Weaknesses CWE-368

Fri, 23 Oct 2026 00:45:00 +0000

Type Values Removed Values Added
Weaknesses CWE-369
References
Metrics threat_severity

None

cvssV3_1

{'score': 4.4, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:N/I:N/A:H'}

threat_severity

Moderate


Wed, 21 Oct 2026 13:15:00 +0000


Mon, 19 Oct 2026 00:15:00 +0000

Type Values Removed Values Added
Weaknesses CWE-368

Sun, 18 Oct 2026 16:00:00 +0000

Type Values Removed Values Added
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.
Title mtd: block2mtd: Fix divide error when erase_size is zero
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References

Subscriptions

Linux Linux Kernel
cve-icon MITRE

Status: PUBLISHED

Assigner: Linux

Published:

Updated: 2026-10-30T12:39:05.611Z

Reserved: 2026-09-25T10:25:14.366Z

Link: CVE-2026-98722

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-10-18T16:17:25.813

Modified: 2026-10-30T13:21:21.127

Link: CVE-2026-98722

cve-icon Redhat

Severity : Moderate

Publid Date: 2026-10-18T00:00:00Z

Links: CVE-2026-98722 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-10-23T07:45:17Z

Weaknesses