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 8120E2E8B74 for ; Tue, 30 Dec 2025 12:34:26 +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=1767098066; cv=none; b=QqJ7eEeKMcY5VSnnprft/gcGAWoKh6IlkxVcNqf6FzJagGggP7dXMLu3qhW8pauMOgarH8BaS8FoMPb610fnheZkR70r34hvPfgcOYzY6EjWVqjGHkHSC5zrd0iIg8O2NAQIVmocQWVxCJPhLlAXPJGAEKAq+fXnSnQEnlYLSMA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767098066; c=relaxed/simple; bh=hJuwisfZFRekH6+VjLD6J3HGfg2zOBnxR2kV46ezI00=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=iuOxWoqG2KdYx5WYH6LKB8tssHTdbetK3JLkzshlSZrJKlmsf/GiCzn2Qy2UyAxbs0+16aAYoAG86U/tke9ypcET8p7fAPWMzzccN1g7VAL+dgL5zptX+ZHL2IFZnep/zbZsMxISaGKtq7SiIml97XDVOi5f1Ewc6450sr4St3I= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=SHzEvWWy; 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="SHzEvWWy" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E0BC2C2BC86; Tue, 30 Dec 2025 12:34:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1767098066; bh=hJuwisfZFRekH6+VjLD6J3HGfg2zOBnxR2kV46ezI00=; h=From:To:Cc:Subject:Date:Reply-To:From; b=SHzEvWWyn6y4mtvgb3MDVmothDWSA4t5wbJIyU+cRROayNUmCbllB9pI8sg57C4MW FrF8DYUTAXfkL7XLRPBdPamcR2L9yBzrPL023snn0jH2e31RG4UJMmqMc8NgUcxVi4 /j4ZLeVKRW5osOql3SthjbVWYqnPa2M0uUXnB+3Y= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-50885: RDMA/rxe: Fix NULL-ptr-deref in rxe_qp_do_cleanup() when socket create failed Date: Tue, 30 Dec 2025 13:34:20 +0100 Message-ID: <2025123020-CVE-2022-50885-c207@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=4388; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=Cdvnbez3uGhUQvpsYlCySkgU+c/Ghwph6FziTTFS7Kk=; b=owGbwMvMwCRo6H6F97bub03G02pJDJnBx84mL9uXZaF1w32J4sSdTd4xyR9NX3q+Tfksc31jS sN8NaXdHTEsDIJMDLJiiixftvEc3V9xSNHL0PY0zBxWJpAhDFycAjCR+98YFuxsb+Mr7D+0LcRY f03ilJeBZaLTgxlmbL1UGrWs0S207ZbopR9+fRMqN2sCAA== 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 NULL-ptr-deref in rxe_qp_do_cleanup() when socket create failed There is a null-ptr-deref when mount.cifs over rdma: BUG: KASAN: null-ptr-deref in rxe_qp_do_cleanup+0x2f3/0x360 [rdma_rxe] Read of size 8 at addr 0000000000000018 by task mount.cifs/3046 CPU: 2 PID: 3046 Comm: mount.cifs Not tainted 6.1.0-rc5+ #62 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.14.0-1.fc3 Call Trace: dump_stack_lvl+0x34/0x44 kasan_report+0xad/0x130 rxe_qp_do_cleanup+0x2f3/0x360 [rdma_rxe] execute_in_process_context+0x25/0x90 __rxe_cleanup+0x101/0x1d0 [rdma_rxe] rxe_create_qp+0x16a/0x180 [rdma_rxe] create_qp.part.0+0x27d/0x340 ib_create_qp_kernel+0x73/0x160 rdma_create_qp+0x100/0x230 _smbd_get_connection+0x752/0x20f0 smbd_get_connection+0x21/0x40 cifs_get_tcp_session+0x8ef/0xda0 mount_get_conns+0x60/0x750 cifs_mount+0x103/0xd00 cifs_smb3_do_mount+0x1dd/0xcb0 smb3_get_tree+0x1d5/0x300 vfs_get_tree+0x41/0xf0 path_mount+0x9b3/0xdd0 __x64_sys_mount+0x190/0x1d0 do_syscall_64+0x35/0x80 entry_SYSCALL_64_after_hwframe+0x46/0xb0 The root cause of the issue is the socket create failed in rxe_qp_init_req(). So move the reset rxe_qp_do_cleanup() after the NULL ptr check. The Linux kernel CVE team has assigned CVE-2022-50885 to this issue. Affected and fixed versions =========================== Issue introduced in 4.8 with commit 8700e3e7c4857d28ebaa824509934556da0b3e76 and fixed in 4.14.303 with commit ee24de095569935eba600f7735e8e8ddea5b418e Issue introduced in 4.8 with commit 8700e3e7c4857d28ebaa824509934556da0b3e76 and fixed in 4.19.270 with commit 7340ca9f782be6fbe3f64a134dc112772764f766 Issue introduced in 4.8 with commit 8700e3e7c4857d28ebaa824509934556da0b3e76 and fixed in 5.4.229 with commit bd7106a6004f1077a365ca7f5a99c7a708e20714 Issue introduced in 4.8 with commit 8700e3e7c4857d28ebaa824509934556da0b3e76 and fixed in 5.10.163 with commit 6bb5a62bfd624039b05157745c234068508393a9 Issue introduced in 4.8 with commit 8700e3e7c4857d28ebaa824509934556da0b3e76 and fixed in 5.15.86 with commit f64f08b9e6fb305a25dd75329e06ae342b9ce336 Issue introduced in 4.8 with commit 8700e3e7c4857d28ebaa824509934556da0b3e76 and fixed in 6.0.16 with commit 5b924632d84a60bc0c7fe6e9bbbce99d03908957 Issue introduced in 4.8 with commit 8700e3e7c4857d28ebaa824509934556da0b3e76 and fixed in 6.1.2 with commit 821f9a18210f6b9fd6792471714c799607b25db4 Issue introduced in 4.8 with commit 8700e3e7c4857d28ebaa824509934556da0b3e76 and fixed in 6.2 with commit f67376d801499f4fa0838c18c1efcad8840e550d 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-50885 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_qp.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/ee24de095569935eba600f7735e8e8ddea5b418e https://git.kernel.org/stable/c/7340ca9f782be6fbe3f64a134dc112772764f766 https://git.kernel.org/stable/c/bd7106a6004f1077a365ca7f5a99c7a708e20714 https://git.kernel.org/stable/c/6bb5a62bfd624039b05157745c234068508393a9 https://git.kernel.org/stable/c/f64f08b9e6fb305a25dd75329e06ae342b9ce336 https://git.kernel.org/stable/c/5b924632d84a60bc0c7fe6e9bbbce99d03908957 https://git.kernel.org/stable/c/821f9a18210f6b9fd6792471714c799607b25db4 https://git.kernel.org/stable/c/f67376d801499f4fa0838c18c1efcad8840e550d