ASoC: hdmi-codec: Fix OOB memory accesses
authorDmitry Osipenko <digetx@gmail.com>
Wed, 12 Jan 2022 19:50:39 +0000 (22:50 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 8 Feb 2022 17:34:03 +0000 (18:34 +0100)
commit10007bd96b6c4c3cfaea9e76c311b06a07a5e260
treedfaab735ea4bfa1c6b90bd17140de1e0a1794323
parent0b8b029031735d1a4d452080ad791ddac4302ca6
ASoC: hdmi-codec: Fix OOB memory accesses

commit 06feec6005c9d9500cd286ec440aabf8b2ddd94d upstream.

Correct size of iec_status array by changing it to the size of status
array of the struct snd_aes_iec958. This fixes out-of-bounds slab
read accesses made by memcpy() of the hdmi-codec driver. This problem
is reported by KASAN.

Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Link: https://lore.kernel.org/r/20220112195039.1329-1-digetx@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/uapi/sound/asound.h
sound/soc/codecs/hdmi-codec.c