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 F0966216E0B for ; Wed, 26 Feb 2025 02:14:10 +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=1740536051; cv=none; b=bV8M1AsMJCrIqcT4aPNFB6A9ZUHdzkwt+FdlUGvbnO3l7EzZlTuyMDtweJsUn9QoUVTzHQ17ZfYtM+X6RTa+PjB93ZSz5NL4ugKOq7qI4B0jKkxLVoEUtKoT6c1Z9WOTOqk+/DUu9pVomFBPsY/7AwcensZiqV2haXuG2uopjXo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740536051; c=relaxed/simple; bh=UlisebreoEkJnZlHQuIOROh7z1j7H5eRdIlxXzSHhsM=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=cjlrLjxeyXUPgkcpPSQPeptc4p1dVen1fWQD9ddl3CuYL3Hq4Xl+3Ay+qYPkfNpQ/PI9phLU9xToYkQszo+XdBNO2m654eKMO1b9i6YlEWwC2btPoQvMoA53+QWR7+LokxwlGn54yAqiZCXYIFLC2J2ZMRon6D4rwbATg97QcmE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=G6N1Iy2I; 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="G6N1Iy2I" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C3F64C4CEDD; Wed, 26 Feb 2025 02:14:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1740536050; bh=UlisebreoEkJnZlHQuIOROh7z1j7H5eRdIlxXzSHhsM=; h=From:To:Cc:Subject:Date:Reply-to:From; b=G6N1Iy2Iv5zWkEHVYl7u/p9h6BxYXCeHuC/HbICwMXxiTdzlwBjd6PYNqkD0Us10F dz1n9JLyH5Ft50e0E1kLtklzBvWhqAhQUqbmOlNd/eci3Ht+xMlkQudFjyKWCMAnyl xu4QT3HpaT+ZgX08e4ub2F0HPpvaOaAC695AMVws= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-49385: driver: base: fix UAF when driver_attach failed Date: Wed, 26 Feb 2025 03:10:59 +0100 Message-ID: <2025022648-CVE-2022-49385-258c@gregkh> X-Mailer: git-send-email 2.48.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=2842; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=UlisebreoEkJnZlHQuIOROh7z1j7H5eRdIlxXzSHhsM=; b=owGbwMvMwCRo6H6F97bub03G02pJDOn7yt8kKlrYOOedWx1n/SC0aFFL5dPGjvR6SR2VCy+Dz k8vblzbEcvCIMjEICumyPJlG8/R/RWHFL0MbU/DzGFlAhnCwMUpABNJns8wv/ygzpPZCe55HRxu 8zWKnny9YL1bk2HByX2rek5H5Ra4ya58Pes0n4Ixq+d5AA== 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: driver: base: fix UAF when driver_attach failed When driver_attach(drv); failed, the driver_private will be freed. But it has been added to the bus, which caused a UAF. To fix it, we need to delete it from the bus when failed. The Linux kernel CVE team has assigned CVE-2022-49385 to this issue. Affected and fixed versions =========================== Issue introduced in 3.9 with commit 190888ac01d059e38ffe77a2291d44cafa9016fb and fixed in 5.4.198 with commit 5d709f58c743166fe1c6914b9de0ae8868600d9b Issue introduced in 3.9 with commit 190888ac01d059e38ffe77a2291d44cafa9016fb and fixed in 5.10.122 with commit 823f24f2e329babd0330200d0b74882516fe57f4 Issue introduced in 3.9 with commit 190888ac01d059e38ffe77a2291d44cafa9016fb and fixed in 5.15.47 with commit cdf1a683a01583bca4b618dd16223cbd6e462e21 Issue introduced in 3.9 with commit 190888ac01d059e38ffe77a2291d44cafa9016fb and fixed in 5.17.15 with commit 5389101257828d1913d713d9a40acbe14f5961df Issue introduced in 3.9 with commit 190888ac01d059e38ffe77a2291d44cafa9016fb and fixed in 5.18.4 with commit c059665c84feab46b7173d3a1bf36c2fb7f9df86 Issue introduced in 3.9 with commit 190888ac01d059e38ffe77a2291d44cafa9016fb and fixed in 5.19 with commit 310862e574001a97ad02272bac0fd13f75f42a27 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-2022-49385 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/base/bus.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/5d709f58c743166fe1c6914b9de0ae8868600d9b https://git.kernel.org/stable/c/823f24f2e329babd0330200d0b74882516fe57f4 https://git.kernel.org/stable/c/cdf1a683a01583bca4b618dd16223cbd6e462e21 https://git.kernel.org/stable/c/5389101257828d1913d713d9a40acbe14f5961df https://git.kernel.org/stable/c/c059665c84feab46b7173d3a1bf36c2fb7f9df86 https://git.kernel.org/stable/c/310862e574001a97ad02272bac0fd13f75f42a27