ASoC: codecs: simple-mux: Fix enum control bounds check
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 342fbb7578d1741ff646d7b08e14e8753267b9fa · < 05ef77f02607a3dc5d7f9762cb990f76843315d4| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
ASoC: codecs: simple-mux: Fix enum control bounds check
simple_mux_control_put() rejects values greater than e->items, but enum control values are zero based. For the two-entry mux used by this driver, valid values are 0 and 1, so value 2 must be rejected as well.
Accepting e->items can store an invalid mux state, pass it to the GPIO setter, and pass it on to the DAPM mux update path where it is used as an index into the enum text array.
Use the same >= e->items check used by the ASoC enum helpers.
From the CVE record · Linux
The ASoC simple-mux codec accepts an enum value equal to the number of items, although valid values are zero-based. If that invalid value reaches the mux control, it can be used as an index into the enum text array. The input does not specify the access or authentication needed to supply the value.
Engineers running Linux kernels with the ASoC simple-mux codec should check whether their kernel includes the fix; affected versions are not specified.