# CVE-2026-46285: mtd: docg3: fix use-after-free in docg3_release()

- Severity: High 7.8 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.13%, higher than 2% of CVEs (2026-12-01)
- Published: 2026-06-08T15:41:28.566Z
- Modified: 2026-07-23T08:10:00.137Z
- Weaknesses: CWE-416
- Assigned by: Linux

## 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.

(As written by CVE List.)

## Affected

- Linux Linux: from c8ae3f744ddca0da164bcacee42d1d4b6fe7027d before 8408655ec8344511667b61d8257dc59c80ee3391; from c8ae3f744ddca0da164bcacee42d1d4b6fe7027d before f5d2ed4ed47d3906e2495a3537a48b127f497a17; from c8ae3f744ddca0da164bcacee42d1d4b6fe7027d before 2bf706fe7831b319f23a85b9728f961cfed40c3e; from c8ae3f744ddca0da164bcacee42d1d4b6fe7027d before d26f8c361f751c188b7ebaf8189aa0258968fd98; from c8ae3f744ddca0da164bcacee42d1d4b6fe7027d before 16f6588a3b7a2a20d10ad9b766be74c60ba347cc; from c8ae3f744ddca0da164bcacee42d1d4b6fe7027d before d89044889ecd11b0c2f86663597246e9bdd25679; from c8ae3f744ddca0da164bcacee42d1d4b6fe7027d before d49628d63d4e6bbc8a1621afb88e5fc901611bee; from c8ae3f744ddca0da164bcacee42d1d4b6fe7027d before ca19808bc6fac7e29420d8508df569b346b3e339; 5.8 (not affected: before 5.8; from 5.10.258 up to 5.10.*; from 5.15.209 up to 5.15.*; from 6.1.175 up to 6.1.*; from 6.6.140 up to 6.6.*; from 6.12.86 up to 6.12.*; from 6.18.27 up to 6.18.*; from 7.0.4 up to 7.0.*; from 7.1 up to *)
- linux linux_kernel: from 5.8 before 5.10.258; from 5.11 before 5.15.209; from 5.16 before 6.1.175; from 6.2 before 6.6.140; from 6.7 before 6.12.86; from 6.13 before 6.18.27; from 6.19 before 7.0.4

## References

- <https://git.kernel.org/stable/c/8408655ec8344511667b61d8257dc59c80ee3391> (patch)
- <https://git.kernel.org/stable/c/f5d2ed4ed47d3906e2495a3537a48b127f497a17> (patch)
- <https://git.kernel.org/stable/c/2bf706fe7831b319f23a85b9728f961cfed40c3e> (patch)
- <https://git.kernel.org/stable/c/d26f8c361f751c188b7ebaf8189aa0258968fd98> (patch)
- <https://git.kernel.org/stable/c/16f6588a3b7a2a20d10ad9b766be74c60ba347cc> (patch)
- <https://git.kernel.org/stable/c/d89044889ecd11b0c2f86663597246e9bdd25679> (patch)
- <https://git.kernel.org/stable/c/d49628d63d4e6bbc8a1621afb88e5fc901611bee> (patch)
- <https://git.kernel.org/stable/c/ca19808bc6fac7e29420d8508df569b346b3e339> (patch)

## Sources

- CVE List: [CVE-2026-46285](https://www.cve.org/CVERecord?id=CVE-2026-46285), CVE Terms of Use, modified 2026-06-14
- NVD: [CVE-2026-46285](https://nvd.nist.gov/vuln/detail/CVE-2026-46285), Public domain, modified 2026-07-23

---

Page: https://cve.day/CVE-2026-46285 · Whole record: https://cve.day/CVE-2026-46285.json · Rebuilt by cve.day 2026-11-25T22:59:24.004Z
