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 D5FFF1509B4 for ; Fri, 13 Sep 2024 05:30:46 +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=1726205447; cv=none; b=eZlaD7U8/4EYCVy5mu1USqKbDk1+u/NkXOOCL+/3vZ/l3wAg0d83lQHTcHIKfnhyG7iKygMJj9f23cXM3/sf8UMISlKbLuk1J1bpjWFyDzOScOIDzaLoVVfocI54IMrOKA71+D9BpTuRNkOZjQWBaMYhV1JnYx1IeMwX34urq20= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726205447; c=relaxed/simple; bh=LQ3JlHXlglvHuvWYdYAHxv18z3+N/njm9nAMDKDOGLI=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=D9Fj8cE6IET/vAfrxkzDgwHFP7hvW5Kvay7GPCM0yF75LyHYsCKyDxRxlBluOf9kcNetcrMrtl3fXWJAgDuHZuFHgWSD2lPD5zfxM2jCDlfLaYIodJNtscIg7nwA3fm8B7TOqmEjOupTxWVTw7aYvFe04PArr/OWAeH0GzJ83rE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=ceqq3ZQP; 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="ceqq3ZQP" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7A117C4CEC0; Fri, 13 Sep 2024 05:30:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1726205445; bh=LQ3JlHXlglvHuvWYdYAHxv18z3+N/njm9nAMDKDOGLI=; h=From:To:Cc:Subject:Date:Reply-to:From; b=ceqq3ZQPzeaKUtQ//AzyDx2sDxBo17LL/atmKKC1it4P22yvHZxHeOqAkv+AabbJ8 Fd51iLd3/f1WxogSJQR+pytuVkQGe+SzCF4HSrSGS87AOhM5DSQlP9Iz95ksCyyY9e ah+PnMiEF0aMPe4j1vypqQ9YJTmwtutCcebmgBa8= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-46674: usb: dwc3: st: fix probed platform device ref count on probe error path Date: Fri, 13 Sep 2024 07:30:35 +0200 Message-ID: <2024091335-CVE-2024-46674-93ed@gregkh> X-Mailer: git-send-email 2.46.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=3116; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=LQ3JlHXlglvHuvWYdYAHxv18z3+N/njm9nAMDKDOGLI=; b=owGbwMvMwCRo6H6F97bub03G02pJDGmPz/4uPmlSuvdKQo12W8wWPtuFPXavnh8Pk5eeZXIig aVo15ebHbEsDIJMDLJiiixftvEc3V9xSNHL0PY0zBxWJpAhDFycAjARZhuGBT1X2vt6Xa4p9Yjx PD69I3P+jdeH/zLMU75QWv5Kd23kp3jTM7mszy5pmR+5CwA= 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: usb: dwc3: st: fix probed platform device ref count on probe error path The probe function never performs any paltform device allocation, thus error path "undo_platform_dev_alloc" is entirely bogus. It drops the reference count from the platform device being probed. If error path is triggered, this will lead to unbalanced device reference counts and premature release of device resources, thus possible use-after-free when releasing remaining devm-managed resources. The Linux kernel CVE team has assigned CVE-2024-46674 to this issue. Affected and fixed versions =========================== Issue introduced in 3.18 with commit f83fca0707c6 and fixed in 4.19.321 with commit b0979a885b9d Issue introduced in 3.18 with commit f83fca0707c6 and fixed in 5.4.283 with commit f3498650df08 Issue introduced in 3.18 with commit f83fca0707c6 and fixed in 5.10.225 with commit 6aee4c5635d8 Issue introduced in 3.18 with commit f83fca0707c6 and fixed in 5.15.166 with commit 060f41243ad7 Issue introduced in 3.18 with commit f83fca0707c6 and fixed in 6.1.108 with commit 4c6735299540 Issue introduced in 3.18 with commit f83fca0707c6 and fixed in 6.6.49 with commit e1e5e8ea2731 Issue introduced in 3.18 with commit f83fca0707c6 and fixed in 6.10.8 with commit 1de989668708 Issue introduced in 3.18 with commit f83fca0707c6 and fixed in 6.11-rc6 with commit ddfcfeba8910 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-46674 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: drivers/usb/dwc3/dwc3-st.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/b0979a885b9d4df2a25b88e9d444ccaa5f9f495c https://git.kernel.org/stable/c/f3498650df0805c75b4e1c94d07423c46cbf4ce1 https://git.kernel.org/stable/c/6aee4c5635d81f4809c3b9f0c198a65adfbb2ada https://git.kernel.org/stable/c/060f41243ad7f6f5249fa7290dda0c01f723d12d https://git.kernel.org/stable/c/4c6735299540f3c82a5033d35be76a5c42e0fb18 https://git.kernel.org/stable/c/e1e5e8ea2731150d5ba7c707f9e02fafebcfeb49 https://git.kernel.org/stable/c/1de989668708ce5875efc9d669d227212aeb9a90 https://git.kernel.org/stable/c/ddfcfeba891064b88bb844208b43bef2ef970f0c