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 F39D228D8D1 for ; Wed, 18 Jun 2025 11:13:54 +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=1750245235; cv=none; b=ELANyq3bj1LyRkbsqIwwBn/udt868NG0ILRNfDDe9VJ4Yl4lldboEmmbrv+dSitAX0QB7QgYpFoj3nqwJIJmGueFH0/hK92TQ1+Sq1iBZQ4Nkw0yyE4P+RV+eeJdMuL3m926oYj6tU1owx8HcgdM0vrHNX994nkqJHrMzcUdAVY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750245235; c=relaxed/simple; bh=wCxyrHPEKQsDd98yhRXge92I8Wn+Z0OkJ6scR5ULNvc=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=EJfS71BkLEeEMbND+2Dr5fSs4eFtmfll5t7FowSrdHUkA63yux3/wZZcqxZqb3neLl/2eyhpDZn4utfP4nzzGBc92JlsnvqVfY9zfQfBw8e/pFHM2US3epaJ+SlRLGhfwzHzE7OA9f4vQTfFYFG3WwkDzBMV220XyuSK+eed0gM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=cwt37Kqr; 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="cwt37Kqr" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 61B8EC4CEE7; Wed, 18 Jun 2025 11:13:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1750245234; bh=wCxyrHPEKQsDd98yhRXge92I8Wn+Z0OkJ6scR5ULNvc=; h=From:To:Cc:Subject:Date:Reply-to:From; b=cwt37KqrgvvuW9kJr65zenUYRdonkh9gPOTy7/XulPHJhnxoTUBzyT3Xmzxd60muA WDEc/swc1hVx8FOF//B7sMNV1eBB6FlxL4lmuGccbFUbd0s7PSTulQb44ZGLgyBtUM 3pkAmc/1EzhdZRDMiqK2DfSJwV/MKF3yMF+F4qt4= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-50138: RDMA/qedr: Fix potential memory leak in __qedr_alloc_mr() Date: Wed, 18 Jun 2025 13:03:23 +0200 Message-ID: <2025061817-CVE-2022-50138-cd9d@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=2805; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=IjlX9wcApdv6BvS0BU/n+sWTti42vRTD3q44b62YocE=; b=owGbwMvMwCRo6H6F97bub03G02pJDBlBc2qLJ3//sCIr7fj0E4Jca/4kmX2uVX/3M3ZlTZGWC vOk5Q8dOmJZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAiJzUZFjTw1pmVTKrUMpS8 dWnm8hcvMt72mjHM02xcVGzZ714WcDxgpeSbRs/NKtz6AA== 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/qedr: Fix potential memory leak in __qedr_alloc_mr() __qedr_alloc_mr() allocates a memory chunk for "mr->info.pbl_table" with init_mr_info(). When rdma_alloc_tid() and rdma_register_tid() fail, "mr" is released while "mr->info.pbl_table" is not released, which will lead to a memory leak. We should release the "mr->info.pbl_table" with qedr_free_pbl() when error occurs to fix the memory leak. The Linux kernel CVE team has assigned CVE-2022-50138 to this issue. Affected and fixed versions =========================== Issue introduced in 4.9 with commit e0290cce6ac02f8e5ec501f25f6f6900f384550c and fixed in 5.10.137 with commit 79ce50dddaf28b5c57911ecc80a2be17a0b17f83 Issue introduced in 4.9 with commit e0290cce6ac02f8e5ec501f25f6f6900f384550c and fixed in 5.15.61 with commit 7e647a8d5fc0a2c8e0f36f585a6388286a25bb15 Issue introduced in 4.9 with commit e0290cce6ac02f8e5ec501f25f6f6900f384550c and fixed in 5.18.18 with commit 07ba048df306dc93fc4d2ef670b9e24644a2069f Issue introduced in 4.9 with commit e0290cce6ac02f8e5ec501f25f6f6900f384550c and fixed in 5.19.2 with commit b4c9f7db9f0148423557539af0fdf513338efe08 Issue introduced in 4.9 with commit e0290cce6ac02f8e5ec501f25f6f6900f384550c and fixed in 6.0 with commit b3236a64ddd125a455ef5b5316c1b9051b732974 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-50138 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/qedr/verbs.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/79ce50dddaf28b5c57911ecc80a2be17a0b17f83 https://git.kernel.org/stable/c/7e647a8d5fc0a2c8e0f36f585a6388286a25bb15 https://git.kernel.org/stable/c/07ba048df306dc93fc4d2ef670b9e24644a2069f https://git.kernel.org/stable/c/b4c9f7db9f0148423557539af0fdf513338efe08 https://git.kernel.org/stable/c/b3236a64ddd125a455ef5b5316c1b9051b732974