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 C7E5E1ADFFB for ; Wed, 26 Feb 2025 01:58:05 +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=1740535085; cv=none; b=VXN185scN0IgMrkF4IlaVu9k/lFMJbGgDZ5IG0pRqsSXnjEDaW3SnJpYNrxMRn3J+adL1S16TGxCxaOS2f0t6sE2u5cTGGk9XRiX9ApCFz17EJOfqRZa1fpDT3/E9pbm5aYrBA88aloDlKMdiQNYYJC/hDUD4d8AwiVVnycHfIU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740535085; c=relaxed/simple; bh=S93nwlvtns+e6tvwAI262D3JImAJJntc8Js9PQ7uCIk=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=s6lpmNpF3b43MFiplIeLRqoS8rsf50tYo3U1iEjDQh5hbjxeCOuYWEzlMbgsHJfb29IZ8QioUqeALRhh58ExUaZCthHU1wz9NSd/cuxOppER3dGVOcJC3DZ2gTIhmXPbBFfUBdHP7YeRer0KF3HLZc8JQqK13J48qO9tPoHlH0Q= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=bJZKrl86; 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="bJZKrl86" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 99FA4C4CEE6; Wed, 26 Feb 2025 01:58:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1740535085; bh=S93nwlvtns+e6tvwAI262D3JImAJJntc8Js9PQ7uCIk=; h=From:To:Cc:Subject:Date:Reply-to:From; b=bJZKrl86sLYWACZol4kM1ceCKhZ2wkfLRiX2XDNyAK8WPdkntIjYXycBgdtJp59AT u6PmCVskm/vl5IoPiBb0ZftMlWAsTtbUULnWLlQU431fJhpnaIdUb3FgtA3+T5ezQh 2Jc7bo2mtyPpmRhJHH5tj1cuIOmN/wbESXLzVtKI= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-49089: IB/rdmavt: add lock to call to rvt_error_qp to prevent a race condition Date: Wed, 26 Feb 2025 02:54:54 +0100 Message-ID: <2025022658-CVE-2022-49089-2a32@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=3191; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=S93nwlvtns+e6tvwAI262D3JImAJJntc8Js9PQ7uCIk=; b=owGbwMvMwCRo6H6F97bub03G02pJDOn7Ssxibre9PsXukZ22qmbBwTY7tT72DKvyZSHly6ziH R20HmV0xLIwCDIxyIopsnzZxnN0f8UhRS9D29Mwc1iZQIYwcHEKwEQ28DHMU+7b8TyEZXvnpkeH cv++2cmQ8+1RK8P8ui8RT2QuTT+3jfWxuq9V6OpLhf5hAA== 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: IB/rdmavt: add lock to call to rvt_error_qp to prevent a race condition The documentation of the function rvt_error_qp says both r_lock and s_lock need to be held when calling that function. It also asserts using lockdep that both of those locks are held. However, the commit I referenced in Fixes accidentally makes the call to rvt_error_qp in rvt_ruc_loopback no longer covered by r_lock. This results in the lockdep assertion failing and also possibly in a race condition. The Linux kernel CVE team has assigned CVE-2022-49089 to this issue. Affected and fixed versions =========================== Issue introduced in 5.1 with commit d757c60eca9b22f4d108929a24401e0fdecda0b1 and fixed in 5.4.189 with commit 8a50937227c385a477177c9ffa122b4230e40666 Issue introduced in 5.1 with commit d757c60eca9b22f4d108929a24401e0fdecda0b1 and fixed in 5.10.111 with commit 43c2d7890ecabe527448a6c391fb2d9a5e6bbfe0 Issue introduced in 5.1 with commit d757c60eca9b22f4d108929a24401e0fdecda0b1 and fixed in 5.15.34 with commit 92f1947c0d26060e978b3a9f21f32ce7c8c9cca3 Issue introduced in 5.1 with commit d757c60eca9b22f4d108929a24401e0fdecda0b1 and fixed in 5.16.20 with commit 77ffb2495a41098f9d6a14f8aefde3188da75944 Issue introduced in 5.1 with commit d757c60eca9b22f4d108929a24401e0fdecda0b1 and fixed in 5.17.3 with commit 57800cc36e55db0547461c49acf5cd84c0f502b0 Issue introduced in 5.1 with commit d757c60eca9b22f4d108929a24401e0fdecda0b1 and fixed in 5.18 with commit 4d809f69695d4e7d1378b3a072fa9aef23123018 Issue introduced in 5.0.4 with commit 25636de95557a95d54ac30be94af3748345a0a90 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-49089 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/infiniband/sw/rdmavt/qp.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/8a50937227c385a477177c9ffa122b4230e40666 https://git.kernel.org/stable/c/43c2d7890ecabe527448a6c391fb2d9a5e6bbfe0 https://git.kernel.org/stable/c/92f1947c0d26060e978b3a9f21f32ce7c8c9cca3 https://git.kernel.org/stable/c/77ffb2495a41098f9d6a14f8aefde3188da75944 https://git.kernel.org/stable/c/57800cc36e55db0547461c49acf5cd84c0f502b0 https://git.kernel.org/stable/c/4d809f69695d4e7d1378b3a072fa9aef23123018