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 4722625634 for ; Tue, 19 Nov 2024 01:34:29 +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=1731980070; cv=none; b=S2IRwuoHZgIjna8s29GCI2eUV6AqEb3vHajSG1ToFD+NKuAS2z+QhnZUArsHOmxXjNEsRRFJIRs+n8p8LrywHYlvrRH2fQC2WBsHXR67ELBAUL9G8CSDfWSGgHws6Vr+rEfs3SkviV7NNCaQ/dYAyjARJwbBpiJcgVYGIWzx/lM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731980070; c=relaxed/simple; bh=pkrPIl2ko6QISyy2l4i37nMsfrbqm3NMWUgj6xkA6Qo=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=dyGtCs6VOnxBuEhuHnsIo4SXzQtxf/q2FxLO7cTD71f32E/h99yoYNuuMftsanReD2wcBYAxH9Mie533T3k2L6Bv6DuqURaF0rWOpuUDXxynV7MLG/cB11YmGL/yCdSBP/+e3lbyjoAkd5fAcVZo2KGXnnSsqexFI9/2nSvKqxk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=nL/hZzJ3; 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="nL/hZzJ3" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 825B7C4CECC; Tue, 19 Nov 2024 01:34:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1731980069; bh=pkrPIl2ko6QISyy2l4i37nMsfrbqm3NMWUgj6xkA6Qo=; h=From:To:Cc:Subject:Date:Reply-to:From; b=nL/hZzJ3rLCh027mJ1UsFiPvvKXMFOdOpWlmdQGFS3Y8A9H0azJF6eqU24O56fkoL Rlcbm2QFgxh8r+jFq1+R3tTOt5ddmDUOt3GS57Cf8lZLvqmZ2eMhH/jjlw56YNdydH Cy2mYGDWmD3mnJJWtorzu3OzlNc+vcfzSiv9q9Wo= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-50292: ASoC: stm32: spdifrx: fix dma channel release in stm32_spdifrx_remove Date: Tue, 19 Nov 2024 02:32:47 +0100 Message-ID: <2024111955-CVE-2024-50292-e8b6@gregkh> X-Mailer: git-send-email 2.47.0 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=2997; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=pkrPIl2ko6QISyy2l4i37nMsfrbqm3NMWUgj6xkA6Qo=; b=owGbwMvMwCRo6H6F97bub03G02pJDOnWr048lg13/r+qbUHM5ozFk9rcWZ911Ky+tELibOqvy uNn97EqdcSyMAgyMciKKbJ82cZzdH/FIUUvQ9vTMHNYmUCGMHBxCsBEeHkY5pfm/vn5SEd8s+cL CwU/p/v2WvIv6hjmZ0fHPWDc9SPgqGYc1+6fUX46FgsnAgA= 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: ASoC: stm32: spdifrx: fix dma channel release in stm32_spdifrx_remove In case of error when requesting ctrl_chan DMA channel, ctrl_chan is not null. So the release of the dma channel leads to the following issue: [ 4.879000] st,stm32-spdifrx 500d0000.audio-controller: dma_request_slave_channel error -19 [ 4.888975] Unable to handle kernel NULL pointer dereference at virtual address 000000000000003d [...] [ 5.096577] Call trace: [ 5.099099] dma_release_channel+0x24/0x100 [ 5.103235] stm32_spdifrx_remove+0x24/0x60 [snd_soc_stm32_spdifrx] [ 5.109494] stm32_spdifrx_probe+0x320/0x4c4 [snd_soc_stm32_spdifrx] To avoid this issue, release channel only if the pointer is valid. The Linux kernel CVE team has assigned CVE-2024-50292 to this issue. Affected and fixed versions =========================== Issue introduced in 5.7 with commit 794df9448edb and fixed in 5.10.230 with commit 3a977b554f66 Issue introduced in 5.7 with commit 794df9448edb and fixed in 5.15.172 with commit 0d75f887aabd Issue introduced in 5.7 with commit 794df9448edb and fixed in 6.1.117 with commit 4f1d74f74752 Issue introduced in 5.7 with commit 794df9448edb and fixed in 6.6.61 with commit 23bdbd1ef3e0 Issue introduced in 5.7 with commit 794df9448edb and fixed in 6.11.8 with commit 22ae9321054c Issue introduced in 5.7 with commit 794df9448edb and fixed in 6.12 with commit 9bb4af400c38 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-2024-50292 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/soc/stm/stm32_spdifrx.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/3a977b554f668382dfba31fd62e4cce4fe5643db https://git.kernel.org/stable/c/0d75f887aabd80cf37ea48d28f159afa7850ea28 https://git.kernel.org/stable/c/4f1d74f74752eab8af6b8b28797dc6490d57374c https://git.kernel.org/stable/c/23bdbd1ef3e063e03d3c50c15a591b005ebbae39 https://git.kernel.org/stable/c/22ae9321054cf7f36c537702af133659f51a0b88 https://git.kernel.org/stable/c/9bb4af400c386374ab1047df44c508512c08c31f