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 CF2E61FB3CA for ; Mon, 21 Oct 2024 20:13:31 +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=1729541611; cv=none; b=spIKK8IMR2tWFTIgdpfuaBhf32TKaIh8x3HsMOnrnvO9dZIGQgydbcIAArn0/YVTb8ICuKaMdL0uLTr2amSb1B3LwimS/lq01GT/WUWao6w66xSpRoLe79/OS/2ppAiCoyc25mBi33ca1UqZhpqt7EkvUXzyV01fmGzBtqYzLaU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729541611; c=relaxed/simple; bh=H0XgfeQQ1EbY/cj+K3VixNchsAx3Q71LxcmOA2R4kko=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=kraUR3uPr8PkzKFKcqtdwZU1i0AfVpfPK11JMvCCP3ARPKo+kPoVxXn6+oeh9WYSZTNrKUuLT18WhJuavlKrNX1BpEvw+lieRLLeQJGby0Y8OMZsGnwR+1LkgIfsa4hVZ+U1rcZJ3dNRiQ65Wfddp5cqIWmBl1rT/ENDqsZP/CU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=DwnGduRe; 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="DwnGduRe" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5384AC4CEC3; Mon, 21 Oct 2024 20:13:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1729541611; bh=H0XgfeQQ1EbY/cj+K3VixNchsAx3Q71LxcmOA2R4kko=; h=From:To:Cc:Subject:Date:Reply-to:From; b=DwnGduReMh40q9dnez8G10Iydtt6BtEwSzfp2keuuXjMUTuhQOgYGgFEjINzgwehn 4IYzGfXZboIYBtu0dcHTviLDIiIHOEyg9UMvQtg9+tLR014HnUGlZmD50kdk0ETILQ XWiMWKpRVsjLI4EauadXyrJpNs86ATebhhP/yME8= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-49020: net/9p: Fix a potential socket leak in p9_socket_open Date: Mon, 21 Oct 2024 22:06:52 +0200 Message-ID: <2024102154-CVE-2022-49020-2d32@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=3015; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=H0XgfeQQ1EbY/cj+K3VixNchsAx3Q71LxcmOA2R4kko=; b=owGbwMvMwCRo6H6F97bub03G02pJDOliW5R4TH6cn8Y7/8fbFYu/35vJzrKhv7A3L2fZUa6tk lbNm6ZldsSyMAgyMciKKbJ82cZzdH/FIUUvQ9vTMHNYmUCGMHBxCsBErPMYFmwV8X2vrlXel8S8 4piG0Eujso7i2wzz9B+4JWsG3L2z1oGVe9pyr4i049NCAQ== 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: net/9p: Fix a potential socket leak in p9_socket_open Both p9_fd_create_tcp() and p9_fd_create_unix() will call p9_socket_open(). If the creation of p9_trans_fd fails, p9_fd_create_tcp() and p9_fd_create_unix() will return an error directly instead of releasing the cscoket, which will result in a socket leak. This patch adds sock_release() to fix the leak issue. The Linux kernel CVE team has assigned CVE-2022-49020 to this issue. Affected and fixed versions =========================== Issue introduced in 2.6.33 with commit 6b18662e239a and fixed in 4.9.335 with commit 0396227f4daf Issue introduced in 2.6.33 with commit 6b18662e239a and fixed in 4.14.301 with commit ded893965b89 Issue introduced in 2.6.33 with commit 6b18662e239a and fixed in 4.19.268 with commit 8b14bd0b500a Issue introduced in 2.6.33 with commit 6b18662e239a and fixed in 5.4.226 with commit 2d24d91b9f44 Issue introduced in 2.6.33 with commit 6b18662e239a and fixed in 5.10.158 with commit e01c1542379f Issue introduced in 2.6.33 with commit 6b18662e239a and fixed in 5.15.82 with commit 8782b32ef867 Issue introduced in 2.6.33 with commit 6b18662e239a and fixed in 6.0.12 with commit aa08323fe18c Issue introduced in 2.6.33 with commit 6b18662e239a and fixed in 6.1 with commit dcc14cfd7deb 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-49020 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: net/9p/trans_fd.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/0396227f4daf4792a6a8aaa3b7771dc25c4cd443 https://git.kernel.org/stable/c/ded893965b895b2dccd3d1436d8d3daffa23ea64 https://git.kernel.org/stable/c/8b14bd0b500aec1458b51cb621c8e5fab3304260 https://git.kernel.org/stable/c/2d24d91b9f44620824fc37b766f7cae00ca32748 https://git.kernel.org/stable/c/e01c1542379fb395e7da53706df598f38905dfbf https://git.kernel.org/stable/c/8782b32ef867de7981bbe9e86ecb90e92e8780bd https://git.kernel.org/stable/c/aa08323fe18cb7cf95317ffa2d54ca1de8e74ebd https://git.kernel.org/stable/c/dcc14cfd7debe11b825cb077e75d91d2575b4cb8