Files
linux-stable-mirror/sound/soc/codecs
Krzysztof KozlowskiandGreg Kroah-Hartman 8485d324aa ASoC: codecs: wsa884x: Correct Soundwire ports mask
[ Upstream commit dcb6631d05 ]

Device has up to WSA884X_MAX_SWR_PORTS number of ports and the array
assigned to prop.sink_dpn_prop has 0..WSA884X_MAX_SWR_PORTS-1 elements.
On the other hand, GENMASK(high, low) creates an inclusive mask between
<high, low>, so we need the mask from 0 up to WSA884X_MAX_SWR_PORTS-1.

Theoretically, too wide mask could cause an out of bounds read in
sdw_get_slave_dpn_prop() in stream.c, however only in the case of buggy
driver, e.g. adding incorrect number of ports via
sdw_stream_add_slave().

Fixes: aa21a7d4f6 ("ASoC: codecs: wsa884x: Add WSA884x family of speakers")
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://patch.msgid.link/20240726-asoc-wcd-wsa-swr-ports-genmask-v1-6-d4d7a8b56f05@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-08-14 13:58:51 +02:00
..
2023-08-14 13:10:36 +01:00
2024-01-20 11:51:44 +01:00
2024-01-20 11:51:44 +01:00
2023-05-25 10:54:21 +01:00
2023-07-23 23:33:05 +01:00
2023-08-11 21:12:45 +02:00
2023-08-10 00:19:02 +01:00
2023-08-13 19:38:00 +01:00
2023-08-13 19:37:49 +01:00
2023-08-13 19:37:50 +01:00
2023-08-13 19:37:52 +01:00
2023-08-13 19:37:52 +01:00
2023-08-13 19:37:53 +01:00
2023-08-17 22:38:42 +01:00
2023-08-13 19:37:54 +01:00
2023-08-13 19:37:56 +01:00
2023-08-13 19:37:58 +01:00