+31
−16
Loading
stable inclusion from stable-v6.6.33 commit 6e359be4975006ff72818e79dad8fe48293f2eb2 category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/IA7D1H CVE: CVE-2024-38388 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=6e359be4975006ff72818e79dad8fe48293f2eb2 -------------------------------- [ Upstream commit 172811e3a557d8681a5e2d0f871dc04a2d17eb13 ] Use the control private_free callback to free the associated data block. This ensures that the memory won't leak, whatever way the control gets destroyed. The original implementation didn't actually remove the ALSA controls in hda_cs_dsp_control_remove(). It only freed the internal tracking structure. This meant it was possible to remove/unload the amp driver while leaving its ALSA controls still present in the soundcard. Obviously attempting to access them could cause segfaults or at least dereferencing stale pointers. Signed-off-by:Richard Fitzgerald <rf@opensource.cirrus.com> Fixes: 3233b978 ("ALSA: hda: hda_cs_dsp_ctl: Add Library to support CS_DSP ALSA controls") Link: https://lore.kernel.org/r/20240508095627.44476-1-rf@opensource.cirrus.com Signed-off-by:
Takashi Iwai <tiwai@suse.de> Signed-off-by:
Sasha Levin <sashal@kernel.org> Signed-off-by:
Cui GaoSheng <cuigaosheng1@huawei.com>