Skip to contentSkip to conversation

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

DISCUSSION Greg Kroah-Hartman 1 participant 1 message May 27

lore
Share & tools
lore
#0 lore raw

From: Greg Kroah-Hartman <[email protected]>

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]

The Linux kernel CVE team has assigned CVE-2026-45881 to this issue.

Affected and fixed versions
===========================

	Issue introduced in 6.0 with commit 13f1bbcfb5822fcaacfc652017b57b79ffcacefa and fixed in 6.1.165 with commit 47a3e372f7d68776adb749a27c0ec9058ff1b4fd
	Issue introduced in 6.0 with commit 13f1bbcfb5822fcaacfc652017b57b79ffcacefa and fixed in 6.6.128 with commit 06195456c4e4de3826c4ca60eca941c472f991d0
	Issue introduced in 6.0 with commit 13f1bbcfb5822fcaacfc652017b57b79ffcacefa and fixed in 6.12.75 with commit a58c97828911c0b6e25d6b556789da974003efda
	Issue introduced in 6.0 with commit 13f1bbcfb5822fcaacfc652017b57b79ffcacefa and fixed in 6.18.14 with commit 0f6498077faa9cd89bb787bcc57063494a6f0601
	Issue introduced in 6.0 with commit 13f1bbcfb5822fcaacfc652017b57b79ffcacefa and fixed in 6.19.4 with commit 6bb10466e0884b4a68d4a1f3f4bb87eeb471c18a
	Issue introduced in 6.0 with commit 13f1bbcfb5822fcaacfc652017b57b79ffcacefa and fixed in 7.0 with commit 6259094ee806fb813ca95894c65fb80e2ec98bf1

Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.

Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at

	https://cve.org/CVERecord/?id=CVE-2026-45881

will be updated if fixes are backported, please check that for the most up to date information about this issue.

Affected files
==============

The file(s) affected by this issue are:
drivers/soc/mediatek/mtk-svs.c

Mitigation
==========

The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:

	https://git.kernel.org/stable/c/47a3e372f7d68776adb749a27c0ec9058ff1b4fd
	https://git.kernel.org/stable/c/06195456c4e4de3826c4ca60eca941c472f991d0
	https://git.kernel.org/stable/c/a58c97828911c0b6e25d6b556789da974003efda
	https://git.kernel.org/stable/c/0f6498077faa9cd89bb787bcc57063494a6f0601
	https://git.kernel.org/stable/c/6bb10466e0884b4a68d4a1f3f4bb87eeb471c18a
	https://git.kernel.org/stable/c/6259094ee806fb813ca95894c65fb80e2ec98bf1