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 E9B38218EB8 for ; Wed, 26 Feb 2025 02:24:16 +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=1740536658; cv=none; b=gLnm7fmocsRt3lA4oRB6tkMswJPg5G4ufN4Fu2Gu9s8QZa6oKvb4lsrFI5Iai3LYlI54B/nF7n10/KbS5kuKteg3ltj4bO760Sy9cESgsj0pAh8akRVWnBWjlFVzdlLUUebsG22+x4lRLOrbf/Pl8eG4ZW/dx25ICxPLLQV/lMM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740536658; c=relaxed/simple; bh=EuHdNHLvEuLGxojYyH5ldmdXcmjHMOQraEEy2UlRe5g=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=Ch8AxZaScRTiD42L42ZxmhDfzmNTEdK4msvC9WtT+i0644sAVyiGFLG2HE3CiIT69dVj8rmN+wz5c5jVgy0aMPW3o5bQE159XvK9cgAUtWlhT5JUlWIUflQvZKt4Gt+KzSO22qDcCBKnQ6VEU6mPUX4XEku7g1oK/bbDwYSSKQo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=p76xErSx; 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="p76xErSx" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 62180C4CEE6; Wed, 26 Feb 2025 02:24:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1740536656; bh=EuHdNHLvEuLGxojYyH5ldmdXcmjHMOQraEEy2UlRe5g=; h=From:To:Cc:Subject:Date:Reply-to:From; b=p76xErSxDQLYeqfYAI9XmLxZ1PXR3HH0p0hvPQR2ojruWXve9E93rFcmTPQxqvDaX FRhAhBU29M4rD1ajM7niNzK14Fil2i9KkMMt7TUloPSP3psaKPjI0Amx7p7OR1Ny9/ Dkx5ZIJXBFlOW3yG/4p/I3MshWDdoxTFy47AVNT0= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-49606: RDMA/irdma: Fix sleep from invalid context BUG Date: Wed, 26 Feb 2025 03:22:49 +0100 Message-ID: <2025022612-CVE-2022-49606-3753@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=2984; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=EuHdNHLvEuLGxojYyH5ldmdXcmjHMOQraEEy2UlRe5g=; b=owGbwMvMwCRo6H6F97bub03G02pJDOn7qq4on/1nZ9PtPNHhy7bemMmzatW1zjn+URGr7Fwy4 clNZvWGjlgWBkEmBlkxRZYv23iO7q84pOhlaHsaZg4rE8gQBi5OAZhIqiXD/OxNX6eu+5mmJLnN 6cFP32kzAoSleRgWdPsIHF2n96Bb8z2jyUTjnH7mctu5AA== 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: RDMA/irdma: Fix sleep from invalid context BUG Taking the qos_mutex to process RoCEv2 QP's on netdev events causes a kernel splat. Fix this by removing the handling for RoCEv2 in irdma_cm_teardown_connections that uses the mutex. This handling is only needed for iWARP to avoid having connections established while the link is down or having connections remain functional after the IP address is removed. BUG: sleeping function called from invalid context at kernel/locking/mutex. Call Trace: kernel: dump_stack+0x66/0x90 kernel: ___might_sleep.cold.92+0x8d/0x9a kernel: mutex_lock+0x1c/0x40 kernel: irdma_cm_teardown_connections+0x28e/0x4d0 [irdma] kernel: ? check_preempt_curr+0x7a/0x90 kernel: ? select_idle_sibling+0x22/0x3c0 kernel: ? select_task_rq_fair+0x94c/0xc90 kernel: ? irdma_exec_cqp_cmd+0xc27/0x17c0 [irdma] kernel: ? __wake_up_common+0x7a/0x190 kernel: irdma_if_notify+0x3cc/0x450 [irdma] kernel: ? sched_clock_cpu+0xc/0xb0 kernel: irdma_inet6addr_event+0xc6/0x150 [irdma] The Linux kernel CVE team has assigned CVE-2022-49606 to this issue. Affected and fixed versions =========================== Issue introduced in 5.14 with commit 146b9756f14c04894226fb97e2f102f217139c27 and fixed in 5.15.58 with commit a4c5115140ed1833197bad9a6b80265840ff427f Issue introduced in 5.14 with commit 146b9756f14c04894226fb97e2f102f217139c27 and fixed in 5.18.15 with commit 2cae7e519032e4b4672cb9204d5586a441924364 Issue introduced in 5.14 with commit 146b9756f14c04894226fb97e2f102f217139c27 and fixed in 5.19 with commit cc0315564d6eec91c716d314b743321be24c70b3 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-49606 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/hw/irdma/cm.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/a4c5115140ed1833197bad9a6b80265840ff427f https://git.kernel.org/stable/c/2cae7e519032e4b4672cb9204d5586a441924364 https://git.kernel.org/stable/c/cc0315564d6eec91c716d314b743321be24c70b3