soc: mediatek: svs: Fix memory leak in svs_enable_debug_write()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 13f1bbcfb5822fcaacfc652017b57b79ffcacefa · < 6259094ee806fb813ca95894c65fb80e2ec98bf1| No fix yet |
| Linux Linux |
|
|
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]
From the CVE record · Linux
The Linux kernel's MediaTek SVS debug write function leaks allocated memory when integer parsing fails. The input does not specify who can reach this function or whether authentication or user interaction is required.
Anyone running a Linux kernel with the MediaTek SVS component should check their version; affected versions are not specified.