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 9E6171FDD for ; Tue, 21 May 2024 15:25:49 +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=1716305149; cv=none; b=mLA+asXd+SjlKLp8YgfRUvf5Hij+9uctZNcxPJdmPsuRMHhiUenKdNG2gVi9wZo0boGVjg+nGPsRjlqI9W0JPh20ZPHI/yM5aFlQ3wuGWrmmufjBGOCsbQdSu13eiP17JhVSZw+nx60ArXDi7WeST7Amwdaf6T2MnylnOOBLc/s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716305149; c=relaxed/simple; bh=UKAdsijtHVS8FwUucWFo1f3JapRCph1jhqB/ASXX9us=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=iGjW/W2v52wjxZb5YPt+bVyi73Le6srHT0Kcq0KT7pKE2YrBEAE7BX6iYJo5a7B6E9qRe/xB7AWF+gHggX0ZoYNTbHcSMKtFSV0k5qeWRW3AMeHMRO7maAUShihwdJtDZH/Brw2Ggqvaz1+ldhqmVJ94L1vBGYQMmCqIfpHtwqQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=hkYBlyOw; 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="hkYBlyOw" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1FF89C32786; Tue, 21 May 2024 15:25:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1716305149; bh=UKAdsijtHVS8FwUucWFo1f3JapRCph1jhqB/ASXX9us=; h=From:To:Cc:Subject:Date:Reply-to:From; b=hkYBlyOwRegWV8WOtXKQXr49qaINHTSUeINqD0I/L67LkuQuxgy+ZmNhyUBx37Bn+ bJd7c0Xt5oOLQKhaekA+J9mNtr/jVD/KE2APOx31iZ2s7mc85+ARhuoOCcbBCO8FbL BMLM9kaWxF6lUq36Bnt/BEZsXwvjaeypSI4U4JIw= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2023-52736: ALSA: hda: Do not unset preset when cleaning up codec Date: Tue, 21 May 2024 17:23:13 +0200 Message-ID: <2024052100-CVE-2023-52736-ff92@gregkh> X-Mailer: git-send-email 2.45.1 Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Reply-to: , X-Developer-Signature: v=1; a=openpgp-sha256; l=2700; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=UKAdsijtHVS8FwUucWFo1f3JapRCph1jhqB/ASXX9us=; b=owGbwMvMwCRo6H6F97bub03G02pJDGk+e0JmX/pkcdb60AOTWzO2RWy4/qHqZZjJnU2PNE3uz +2refYnpCOWhUGQiUFWTJHlyzaeo/srDil6GdqehpnDygQyhIGLUwAmsvITw4Iepu89T5bMV6z2 UJ1nLveq7tnVwIUM84v0dsx7srE68V2wrI6uflBB+vKGZAA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit Description =========== In the Linux kernel, the following vulnerability has been resolved: ALSA: hda: Do not unset preset when cleaning up codec Several functions that take part in codec's initialization and removal are re-used by ASoC codec drivers implementations. Drivers mimic the behavior of hda_codec_driver_probe/remove() found in sound/pci/hda/hda_bind.c with their component->probe/remove() instead. One of the reasons for that is the expectation of snd_hda_codec_device_new() to receive a valid pointer to an instance of struct snd_card. This expectation can be met only once sound card components probing commences. As ASoC sound card may be unbound without codec device being actually removed from the system, unsetting ->preset in snd_hda_codec_cleanup_for_unbind() interferes with module unload -> load scenario causing null-ptr-deref. Preset is assigned only once, during device/driver matching whereas ASoC codec driver's module reloading may occur several times throughout the lifetime of an audio stack. The Linux kernel CVE team has assigned CVE-2023-52736 to this issue. Affected and fixed versions =========================== Fixed in 5.10.169 with commit 7fc4e7191eae Fixed in 5.15.95 with commit e909f5f2aa55 Fixed in 6.1.13 with commit 427ca2530da8 Fixed in 6.2 with commit 87978e6ad45a Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community. Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at https://cve.org/CVERecord/?id=CVE-2023-52736 will be updated if fixes are backported, please check that for the most up to date information about this issue. Affected files ============== The file(s) affected by this issue are: sound/pci/hda/hda_bind.c sound/pci/hda/hda_codec.c Mitigation ========== The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits: https://git.kernel.org/stable/c/7fc4e7191eae9d9325511e03deadfdb2224914f8 https://git.kernel.org/stable/c/e909f5f2aa55a8f9aa6919cce08015cb0e8d4668 https://git.kernel.org/stable/c/427ca2530da8dc61a42620d7113b05e187b6c2c0 https://git.kernel.org/stable/c/87978e6ad45a16835cc58234451111091be3c59a