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 0ADB42ECD2E for ; Fri, 25 Jul 2025 12:55:57 +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=1753448157; cv=none; b=ADEBc+JOxiLuKPJ0GhV7nnyc7qLaMzyn5y2tTVM1ClSdv9pMyVIuDSc0SxNdFUtEBGKj6bf3qATGYJ2y/a4f+EO0jKW9HGn5p5VF0iRvPX5dleAV1TY04AzyLF7C2yme1TD621ZzyknmfIS62RPeR8WbKJzBaxBnBiVJ059iklU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1753448157; c=relaxed/simple; bh=FAfwEh0LwXtdpKXy4LgJMalGrpIfx/c2zq/1afYOVvg=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=WSyXfj9iLCC6WmaQxwQqTwVqfO8R+3T/N3/S9/C+13Pqwu/s1cxxNpSnVfvOnt6YNjtftSlF1Ki5B4BaNq0v28cqmQgLOdKgkzO6nELLRdQ0bzoskLnHNVMBbRDwL2n+GBBGE1iEeyfj2lNIiZfofxc8Km5ldgg5/n4yZ58VvEY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=kNj+D8oV; 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="kNj+D8oV" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 68DB0C4CEEB; Fri, 25 Jul 2025 12:55:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1753448156; bh=FAfwEh0LwXtdpKXy4LgJMalGrpIfx/c2zq/1afYOVvg=; h=From:To:Cc:Subject:Date:Reply-to:From; b=kNj+D8oVxEi/HgurbBWkXuzq26EEiKQRIa5KE7M2fQAzBJIP7H+xoMk+EIjqI1W+s UX0g0NVjdsJGXG9Pc84uct1wYfdtfkFEQAReBrOcl5IUrS1qI+RvxHfVqazgCGqnKZ QoB8JNGMHjAlPX18BXh6doL3dK7+Bxn0R+fAR2S8= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-38372: RDMA/mlx5: Fix unsafe xarray access in implicit ODP handling Date: Fri, 25 Jul 2025 14:55:03 +0200 Message-ID: <2025072503-CVE-2025-38372-6659@gregkh> X-Mailer: git-send-email 2.50.1 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=4134; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=YS20V5aRezdDvv7bvnLdkwE1f8MmrA2fn9z23EBWDXU=; b=owGbwMvMwCRo6H6F97bub03G02pJDBnNdcvXbPr3/K2KBu8+s2mecxTcAzYrBe3trt7jxzfzj o/FXD71jlgWBkEmBlkxRZYv23iO7q84pOhlaHsaZg4rE8gQBi5OAZiIgjHDggPTJzjrOYYEeHN8 8vhgoR5Re1Z3OsN8J5O/jVEiagF+72evmHza6EKE1U0XAA== 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/mlx5: Fix unsafe xarray access in implicit ODP handling __xa_store() and __xa_erase() were used without holding the proper lock, which led to a lockdep warning due to unsafe RCU usage. This patch replaces them with xa_store() and xa_erase(), which perform the necessary locking internally. ============================= WARNING: suspicious RCPU usage 6.14.0-rc7_for_upstream_debug_2025_03_18_15_01 #1 Not tainted ----------------------------- ./include/linux/xarray.h:1211 suspicious rcu_dereference_protected() usage! other info that might help us debug this: rcu_scheduler_active = 2, debug_locks = 1 3 locks held by kworker/u136:0/219: at: process_one_work+0xbe4/0x15f0 process_one_work+0x75c/0x15f0 pagefault_mr+0x9a5/0x1390 [mlx5_ib] stack backtrace: CPU: 14 UID: 0 PID: 219 Comm: kworker/u136:0 Not tainted 6.14.0-rc7_for_upstream_debug_2025_03_18_15_01 #1 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.16.0-0-gd239552ce722-prebuilt.qemu.org 04/01/2014 Workqueue: mlx5_ib_page_fault mlx5_ib_eqe_pf_action [mlx5_ib] Call Trace: dump_stack_lvl+0xa8/0xc0 lockdep_rcu_suspicious+0x1e6/0x260 xas_create+0xb8a/0xee0 xas_store+0x73/0x14c0 __xa_store+0x13c/0x220 ? xa_store_range+0x390/0x390 ? spin_bug+0x1d0/0x1d0 pagefault_mr+0xcb5/0x1390 [mlx5_ib] ? _raw_spin_unlock+0x1f/0x30 mlx5_ib_eqe_pf_action+0x3be/0x2620 [mlx5_ib] ? lockdep_hardirqs_on_prepare+0x400/0x400 ? mlx5_ib_invalidate_range+0xcb0/0xcb0 [mlx5_ib] process_one_work+0x7db/0x15f0 ? pwq_dec_nr_in_flight+0xda0/0xda0 ? assign_work+0x168/0x240 worker_thread+0x57d/0xcd0 ? rescuer_thread+0xc40/0xc40 kthread+0x3b3/0x800 ? kthread_is_per_cpu+0xb0/0xb0 ? lock_downgrade+0x680/0x680 ? do_raw_spin_lock+0x12d/0x270 ? spin_bug+0x1d0/0x1d0 ? finish_task_switch.isra.0+0x284/0x9e0 ? lockdep_hardirqs_on_prepare+0x284/0x400 ? kthread_is_per_cpu+0xb0/0xb0 ret_from_fork+0x2d/0x70 ? kthread_is_per_cpu+0xb0/0xb0 ret_from_fork_asm+0x11/0x20 The Linux kernel CVE team has assigned CVE-2025-38372 to this issue. Affected and fixed versions =========================== Issue introduced in 6.12.13 with commit 7cc8f681f6d4ae4478ae0f60485fc768f2b450da and fixed in 6.12.37 with commit 9d2ef890e49963b768d4fe5a33029aacd9f6b93f Issue introduced in 6.14 with commit d3d930411ce390e532470194296658a960887773 and fixed in 6.15.6 with commit ebebffb47c78f63ba7e4fbde393e44af38b7625d Issue introduced in 6.14 with commit d3d930411ce390e532470194296658a960887773 and fixed in 6.16-rc5 with commit 2c6b640ea08bff1a192bf87fa45246ff1e40767c Issue introduced in 6.13.2 with commit edfb65dbb9ffd3102f3ff4dd21316158e56f1976 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-2025-38372 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/mlx5/odp.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/9d2ef890e49963b768d4fe5a33029aacd9f6b93f https://git.kernel.org/stable/c/ebebffb47c78f63ba7e4fbde393e44af38b7625d https://git.kernel.org/stable/c/2c6b640ea08bff1a192bf87fa45246ff1e40767c