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 D7A3F2E54D7 for ; Tue, 7 Oct 2025 15:24:44 +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=1759850684; cv=none; b=UTf6A9l0ckmT37x0fElYkrOctnLMf8zAqIqHsZyGsWuy6ACM7ioKXxQ69egM2hJTV1e6O3qKo50wWHUa1eTl7dg+dmCk7x+dMfFQLBp0jJo9gjqdCx3eP/BCfv/GCuHWUOpe3YUNsCcNgBJ2luW0IJ1hAWlwOib+BNgnuksngpk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1759850684; c=relaxed/simple; bh=xoLED2UwLnQd89Azk4Npc2bTKlI6Th9M6Blbp6m5z68=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=KTqLQzJFV9w7pKJrnHWUPC+JNlRDrc/Xx4igslD/tX3gSmCg4rLuc3zUDOACjSkPtgapissH+7P5922LUTkm/zyQ0u4NDrSjqiHKeaG0W4IusuaNhomBHcR6awJ4G9XGt+nwlnYOM+jTWhmOeO0vahOLJWLWBTfzxgA1gshA6Xc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=WirUIQll; 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="WirUIQll" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 172FBC4CEF1; Tue, 7 Oct 2025 15:24:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1759850684; bh=xoLED2UwLnQd89Azk4Npc2bTKlI6Th9M6Blbp6m5z68=; h=From:To:Cc:Subject:Date:Reply-to:From; b=WirUIQll178BY2F+0P3qBTi1/KLC8VjT9Szgphr0Sdb54qL/OlpT4MXupeLLe5YtW FvwtMgVG513F3OJ3uttVsb1IXo2tQo9CjASWUOKc7kSD+WlSA3otaZ1M01mZTEVlad ouh13wGqLsRyoOvfwY7wRmRoQ4cYshTGLV6YEUhs= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-50543: RDMA/rxe: Fix mr->map double free Date: Tue, 7 Oct 2025 17:21:01 +0200 Message-ID: <2025100756-CVE-2022-50543-597d@gregkh> X-Mailer: git-send-email 2.51.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=3248; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=jcF1N29DUbZMMtDyzFWUpjvYQs2yzJ31Z6SM9HdViEA=; b=owGbwMvMwCRo6H6F97bub03G02pJDBlP9W+ecb3OtSTpRe3054u67q1vst8a1DFNkmMbA8u6T u6TmRccO2JZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAiFy4wzM/fvOGkyZ7jOXMz BBaahTG/OD9Vzp1hnl6exOKaW4FJblM+vpqvfvXLfUWjQwA= 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/rxe: Fix mr->map double free rxe_mr_cleanup() which tries to free mr->map again will be called when rxe_mr_init_user() fails: CPU: 0 PID: 4917 Comm: rdma_flush_serv Kdump: loaded Not tainted 6.1.0-rc1-roce-flush+ #25 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.0-0-gd239552ce722-prebuilt.qemu.org 04/01/2014 Call Trace: dump_stack_lvl+0x45/0x5d panic+0x19e/0x349 end_report.part.0+0x54/0x7c kasan_report.cold+0xa/0xf rxe_mr_cleanup+0x9d/0xf0 [rdma_rxe] __rxe_cleanup+0x10a/0x1e0 [rdma_rxe] rxe_reg_user_mr+0xb7/0xd0 [rdma_rxe] ib_uverbs_reg_mr+0x26a/0x480 [ib_uverbs] ib_uverbs_handler_UVERBS_METHOD_INVOKE_WRITE+0x1a2/0x250 [ib_uverbs] ib_uverbs_cmd_verbs+0x1397/0x15a0 [ib_uverbs] This issue was firstly exposed since commit b18c7da63fcb ("RDMA/rxe: Fix memory leak in error path code") and then we fixed it in commit 8ff5f5d9d8cf ("RDMA/rxe: Prevent double freeing rxe_map_set()") but this fix was reverted together at last by commit 1e75550648da (Revert "RDMA/rxe: Create duplicate mapping tables for FMRs") Simply let rxe_mr_cleanup() always handle freeing the mr->map once it is successfully allocated. The Linux kernel CVE team has assigned CVE-2022-50543 to this issue. Affected and fixed versions =========================== Issue introduced in 6.0 with commit 1e75550648da1fa1cd1969e7597355de8fe8caf6 and fixed in 6.0.16 with commit 6ce577f09013206e36e674cd27da3707b2278268 Issue introduced in 6.0 with commit 1e75550648da1fa1cd1969e7597355de8fe8caf6 and fixed in 6.1.2 with commit 06f73568f553b5be6ba7f6fe274d333ea29fc46d Issue introduced in 6.0 with commit 1e75550648da1fa1cd1969e7597355de8fe8caf6 and fixed in 6.2 with commit 7d984dac8f6bf4ebd3398af82b357e1d181ecaac Issue introduced in 5.19.4 with commit e004a35e8148ad9fc438b0479884641acf382896 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-50543 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/rxe/rxe_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/6ce577f09013206e36e674cd27da3707b2278268 https://git.kernel.org/stable/c/06f73568f553b5be6ba7f6fe274d333ea29fc46d https://git.kernel.org/stable/c/7d984dac8f6bf4ebd3398af82b357e1d181ecaac