]> git.ipfire.org Git - thirdparty/linux.git/commit
ALSA: ice1712: check snd_ctl_new1() return value
authorZhao Dongdong <zhaodongdong@kylinos.cn>
Wed, 27 May 2026 12:09:11 +0000 (20:09 +0800)
committerTakashi Iwai <tiwai@suse.de>
Thu, 28 May 2026 07:35:52 +0000 (09:35 +0200)
commit2b929b91b0f3bc6de8a844370049cd99ee8e31ff
treefb74843080e05f1ee334191258089c612b198036
parentc7fa99d30c7a166a5e5db5a585ce7501ff68326b
ALSA: ice1712: check snd_ctl_new1() return value

snd_ctl_new1() can return NULL when memory allocation fails. The
ice1712 driver calls snd_ctl_new1() without checking the return value
before dereferencing the pointer in multiple places (ice1712.c,
ice1724.c, aureon.c), which can lead to NULL pointer dereferences.

Add NULL checks after snd_ctl_new1() calls and return -ENOMEM if any
fails.

Assisted-by: Opencode:DeepSeek-V4-Flash
Cc: stable@vger.kernel.org
Fixes: b9a4efd61b6b ("ALSA: ice1712,ice1724: fix the kcontrol->id initialization")
Signed-off-by: Zhao Dongdong <zhaodongdong@kylinos.cn>
Link: https://patch.msgid.link/tencent_42E5E2AB1B6A5101F7EE8C2117F1F687BB07@qq.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/ice1712/aureon.c
sound/pci/ice1712/ice1712.c
sound/pci/ice1712/ice1724.c