CVE-2026-68416
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.
| Package | Ecosystem | Fixed in |
|---|---|---|
| perf6.18 | Amazon Linux | 1:6.18.44-99.149.amzn2023 |
| kernel6.12 | Amazon Linux | 1:6.12.103-127.188.amzn2023 |
| Linux | Linux | e1e96aca1bdf391e2f49531c270ffc134e5b49a5, 6.6 |
Affected products
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | 93c08951d7070134b7415ca4abd0d25876aa653b, 006764e33fe9cff72f8a68ce1dab570d93662c96, 19bfa9ebebb5ec0695def57eb1d80de7e9cab369 |
| Linux | Linux | 6.6, 0, 6.6.148 |
| amazon:2023 | perf6.18 | 0 |
| amazon:2023 | kernel6.12 | 0 |
| Linux | Linux | 7.1.6, 6.18.42, 6.12.101 |
| linux | linux_kernel | 6.6, 6.6, 6.6 |
| amazon:2023 | kernel-livepatch-6.12.103-127.188 | 0 |
| amazon:2023 | kernel6.12-modules-extra | 0 |
| amazon:2023 | microvm-kernel6.18 | 0 |
| amazon:2023 | kernel6.18-tools-devel | 0 |
| amazon:2023 | kernel6.18 | 0 |
| amazon:2023 | kernel-livepatch-6.18.44-99.149 | 0 |
| amazon:2023 | kernel6.18-tools | 0 |
| amazon:2023 | python3-perf6.12 | 0 |
| amazon:2023 | bpftool6.18 | 0 |
| amazon:2023 | kernel6.12-tools | 0 |
| amazon:2023 | kernel6.18-modules-extra | 0 |
| amazon:2023 | kernel6.12-headers | 0 |
| amazon:2023 | python3-perf6.18 | 0 |
| amazon:2023 | perf6.12 | 0 |
…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