VDB

CVE-2026-68416

CVE-2026-68416 PUBLISHED

mtd: fix double free and WARN_ON in add_mtd_device() error paths

Reported by linux · Published August 10, 2026

In the Linux kernel, the following vulnerability has been resolved: mtd: fix double free and WARN_ON in add_mtd_device() error paths When device_register() or mtd_nvmem_add() fails inside add_mtd_device() for a partition, the error handling triggers mtd_release() via put_device() or device_unregister(). mtd_release() calls release_mtd_partition() which frees the mtd_info structure. However, callers such as mtd_add_partition() and add_mtd_partitions() also call free_partition() in their error paths, resulting in a double free. Additionally, release_mtd_partition() hits WARN_ON(!list_empty( &mtd->part.node)) because the partition node is still linked in the parent's partitions list when the release callback fires from the add_mtd_device() error path. Fix this by overriding dev->type and dev->release before put_device() in the error paths, so that device_release() invokes a no-op function instead of mtd_release(). For the mtd_nvmem_add() failure case, device_unregister() is replaced with device_del() to separate the device removal from the final kobject reference drop, allowing the override to take effect before put_device() is called. The callers' error paths (list_del + free_partition) remain the sole owners of mtd_info lifetime on add_mtd_device() failure, which is the expected contract. The normal partition teardown path is not affected: del_mtd_device() goes through kref_put() -> mtd_device_release() -> device_unregister() with dev->type still set to &mtd_devtype, so mtd_release() -> release_mtd_partition() continues to work correctly for the regular removal case.

Fixed versions

Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.

PackageEcosystemFixed in
perf6.18Amazon Linux1:6.18.44-99.149.amzn2023
kernel6.12Amazon Linux1:6.12.103-127.188.amzn2023
LinuxLinuxe1e96aca1bdf391e2f49531c270ffc134e5b49a5, 6.6

Affected products

VendorProductVersions
LinuxLinux93c08951d7070134b7415ca4abd0d25876aa653b, 006764e33fe9cff72f8a68ce1dab570d93662c96, 19bfa9ebebb5ec0695def57eb1d80de7e9cab369
LinuxLinux6.6, 0, 6.6.148
amazon:2023perf6.180
amazon:2023kernel6.120
LinuxLinux7.1.6, 6.18.42, 6.12.101
linuxlinux_kernel6.6, 6.6, 6.6
amazon:2023kernel-livepatch-6.12.103-127.1880
amazon:2023kernel6.12-modules-extra0
amazon:2023microvm-kernel6.180
amazon:2023kernel6.18-tools-devel0
amazon:2023kernel6.180
amazon:2023kernel-livepatch-6.18.44-99.1490
amazon:2023kernel6.18-tools0
amazon:2023python3-perf6.120
amazon:2023bpftool6.180
amazon:2023kernel6.12-tools0
amazon:2023kernel6.18-modules-extra0
amazon:2023kernel6.12-headers0
amazon:2023python3-perf6.180
amazon:2023perf6.120

…and 7 more

Timeline

  • Aug 10, 2026 Coalition ESS Score
  • Aug 10, 2026 CVE Published
  • Aug 16, 2026 Security Advisory
  • Aug 24, 2026 EPSS Score (13 in total, the first dated here)
  • Nov 6, 2026 CVE Updated

Query this with the API

The same record, from the CLI:

vulnetix vdb vuln CVE-2026-68416
vulnetix vdb fixes CVE-2026-68416

Or with curl, using the org id and key from your account page:

curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
  "https://api.vdb.vulnetix.com/v2/vuln/CVE-2026-68416/fixes/registry"

The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart

References

Look up in the Resolve Platform →
$ Lookup Community · 50/day Open Lookup ›