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 0BC132853EA for ; Wed, 18 Jun 2025 11:07:42 +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=1750244862; cv=none; b=V2ULtpRltX7How5wtk+QXezMkCeP1+mKR+gZvu9nYCzJ/Ua2nceNhQYme4l9CM4OwH89Ijmi8t5G+06XQb+y/Xb1+9a+Jr6rQdT0dcTvxykA9iBkA7KGWk4oWGAk0qdaJJn/6J/LPVwltCIw1+2YtAKuZ6SQ+iPyqfHtuuo9kW4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750244862; c=relaxed/simple; bh=bpFxYxDFvi6ghTmnzV/rf85XLiPyi8RKqBDRkf4a8SQ=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=o4bJ8b1imYbI76x9VimRY3kVj2tCs7h1KqV1i1XOGfH1s2GswIMRkazzfaaMkBpQ9I0PdZauibeFpX3/YgfnZHcGh7gSnAcqqgOwV2h0sDZhtwVxfmQ0SaJdBlzErOFqEC1a2Fti55A13/8adWT3HKC6py8pjRdigEsPujxSLMA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=bilRLo3Q; 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="bilRLo3Q" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8B84CC4CEE7; Wed, 18 Jun 2025 11:07:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1750244861; bh=bpFxYxDFvi6ghTmnzV/rf85XLiPyi8RKqBDRkf4a8SQ=; h=From:To:Cc:Subject:Date:Reply-to:From; b=bilRLo3QOD70fhfAkDUQlCQpnrrduBvopk2AY6uV6Q/MOKL3iz26wZVRLXRMt4ZzE nDm0zNfL8s+c6rMODciWN1UIedgbC4pK0lBB4+cPqzseDP2wMGo2MbJ3KsqceAy628 +21wsu7OLyWsjvgYU4DItpWmVbqjHcamQmvmPPII= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-50059: ceph: don't leak snap_rwsem in handle_cap_grant Date: Wed, 18 Jun 2025 13:02:04 +0200 Message-ID: <2025061849-CVE-2022-50059-efa6@gregkh> X-Mailer: git-send-email 2.49.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=2413; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=IrtmQoeryulxWpBmSMQQKPzoBO4PG465sS+aFDoqBVA=; b=owGbwMvMwCRo6H6F97bub03G02pJDBlBcxKVlpx2dKqv7owQKNM+brTg8bemivAvMpm7Uv/Ms M/gW5LfEcvCIMjEICumyPJlG8/R/RWHFL0MbU/DzGFlAhnCwMUpABMpeM6wYNHchHQF4WkSCnY3 HpSst6qc885clmF++Ma2s/UuZ78927Qx5E3nnuayhZ8/AQA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman Description =========== In the Linux kernel, the following vulnerability has been resolved: ceph: don't leak snap_rwsem in handle_cap_grant When handle_cap_grant is called on an IMPORT op, then the snap_rwsem is held and the function is expected to release it before returning. It currently fails to do that in all cases which could lead to a deadlock. The Linux kernel CVE team has assigned CVE-2022-50059 to this issue. Affected and fixed versions =========================== Issue introduced in 5.8 with commit 6f05b30ea063a2a05dda47a4105a69267ae5270f and fixed in 5.10.138 with commit aee18421bda6bf12a7cba6a3d7751c0e1cfd0094 Issue introduced in 5.8 with commit 6f05b30ea063a2a05dda47a4105a69267ae5270f and fixed in 5.15.63 with commit f546faa216d0f53a42ca73ba1fd8c48765b22d77 Issue introduced in 5.8 with commit 6f05b30ea063a2a05dda47a4105a69267ae5270f and fixed in 5.19.4 with commit a090cc69699ec2d11b5e34cee8c61f0d4b0068cb Issue introduced in 5.8 with commit 6f05b30ea063a2a05dda47a4105a69267ae5270f and fixed in 6.0 with commit 58dd4385577ed7969b80cdc9e2a31575aba6c712 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-50059 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: fs/ceph/caps.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/aee18421bda6bf12a7cba6a3d7751c0e1cfd0094 https://git.kernel.org/stable/c/f546faa216d0f53a42ca73ba1fd8c48765b22d77 https://git.kernel.org/stable/c/a090cc69699ec2d11b5e34cee8c61f0d4b0068cb https://git.kernel.org/stable/c/58dd4385577ed7969b80cdc9e2a31575aba6c712