CVE-2026-46285

mtd: docg3: fix use-after-free in docg3_release()

Published Jun 8, 2026 CVSS 3.1 · 7.8 High EPSS < 1% KEV · Not listed
Description
In the Linux kernel, the following vulnerability has been resolved:

mtd: docg3: fix use-after-free in docg3_release()

In docg3_release(), the docg3 pointer is obtained from
cascade->floors[0]->priv before the loop that calls
doc_release_device() on each floor. doc_release_device() frees the
docg3 struct via kfree(docg3) at line 1881. After the loop,
docg3->cascade->bch dereferences the already-freed pointer.

Fix this by accessing cascade->bch directly, which is equivalent
since docg3->cascade points back to the same cascade struct, and
is already available as a local variable. This also removes the
now-unused docg3 local variable.

Analysis

AI-generated

Technical impact

The report identifies a use‑after‑free condition in the Linux kernel’s MTD docg3 subsystem, specifically within the docg3_release() routine. After freeing floor devices with doc_release_device(), the code dereferences a pointer that points to the already‑freed docg3 structure, leading to undefined behavior that can corrupt kernel memory or cause a crash. The weakness is a classic use‑after‑free flaw (CWE‑825). While the description does not explicitly state the required privileges, it is inferred that the exploit would need local kernel‑mode execution, such as a privileged user or a kernel module that can trigger the vulnerable function.

Affected Systems

This defect resides in the upstream Linux kernel and therefore applies to any distribution that compiles the kernel with the unpatched docg3_release() code. No specific releases are listed, so any kernel built from the affected source tree prior to the commit series that introduces the fix is at risk. The only vendor explicitly mentioned is the Linux kernel project.

Risk and Exploitability

Because the anomaly occurs in kernel code, it can provide an attacker with the ability to corrupt critical data structures or execute arbitrary code with kernel privileges once a local foothold is achieved. The CVSS score of 7.8, but the nature of a kernel use‑after‑free bug implies a high severity. The EPSS score of < 1%, and the vulnerability is not catalogued in the CISA KEV list. Even without an advertised remote exploit, the combination of a kernel bug and the ability to gain local kernel execution is sufficient for an attacker to abuse this flaw if the system lacks other mitigation layers.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Apply the latest kernel patch that includes the commit series fixing the use‑after‑free in docg3_release(); the relevant patches are referenced in the advisory commit logs (e.g., https://git.kernel.org/stable/c/16f6588a3b7a2a20d10ad9b766be74c60ba347cc).
  • If an immediate kernel upgrade is not feasible, disable the MTD docg3 subsystem during kernel configuration or replace the buggy implementation with the corrected code that accesses cascade->bch directly rather than dereferencing a freed pointer.
  • After applying the patch or disabling the subsystem, monitor the kernel logs (dmesg, /var/log/kern.log) for indications of memory corruption, panics, or abnormal behavior in the MTD subsystem and ensure the kernel reports no further use‑after‑free attempts.

Generated by OpenCVE AI on August 12, 2026 at 04:18 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Debian DLA Debian DLA DLA-4664-1 linux security update
Debian DLA Debian DLA DLA-4665-1 linux security update
Debian DLA Debian DLA DLA-4671-1 linux-6.1 security update
Ubuntu USN Ubuntu USN USN-8488-1 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-8489-1 Linux kernel (OEM) vulnerabilities
Ubuntu USN Ubuntu USN USN-8488-2 Linux kernel (Raspberry Pi) vulnerabilities
Ubuntu USN Ubuntu USN USN-8507-1 Linux kernel (NVIDIA) vulnerabilities
Ubuntu USN Ubuntu USN USN-8567-1 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-8569-1 Linux kernel (HWE) vulnerabilities
Ubuntu USN Ubuntu USN USN-8574-1 Linux kernel (GCP FIPS) vulnerabilities
Ubuntu USN Ubuntu USN USN-8575-1 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-8576-1 Linux kernel (NVIDIA Tegra) vulnerabilities
Ubuntu USN Ubuntu USN USN-8574-2 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-8595-1 Linux kernel (Oracle) vulnerabilities
Ubuntu USN Ubuntu USN USN-8596-1 Linux kernel (NVIDIA) vulnerabilities
Ubuntu USN Ubuntu USN USN-8575-2 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-8576-2 Linux kernel (NVIDIA Tegra) vulnerabilities
Ubuntu USN Ubuntu USN USN-8575-3 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-8595-2 Linux kernel (AWS) vulnerabilities
Ubuntu USN Ubuntu USN USN-8603-1 Linux kernel (Azure) vulnerabilities
Ubuntu USN Ubuntu USN USN-8606-1 Linux kernel (Azure) vulnerabilities
Ubuntu USN Ubuntu USN USN-8607-1 Linux kernel (Azure CVM) vulnerabilities
Ubuntu USN Ubuntu USN USN-8608-1 Linux kernel (Azure FIPS) vulnerabilities
Ubuntu USN Ubuntu USN USN-8609-1 Linux kernel (Azure CVM) vulnerabilities
Ubuntu USN Ubuntu USN USN-8610-1 Linux kernel (Azure CVM) vulnerabilities
Ubuntu USN Ubuntu USN USN-8574-3 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-8595-3 Linux kernel (AWS) vulnerabilities
Ubuntu USN Ubuntu USN USN-8619-1 Linux kernel (HWE) vulnerabilities
Ubuntu USN Ubuntu USN USN-8620-1 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-8620-2 Linux kernel (Azure FIPS) vulnerabilities
Ubuntu USN Ubuntu USN USN-8620-3 Linux kernel (Intel IoTG) vulnerabilities
Ubuntu USN Ubuntu USN USN-8620-4 Linux kernel (Intel IoTG) vulnerabilities
Ubuntu USN Ubuntu USN USN-8665-1 Linux kernel (Raspberry Pi) vulnerabilities
Ubuntu USN Ubuntu USN USN-8668-1 Linux kernel (GCP) vulnerabilities
Ubuntu USN Ubuntu USN USN-8668-2 Linux kernel (Raspberry Pi) vulnerabilities
History
Type Values Removed Values Added
Weaknesses CWE-416
Type Values Removed Values Added
Weaknesses CWE-416
Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: mtd: docg3: fix use-after-free in docg3_release() In docg3_release(), the docg3 pointer is obtained from cascade->floors[0]->priv before the loop that calls doc_release_device() on each floor. doc_release_device() frees the docg3 struct via kfree(docg3) at line 1881. After the loop, docg3->cascade->bch dereferences the already-freed pointer. Fix this by accessing cascade->bch directly, which is equivalent since docg3->cascade points back to the same cascade struct, and is already available as a local variable. This also removes the now-unused docg3 local variable.
Title mtd: docg3: fix use-after-free in docg3_release()
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References
Weaknesses

Sources

Status
PUBLISHED
Assigner
Linux
Published
Updated
Jun 14, 2026, 6:06 PM
Reserved
May 13, 2026, 3:03 PM
Status
Analyzed
Published
Jun 8, 2026, 5:16 PM
Modified
Jul 23, 2026, 8:10 AM
Severity
Public date
Jun 8, 2026, 12:00 AM