ASoC: SOF: topology: fix memory leak in snd_sof_load_topology
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
ASoC: SOF: topology: fix memory leak in snd_sof_load_topology
When the topology filename contains "dummy" and tplg_cnt is 0, the function returns -EINVAL directly without freeing the tplg_files allocated by kcalloc() at line 2497. This leaks memory on every such topology load attempt.
Fix this by setting ret = -EINVAL and jumping to the out: label, which already handles the kfree(tplg_files) cleanup.
From the CVE record · Linux
The Linux kernel's ASoC SOF topology loader leaks memory when a topology filename contains "dummy" and tplg_cnt is 0. Repeated load attempts can leak more memory; the input does not specify whether an attacker can trigger them or what access is required.
Engineers running Linux kernels with the ASoC SOF topology loader should check their versions; affected versions are not specified.