CVE-2026-98834: mtd: core: avoid double-free of OTP NVMEM device
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, mtdotpnvmemadd() unregisters the user device but leaves mtd->otpusernvmem set. On an error, the caller unregisters it again. For -EOPNOTSUPP, registration continues and normal teardown unregisters it again.
Clear mtd->otpusernvmem after unregistering it.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Configuration
Clear mtd->otp_user_nvmem after unregistering the user OTP NVMEM device, so the caller does not unregister it again on error.
Linux kernel MTD OTP NVMEM handling mtd->otp_user_nvmem = cleared