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 59F972153CC for ; Wed, 26 Feb 2025 02:13:44 +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=1740536024; cv=none; b=rYw0z9yMOBiw2vTMS/fiA0GdIlyRS7JubjIDkBeASfvGiMtGctZtH1AIbVsNQJoARm+KYrf8QRQ0l5n9QsAiaGuQEa0mUamuLcev3iyDBVbiwDSIfUdpdKw6hOON9gR9QYLC6lqxBYnoQwVQ9xyt0ncw+mvT0TK46VgvtLtm5o0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740536024; c=relaxed/simple; bh=6tIu92HQWn05akUtWe7gf4mUfsYn9isToZGX2d9Vfdk=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=lwuTUcN6FIB+hCXX668IQumkcwy45tfntrNOewJnrY5G1KFGUsejxPTcHzUzdjPZOJzAdE5XcYwQBVEFMlN97FUHtprFu//yYZN5q925Tw+mk3BDsuGbTBYYnPTJfqLEhCTFg6Fg5e5NqrSIne4PzN6iHSzSVx7uc+UOjtI9jj0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Faz5hVhf; 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="Faz5hVhf" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2F100C4CEDD; Wed, 26 Feb 2025 02:13:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1740536024; bh=6tIu92HQWn05akUtWe7gf4mUfsYn9isToZGX2d9Vfdk=; h=From:To:Cc:Subject:Date:Reply-to:From; b=Faz5hVhf5ndiHz/qvwr3uevjEMCjlo8cU2YK/oK1wobDRxKjRWZzFkvbe2inq8VAb ENRzw8Eh4gL0PAxcDj1WnzgPWM9AaodgusnypFTFcJvJ1iFGXpIE3BGTKhVbDqnvZr lLayfNccpuZt7Wa/nmif6W3ZTqk6b3WzC7Un5fxk= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-49389: usb: usbip: fix a refcount leak in stub_probe() Date: Wed, 26 Feb 2025 03:11:03 +0100 Message-ID: <2025022649-CVE-2022-49389-c9ca@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=3774; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=6tIu92HQWn05akUtWe7gf4mUfsYn9isToZGX2d9Vfdk=; b=owGbwMvMwCRo6H6F97bub03G02pJDOn7yt/qa7VOiDzXVbKrl9X6mUd25tmHMzkPe1kUzHV+1 jf/+6bDHbEsDIJMDLJiiixftvEc3V9xSNHL0PY0zBxWJpAhDFycAjCRo1IM82PLGMX3VffIt0rx SP+60h81YUpIIcP82rO3zY5+OVHgpzMr6VN5c2eEuVoyAA== 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: usbip: fix a refcount leak in stub_probe() usb_get_dev() is called in stub_device_alloc(). When stub_probe() fails after that, usb_put_dev() needs to be called to release the reference. Fix this by moving usb_put_dev() to sdev_free error path handling. Find this by code review. The Linux kernel CVE team has assigned CVE-2022-49389 to this issue. Affected and fixed versions =========================== Issue introduced in 3.19 with commit 3ff67445750a84de67faaf52c6e1895cb09f2c56 and fixed in 4.9.318 with commit 6bafee2f18af5e5ac125e42960bc65496d0e56a0 Issue introduced in 3.19 with commit 3ff67445750a84de67faaf52c6e1895cb09f2c56 and fixed in 4.14.283 with commit f20d2d3b3364ce6525c050a8b6b4c54c8c19674d Issue introduced in 3.19 with commit 3ff67445750a84de67faaf52c6e1895cb09f2c56 and fixed in 4.19.247 with commit 247d3809e45a34d9e1a3a2bb7012e31ed8b46031 Issue introduced in 3.19 with commit 3ff67445750a84de67faaf52c6e1895cb09f2c56 and fixed in 5.4.198 with commit 2f0ae93ec33c8456cdfbf7876b80403a6318ebce Issue introduced in 3.19 with commit 3ff67445750a84de67faaf52c6e1895cb09f2c56 and fixed in 5.10.122 with commit bcbb795a9e78180d74c6ab21518da87e803dfdce Issue introduced in 3.19 with commit 3ff67445750a84de67faaf52c6e1895cb09f2c56 and fixed in 5.15.47 with commit 51422046be504515eb5a591adf0f424b62f46804 Issue introduced in 3.19 with commit 3ff67445750a84de67faaf52c6e1895cb09f2c56 and fixed in 5.17.15 with commit 8afb048800919d0ab10c57983940eba956339f21 Issue introduced in 3.19 with commit 3ff67445750a84de67faaf52c6e1895cb09f2c56 and fixed in 5.18.4 with commit 11c65408bd0ba1d9cd1307caa38169292de9cdfb Issue introduced in 3.19 with commit 3ff67445750a84de67faaf52c6e1895cb09f2c56 and fixed in 5.19 with commit 9ec4cbf1cc55d126759051acfe328d489c5d6e60 Issue introduced in 3.16.58 with commit 77e7f91231bf63e3c64eb59a2aaf5754eaea2e69 Issue introduced in 3.18.110 with commit d0f35e23dafa0185f979d0c70463caa658062264 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-49389 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/usbip/stub_dev.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/6bafee2f18af5e5ac125e42960bc65496d0e56a0 https://git.kernel.org/stable/c/f20d2d3b3364ce6525c050a8b6b4c54c8c19674d https://git.kernel.org/stable/c/247d3809e45a34d9e1a3a2bb7012e31ed8b46031 https://git.kernel.org/stable/c/2f0ae93ec33c8456cdfbf7876b80403a6318ebce https://git.kernel.org/stable/c/bcbb795a9e78180d74c6ab21518da87e803dfdce https://git.kernel.org/stable/c/51422046be504515eb5a591adf0f424b62f46804 https://git.kernel.org/stable/c/8afb048800919d0ab10c57983940eba956339f21 https://git.kernel.org/stable/c/11c65408bd0ba1d9cd1307caa38169292de9cdfb https://git.kernel.org/stable/c/9ec4cbf1cc55d126759051acfe328d489c5d6e60