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 B8987198E6F for ; Thu, 1 May 2025 14:19:48 +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=1746109188; cv=none; b=sOAEM0ecSqeT0iZ8U7jbt+HZ+9XL820hzgjAr72BgG5AX2iqYHJ8E1vWarbeLhLXpBIR/E8K7iNYwcT4/RyCKOKOMDZTCbIXOw/+i0Y8qYTRlcLoIGahC4wyqkPzb/OYLwdjxOz5F6K5dlBuXTwaS2w5AVXQeXoAU92GWaVVVig= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746109188; c=relaxed/simple; bh=SlRrS8Bb2IB+ClVfyHrADH03nqXTr2TDH9MyzyjO/Ho=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=ujC7sqNk845q25Jli/YKN5YUHT9BTiKqq1kpB6v0VQuUomSKxA5o6+w0BUMfj9pnrvvCxuh/jPTVeAdND12ZTERBDoDnvhtM+zlRjCdKEUSGvqqzLLZBpdWMZa2he9YJTBKaOwdbPVN4nRrqSW0rINrVF2HKh3/u0Kgqg1/uOiM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=a5V8vhqO; 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="a5V8vhqO" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2E557C4CEE3; Thu, 1 May 2025 14:19:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1746109188; bh=SlRrS8Bb2IB+ClVfyHrADH03nqXTr2TDH9MyzyjO/Ho=; h=From:To:Cc:Subject:Date:Reply-to:From; b=a5V8vhqOxw68ck0lwlcteyJT3JQaDU8BdzfOiU7LIo3jFzZ3Wb2O94twgEqqxsl/s mNQ1DdkY5J163d+O4DZ4TrDk14oGi/D3/uitJ7LGIH6h1N0RTuY/xX4lrdYzbwVjlG /76fJacS6DUtKIizaD0k4bvzUC2785BHn0T0pVuo= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-49930: RDMA/hns: Fix NULL pointer problem in free_mr_init() Date: Thu, 1 May 2025 16:12:00 +0200 Message-ID: <2025050112-CVE-2022-49930-91ab@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=2730; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=c1+d5FFKQ+M0P9b+YuH2QlZt9131Q6MOEOhRXUc+Vuc=; b=owGbwMvMwCRo6H6F97bub03G02pJDBnCDUfas6ZH87E+sA5fWfg0+f/cNQK9x2Xfyr6//G/G7 SXr51TxdMSyMAgyMciKKbJ82cZzdH/FIUUvQ9vTMHNYmUCGMHBxCsBE3CoZFiy7yTRvFbdi0M/3 txPey/stSrku5cswP8xxssXxDbbTrr5UizSOZQ77+TEuBQA= 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: RDMA/hns: Fix NULL pointer problem in free_mr_init() Lock grab occurs in a concurrent scenario, resulting in stepping on a NULL pointer. It should be init mutex_init() first before use the lock. Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000 Call trace: __mutex_lock.constprop.0+0xd0/0x5c0 __mutex_lock_slowpath+0x1c/0x2c mutex_lock+0x44/0x50 free_mr_send_cmd_to_hw+0x7c/0x1c0 [hns_roce_hw_v2] hns_roce_v2_dereg_mr+0x30/0x40 [hns_roce_hw_v2] hns_roce_dereg_mr+0x4c/0x130 [hns_roce_hw_v2] ib_dereg_mr_user+0x54/0x124 uverbs_free_mr+0x24/0x30 destroy_hw_idr_uobject+0x38/0x74 uverbs_destroy_uobject+0x48/0x1c4 uobj_destroy+0x74/0xcc ib_uverbs_cmd_verbs+0x368/0xbb0 ib_uverbs_ioctl+0xec/0x1a4 __arm64_sys_ioctl+0xb4/0x100 invoke_syscall+0x50/0x120 el0_svc_common.constprop.0+0x58/0x190 do_el0_svc+0x30/0x90 el0_svc+0x2c/0xb4 el0t_64_sync_handler+0x1a4/0x1b0 el0t_64_sync+0x19c/0x1a0 The Linux kernel CVE team has assigned CVE-2022-49930 to this issue. Affected and fixed versions =========================== Issue introduced in 5.18 with commit 70f92521584f1d1e8268311ee84413307b0fdea8 and fixed in 6.0.8 with commit 0e23e85d86b78e734dd6654f1b69fbaeb5534c81 Issue introduced in 5.18 with commit 70f92521584f1d1e8268311ee84413307b0fdea8 and fixed in 6.1 with commit 12bcaf87d8b66d8cd812479c8a6349dcb245375c 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-49930 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/hns/hns_roce_hw_v2.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/0e23e85d86b78e734dd6654f1b69fbaeb5534c81 https://git.kernel.org/stable/c/12bcaf87d8b66d8cd812479c8a6349dcb245375c