From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4413A355045; Tue, 6 Jan 2026 17:28:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767720500; cv=none; b=BxNbm70ID/NVfseCnm9avYnNB7CqENgep2NATBhHBbJsL2a/lzNoangyfLTDzfCIvUJZAAcvpj3iH2SvXOjTEV6jqG/blBCCWD09710od7LGUfalbTtbanD5rixeSLVfArLLoqOPG41aq6kDHmepFQu2E0zCDD6XFZr2A0oC4qo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767720500; c=relaxed/simple; bh=mN+hM/PVxQc7qZR9/X85Uiql9ZnR+gHshc+6VepGAhk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=PJwJdLicR2zt3brUO03DwaCVItUelGoy9vcu0PoU7zugF4LswnirZYYgnrRqv6YuSlYPTfB5TBtfk4gXO9ms3XNt9joK9EQ6n9RvD/nxTtWxYcBuu3PcO+V51RlCrFa9Z42fKRd1HhwJBmJYNy1pQqIfOpMJOtzAcQEmfWJFuGc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=IUYpvc/O; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="IUYpvc/O" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A7B9CC116C6; Tue, 6 Jan 2026 17:28:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1767720500; bh=mN+hM/PVxQc7qZR9/X85Uiql9ZnR+gHshc+6VepGAhk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IUYpvc/O+npvBZsLM6xAqn3vfZhZpYrvbufbQHnpVKCE9G4QKhTvhdB/UWBQfN0SE fwtMr2YP46Mtts1fFOIErjCQHGwz0YLEHt1vQ+h0YAeMlPCC/Z+cgKXlgnGXGuzYIj Ou2OiRGL5cIYPENHPhXb1T6hEMntiDzBx0OawX0A= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Denis Arefev , Richard Fitzgerald , Takashi Iwai , Sasha Levin Subject: [PATCH 6.12 256/567] ALSA: hda: cs35l41: Fix NULL pointer dereference in cs35l41_hda_read_acpi() Date: Tue, 6 Jan 2026 18:00:38 +0100 Message-ID: <20260106170500.783027798@linuxfoundation.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260106170451.332875001@linuxfoundation.org> References: <20260106170451.332875001@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.12-stable review patch. If anyone has any objections, please let me know. ------------------ From: Denis Arefev [ Upstream commit c34b04cc6178f33c08331568c7fd25c5b9a39f66 ] The acpi_get_first_physical_node() function can return NULL, in which case the get_device() function also returns NULL, but this value is then dereferenced without checking,so add a check to prevent a crash. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: 7b2f3eb492da ("ALSA: hda: cs35l41: Add support for CS35L41 in HDA systems") Cc: stable@vger.kernel.org Signed-off-by: Denis Arefev Reviewed-by: Richard Fitzgerald Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/20251202101338.11437-1-arefev@swemel.ru [ sound/hda/codecs/side-codecs/ -> sound/pci/hda/ ] Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- sound/pci/hda/cs35l41_hda.c | 2 ++ 1 file changed, 2 insertions(+) --- a/sound/pci/hda/cs35l41_hda.c +++ b/sound/pci/hda/cs35l41_hda.c @@ -1865,6 +1865,8 @@ static int cs35l41_hda_read_acpi(struct cs35l41->dacpi = adev; physdev = get_device(acpi_get_first_physical_node(adev)); + if (!physdev) + return -ENODEV; sub = acpi_get_subsystem_id(ACPI_HANDLE(physdev)); if (IS_ERR(sub))