]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
ALSA: usb-audio: fix null pointer dereference on pointer cs_desc
authorChengfeng Ye <cyeaa@connect.ust.hk>
Sun, 24 Oct 2021 11:17:36 +0000 (04:17 -0700)
committerAndrea Righi <andrea.righi@canonical.com>
Tue, 4 Jan 2022 08:48:47 +0000 (09:48 +0100)
commitce39adb0197b27a6323d5a27c05cb058fd998480
treeb1cabaf879ed82395809a8810cb3b21a4efa1b68
parentc8fdd12ff9d5592fef80df698df92ce4bd433951
ALSA: usb-audio: fix null pointer dereference on pointer cs_desc

BugLink: https://bugs.launchpad.net/bugs/1952579
[ Upstream commit b97053df0f04747c3c1e021ecbe99db675342954 ]

The pointer cs_desc return from snd_usb_find_clock_source could
be null, so there is a potential null pointer dereference issue.
Fix this by adding a null check before dereference.

Signed-off-by: Chengfeng Ye <cyeaa@connect.ust.hk>
Link: https://lore.kernel.org/r/20211024111736.11342-1-cyeaa@connect.ust.hk
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
sound/usb/clock.c