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 D803913AF2 for ; Tue, 9 Dec 2025 01:32:08 +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=1765243928; cv=none; b=sh9lKKsu0wFdGoooBCLCuDjlPwfXOdmXhbrl3GWJVxRvXIt3No9Aek9KYXRp71e2PR7XRtZXgZwA1L1k6dolGgoCYbB3HCPMqPn44SYdueMprkcpmURN9psvL2K5B1BZvtUHGsYXXGXq9riqV0mp2GB1ZHsuQO64dzi4715BXEg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765243928; c=relaxed/simple; bh=jBadzSrC2bUGxJmhzSEAikFcnqjqMW1V7lzo7yLioMQ=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=YPC5xZkjP5UQyJUV0QgOWeXeiLB1CPVOcsPT3zB+amCayQwcCxRjDHzDIQx0uuLmG3TxhwRGZdRbfI8eS5BtnnlRECXCLV6C04ewmmZuPgxegzWovzRiQ9d9MsZAhc9B2sVaYyuZqEwDI5pSNisTedPpffiMMLeuN4kXbBiGhBk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=SjSJ1fPC; 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="SjSJ1fPC" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7689EC4CEF1; Tue, 9 Dec 2025 01:32:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1765243928; bh=jBadzSrC2bUGxJmhzSEAikFcnqjqMW1V7lzo7yLioMQ=; h=From:To:Cc:Subject:Date:Reply-To:From; b=SjSJ1fPCiaUpj1h//TfWaykUtirvvrneTN8FRqjTa2P1MUiYa5dUFR5Fj54FwLaD7 qKPtU1/PnE6LnmkdAjyTDYGzy9Mkjk9o2sSgtymZnxroWSj7wSvxDO57lqMDrVj9lR IBAH6gwGAtvRQB1KqVGyo+3q28YKUblb10ckh1OE= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-50662: RDMA/hns: fix memory leak in hns_roce_alloc_mr() Date: Tue, 9 Dec 2025 10:30:47 +0900 Message-ID: <2025120943-CVE-2022-50662-6595@gregkh> X-Mailer: git-send-email 2.52.0 Reply-To: , Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2552; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=pTkGeADQo0swalRj9CUKY5Wqqk9R7TV62OmkYGJAdk4=; b=owGbwMvMwCRo6H6F97bub03G02pJDJnm1Yd9zolkfPGxrNsW5/o6913OvLNanAY5SRsfVnIfP BXxwONDRywLgyATg6yYIsuXbTxH91ccUvQytD0NM4eVCWQIAxenAEwkcDXD/DpJiZVmvV9ddaJf TFCvXMb8Rf8vH8OCjojfu7i2aWdoPraScRLVyunwLTwBAA== 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 memory leak in hns_roce_alloc_mr() When hns_roce_mr_enable() failed in hns_roce_alloc_mr(), mr_key is not released. Compiled test only. The Linux kernel CVE team has assigned CVE-2022-50662 to this issue. Affected and fixed versions =========================== Issue introduced in 5.8 with commit 9b2cf76c9f052987ae5c4ad450ebebdc7c5d7b87 and fixed in 5.10.163 with commit 164fa80330a81db67c26d10d071083941d29a510 Issue introduced in 5.8 with commit 9b2cf76c9f052987ae5c4ad450ebebdc7c5d7b87 and fixed in 5.15.86 with commit 35f9cd060e68ff910e49bf37b1b0d336a311849a Issue introduced in 5.8 with commit 9b2cf76c9f052987ae5c4ad450ebebdc7c5d7b87 and fixed in 6.0.16 with commit fd32e378bc1dea0d48767adf2bbb478581bb0a95 Issue introduced in 5.8 with commit 9b2cf76c9f052987ae5c4ad450ebebdc7c5d7b87 and fixed in 6.1.2 with commit fc2c43bf41c89e7451fe750025ae55eb2e2a741d Issue introduced in 5.8 with commit 9b2cf76c9f052987ae5c4ad450ebebdc7c5d7b87 and fixed in 6.2 with commit a115aa00b18f7b8982b8f458149632caf64a862a 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-50662 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_mr.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/164fa80330a81db67c26d10d071083941d29a510 https://git.kernel.org/stable/c/35f9cd060e68ff910e49bf37b1b0d336a311849a https://git.kernel.org/stable/c/fd32e378bc1dea0d48767adf2bbb478581bb0a95 https://git.kernel.org/stable/c/fc2c43bf41c89e7451fe750025ae55eb2e2a741d https://git.kernel.org/stable/c/a115aa00b18f7b8982b8f458149632caf64a862a