# CVE-2026-53213: drm/vc4: fix krealloc() memory leak

- Severity: Medium 5.5 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/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.12%, higher than 2% of CVEs (2026-12-01)
- Published: 2026-06-25T08:39:17.552Z
- Modified: 2026-11-06T17:18:14.217Z
- Weaknesses: CWE-401
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: Linux

## Description

In the Linux kernel, the following vulnerability has been resolved:

drm/vc4: fix krealloc() memory leak

Don't just overwrite the original pointer passed to krealloc()
with its return value without checking latter:

    MEM = krealloc(MEM, SZ, GFP);

If krealloc() returns NULL, that erases the pointer
to the still allocated memory, hence leaks this memory.
Instead, use a temporary variable, check it's not NULL
and only then assign it to the original pointer:

    TMP = krealloc(MEM, SZ, GFP);
    if (!TMP) return;
    MEM = TMP;

While on it, use krealloc_array().

(As written by CVE List.)

## Affected

- Linux Linux: from 6d45c81d229d71da54d374143e7d6abad4c0cf31 before 30165a09f76eaf34951c818eb5d9d6e4771d76f6; from 6d45c81d229d71da54d374143e7d6abad4c0cf31 before fd87d6966041e33ef7d2e5dc59f9a52b71c6ae5f; from 6d45c81d229d71da54d374143e7d6abad4c0cf31 before e0ce103e89d61eef70edc1d1ae3bfd4c0aacbc2e; from 6d45c81d229d71da54d374143e7d6abad4c0cf31 before c034aa0b1ba5f49cbdf8ef193d6ec714d74aac27; from 6d45c81d229d71da54d374143e7d6abad4c0cf31 before 02f5e4db57c0cdd7bac89d503b301a093a0fa95c; from 6d45c81d229d71da54d374143e7d6abad4c0cf31 before 4fc692dc6df5bc777cc1bcebf95179e28594875f; from 6d45c81d229d71da54d374143e7d6abad4c0cf31 before 5d563a5da8717629ae72f9eadf1e0e340bd1658b; 4.8 (not affected: before 4.8; from 5.15.210 up to 5.15.*; from 6.1.176 up to 6.1.*; from 6.6.143 up to 6.6.*; from 6.12.94 up to 6.12.*; from 6.18.36 up to 6.18.*; from 7.0.13 up to 7.0.*; from 7.1 up to *)
- linux linux_kernel: from 4.8 before 5.15.210; from 5.16 before 6.1.176; from 6.2 before 6.6.143; from 6.7 before 6.12.94; from 6.13 before 6.18.36; from 6.19 before 7.0.13; 7.1

## References

- <https://git.kernel.org/stable/c/30165a09f76eaf34951c818eb5d9d6e4771d76f6> (patch)
- <https://git.kernel.org/stable/c/fd87d6966041e33ef7d2e5dc59f9a52b71c6ae5f> (patch)
- <https://git.kernel.org/stable/c/e0ce103e89d61eef70edc1d1ae3bfd4c0aacbc2e> (patch)
- <https://git.kernel.org/stable/c/c034aa0b1ba5f49cbdf8ef193d6ec714d74aac27> (patch)
- <https://git.kernel.org/stable/c/02f5e4db57c0cdd7bac89d503b301a093a0fa95c> (patch)
- <https://git.kernel.org/stable/c/4fc692dc6df5bc777cc1bcebf95179e28594875f> (patch)
- <https://git.kernel.org/stable/c/5d563a5da8717629ae72f9eadf1e0e340bd1658b> (patch)

## Sources

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

---

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