CVE-2026-98834

mtd: core: avoid double-free of OTP NVMEM device

Published Oct 18, 2026 CVSS 3.1 · 4.1 Medium EPSS < 1% KEV · Not listed
Description
In the Linux kernel, the following vulnerability has been resolved:

mtd: core: avoid double-free of OTP NVMEM device

If factory OTP setup fails after the user OTP NVMEM device has been
registered, mtd_otp_nvmem_add() unregisters the user device but leaves
mtd->otp_user_nvmem set. On an error, the caller unregisters it again.
For -EOPNOTSUPP, registration continues and normal teardown unregisters
it again.

Clear mtd->otp_user_nvmem after unregistering it.

Analysis

AI-generated

Technical impact

A double‑free bug in the Linux kernel’s MTD OTP NVMEM subsystem emerges when a factory OTP setup fails after a user OTP NVMEM device has been registered. The routine mtd_otp_nvmem_add() unregisters the device but fails to clear the internal mtd->otp_user_nvmem pointer. A subsequent unregister attempt frees the already freed memory again. This mis‑management of kernel memory placement is classified under CWE-1341 and can corrupt critical kernel data structures.

Affected Systems

All Linux kernel builds that incorporate the MTD OTP NVMEM module are vulnerable, regardless of the exact kernel release. Because the code path exists across multiple kernel configurations, any kernel revision with this module compiled in may allow the double‑free if the conditions above are triggered.

Risk and Exploitability

The CVSS score of 4.1 indicates moderate severity, and the EPSS score of less than 1% suggests a very low probability of exploitation in the near term. The vulnerability is not listed in the CISA KEV catalog. The probable attack vector is local or privileged: an actor who can induce a factory OTP setup failure or otherwise trigger the double‑unregister sequence can corrupt kernel memory, potentially leading to a denial‑of‑service or, under specific conditions, arbitrary code execution.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Apply the latest kernel version provided by your distribution that contains the fixed commit 26300879cd8e4612dce66bb8f6ff7cd35fcf3e59 or patch ce cf007418b93a2cbc94269e07fe2fb28f54d8fb, which clears mtd->otp_user_nvmem after unregistration.
  • If an updated kernel package is unavailable, manually apply the corrective commit to the kernel source, rebuild, and reinstall the kernel to guarantee the pointer reset is active.
  • As a temporary measure, disable the MTD OTP NVMEM module (e.g., set CONFIG_MTD_OTP_NVMEM to 'n') in the kernel configuration to eliminate the vulnerable code path until the patch is deployed.

Generated by OpenCVE AI on October 24, 2026 at 04:25 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Ubuntu USN Ubuntu USN USN-9018-1 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-9018-2 Linux kernel (HWE) vulnerabilities
Ubuntu USN Ubuntu USN USN-9019-1 Linux kernel (Azure) vulnerabilities
Ubuntu USN Ubuntu USN USN-9020-1 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-9160-1 Linux kernel (Azure) vulnerabilities
History
Type Values Removed Values Added
Weaknesses CWE-416
Type Values Removed Values Added
Weaknesses CWE-1341
References
Metrics threat_severity

None

cvssV3_1

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

threat_severity

Moderate

Type Values Removed Values Added
Weaknesses CWE-416
Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: mtd: core: avoid double-free of OTP NVMEM device If factory OTP setup fails after the user OTP NVMEM device has been registered, mtd_otp_nvmem_add() unregisters the user device but leaves mtd->otp_user_nvmem set. On an error, the caller unregisters it again. For -EOPNOTSUPP, registration continues and normal teardown unregisters it again. Clear mtd->otp_user_nvmem after unregistering it.
Title mtd: core: avoid double-free of OTP NVMEM device
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References
Weaknesses
  • CWE-1341

    Multiple Releases of Same Resource or Handle

Sources

Status
PUBLISHED
Assigner
Linux
Published
Updated
Oct 19, 2026, 9:26 AM
Reserved
Sep 25, 2026, 10:25 AM
Status
Received
Published
Oct 18, 2026, 4:17 PM
Modified
Oct 19, 2026, 10:19 AM
Severity
Moderate
Public date
Oct 18, 2026, 12:00 AM