# CVE-2026-45881: soc: mediatek: svs: Fix memory leak in svs_enable_debug_write()

- 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.16%, higher than 5% of CVEs (2026-12-01)
- Published: 2026-05-27T12:16:53.677Z
- Modified: 2026-06-25T21:12:13.813Z
- Weaknesses: CWE-401
- Assigned by: Linux

## Description

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

soc: mediatek: svs: Fix memory leak in svs_enable_debug_write()

In svs_enable_debug_write(), the buf allocated by memdup_user_nul()
is leaked if kstrtoint() fails.

Fix this by using __free(kfree) to automatically free buf, eliminating
the need for explicit kfree() calls and preventing leaks.

[Angelo: Added missing cleanup.h inclusion]

(As written by CVE List.)

## Affected

- Linux Linux: from 13f1bbcfb5822fcaacfc652017b57b79ffcacefa before 47a3e372f7d68776adb749a27c0ec9058ff1b4fd; from 13f1bbcfb5822fcaacfc652017b57b79ffcacefa before 06195456c4e4de3826c4ca60eca941c472f991d0; from 13f1bbcfb5822fcaacfc652017b57b79ffcacefa before a58c97828911c0b6e25d6b556789da974003efda; from 13f1bbcfb5822fcaacfc652017b57b79ffcacefa before 0f6498077faa9cd89bb787bcc57063494a6f0601; from 13f1bbcfb5822fcaacfc652017b57b79ffcacefa before 6bb10466e0884b4a68d4a1f3f4bb87eeb471c18a; from 13f1bbcfb5822fcaacfc652017b57b79ffcacefa before 6259094ee806fb813ca95894c65fb80e2ec98bf1; 6.0 (not affected: before 6.0; from 6.1.165 up to 6.1.*; from 6.6.128 up to 6.6.*; from 6.12.75 up to 6.12.*; from 6.18.14 up to 6.18.*; from 6.19.4 up to 6.19.*; from 7.0 up to *)
- linux linux_kernel: from 6.0 before 6.1.165; from 6.2 before 6.6.128; from 6.7 before 6.12.75; from 6.13 before 6.18.14; from 6.19 before 6.19.4

## References

- <https://git.kernel.org/stable/c/47a3e372f7d68776adb749a27c0ec9058ff1b4fd> (patch)
- <https://git.kernel.org/stable/c/06195456c4e4de3826c4ca60eca941c472f991d0> (patch)
- <https://git.kernel.org/stable/c/a58c97828911c0b6e25d6b556789da974003efda> (patch)
- <https://git.kernel.org/stable/c/0f6498077faa9cd89bb787bcc57063494a6f0601> (patch)
- <https://git.kernel.org/stable/c/6bb10466e0884b4a68d4a1f3f4bb87eeb471c18a> (patch)
- <https://git.kernel.org/stable/c/6259094ee806fb813ca95894c65fb80e2ec98bf1> (patch)

## Sources

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

---

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