data built 2026-10-19T13:16:53Z

Look up another CVE · open CVE-2026-68416 in the interactive tracker

CVE-2026-68416

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

EPSS 0.2%

Published 2026-08-10 (2 months ago) by the Linux kernel CNA. Subsystem drivers/mtd. Debian urgency: unimportant.

What to do, per Debian release

Debian's own status for CVE-2026-68416 in every release this site tracks, and what each one means in practice. Every status below is the one the Debian Security Team publishes for this CVE. source

ReleaseStatus VersionWhat this means
Debian 12bookwormnot affected6.1.190-1Nothing to do. bookworm never shipped the vulnerable code.
Debian 13trixiefixed6.12.101-1Update the kernel and reboot. Fixed in 6.12.101-1. A running kernel keeps the old code until the machine restarts.
Debian 14forkyfixed7.1.6-1Update the kernel and reboot. Fixed in 7.1.6-1. A running kernel keeps the old code until the machine restarts.
Debian unstablesidfixed7.1.6-1Update the kernel and reboot. Fixed in 7.1.6-1. A running kernel keeps the old code until the machine restarts.
Debian 12bookworm · linux-6.12fixedDLA-4745-1 · 2026-08-18 · text6.12.101-1~deb12u1Update the kernel and reboot. DLA-4745-1 shipped the fix on 2026-08-18, in 6.12.101-1~deb12u1. A running kernel keeps the old code until the machine restarts.

The vulnerability

What the bug is

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.

Where it lives

The fix touches these files. If the subsystem is one you do not use, the practical exposure is lower, though the package is still the vulnerable one.

drivers/mtd/mtdcore.c

What this is
MEMORY TECHNOLOGY DEVICES (MTD)MAINTAINERS section matched on drivers/mtd/ · linux-mtd@lists.infradead.org · Maintained
Kernel module
mtd

Check it on the machine

grep -w CONFIG_MTD /boot/config-$(uname -r)

Reads the booted kernel's own configuration, on the machine and nowhere else. =y is built in, =m is a module, and an is not set line means the code is not there.

lsmod | grep -w mtd

Prints a line if that module is loaded right now, and nothing if it is not. One that is not loaded can still be loaded later by anything that needs it.

Show whether Debian builds this, per release

Debian builds this, but not on every flavour. At least one release below builds the code on some of its kernel flavours and not on others, so the answer depends on the architecture and flavour installed.

  • bookworm, trixie, forky, sid, bookworm · linux-6.12Bnot built on amd64/cloud-amd64, arm64/cloud-arm64
B
built in on some, a module on others, absent on the rest
Build switch
CONFIG_MTD

From the configuration Debian publishes for every kernel flavour it builds. It covers only the architectures Debian ships a linux-config package for, and nothing about a kernel you built yourself. Debian's own status above stays authoritative about the source package.MAINTAINERS kbuild Makefiles Debian linux-config packages

Signals

Published
2026-08-10 (2 months ago)source
CVSS
no vector published, unrated
Attack vector
not published
EPSS
0.16%, higher than 4.3% of all CVEssource
CISA KEV
not listedthe KEV catalogue
Debian urgency
unimportantsource
Subsystem
drivers/mtd

Upstream fixes

The versions the CNA records as introducing and fixing this, and the commit for each. source

IntroducedFixed inCommit
6.66.6.148ffe21a3545b4
6.66.12.101e1e96aca1bdf
6.66.18.42f98ae09c727d
6.67.1.6820f983d6419
6.67.29d4af746af8c

Debian advisories

AdvisoryDateShipped toDebian
DLA-4745-12026-08-18bookworm 6.12.101-1~deb12u1tracker

Why the CNA scored it this way

The kernel CNA published no CVSS vector and no reasoning for CVE-2026-68416, which is why it is shown as unrated rather than given an invented score. 6,405 of the 20,413 CVEs here carry reasoning; this is not one of them.