CVE-2026-68416: mtd: fix double free and WARN_ON in add_mtd_device() error paths

Published Aug 10, 2026
·
Updated

In the Linux kernel, the following vulnerability has been resolved:

mtd: fix double free and WARNON in addmtddevice() error paths

When deviceregister() or mtdnvmemadd() fails inside addmtddevice() for a partition, the error handling triggers mtdrelease() via putdevice() or deviceunregister(). mtdrelease() calls releasemtdpartition() which frees the mtdinfo structure. However, callers such as mtdaddpartition() and addmtdpartitions() also call freepartition() in their error paths, resulting in a double free.

Additionally, releasemtdpartition() hits WARNON(!listempty( &mtd->part.node)) because the partition node is still linked in the parent's partitions list when the release callback fires from the addmtddevice() error path.

Fix this by overriding dev->type and dev->release before putdevice() in the error paths, so that devicerelease() invokes a no-op function instead of mtdrelease(). For the mtdnvmemadd() failure case, deviceunregister() is replaced with devicedel() to separate the device removal from the final kobject reference drop, allowing the override to take effect before putdevice() is called.

The callers' error paths (listdel + freepartition) remain the sole owners of mtdinfo lifetime on addmtddevice() failure, which is the expected contract.

The normal partition teardown path is not affected: delmtddevice() goes through krefput() -> mtddevicerelease() -> deviceunregister() with dev->type still set to &mtddevtype, so mtdrelease() -> releasemtdpartition() continues to work correctly for the regular removal case.

Affected Software

1 affected component
Linux Kernel

Event History

Aug 10, 2026
CVE Published
via MITRE·12:04 PM
Data Sourced
via MITRE·12:04 PM
Description
Data Sourced
via NVD·01:20 PM
Description
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-68416?

The severity of CVE-2026-68416 is rated as risk level 27.

2

What is CVE-2026-68416 about?

CVE-2026-68416 addresses a double free vulnerability in the Linux kernel related to error handling in the add_mtd_device() function.

3

How do I fix CVE-2026-68416?

To fix CVE-2026-68416, update your Linux kernel to the latest version that contains the patch for this vulnerability.

4

Which software is affected by CVE-2026-68416?

CVE-2026-68416 affects the Linux kernel.

5

When was CVE-2026-68416 published?

CVE-2026-68416 was published on August 10, 2026.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203