ASoC: codecs: fs210x: fix possible buffer overflow
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 |
|
|
6.18.347.0.117.1In the Linux kernel, the following vulnerability has been resolved:
ASoC: codecs: fs210x: fix possible buffer overflow
In fs210x_effect_scene_info(), a string was copied like this:
strscpy(DST, SRC, strlen(SRC) + 1);
A buffer overflow would happen if strlen(SRC) >= sizeof(DST). Actually, strscpy() must be used this way:
strscpy(DST, SRC, sizeof(DST)); strscpy(DST, SRC); // defaults to sizeof(DST)
From the CVE record · Linux
The Linux kernel's fs210x codec can overflow a buffer when fs210x_effect_scene_info() copies a string that is at least as long as the destination buffer. The input does not establish how an attacker could reach this code or whether network access, authentication, or user interaction is required.
Engineers running Linux kernels that include the fs210x codec should check whether their kernel is affected; affected versions were not provided.