From mboxrd@z Thu Jan 1 00:00:00 1970 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 06AAB217F36 for ; Thu, 27 Mar 2025 14:58:56 +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=1743087536; cv=none; b=P13lJNH5m7AJrtKXgDnmLTGKDkBEyPz6fgbnThGguWMH1I4a4v4VD5/prZNIgEJSOU2joDNMHmoUmyKB6y+erpfIue3+GuyjHev17K3OC8ZCPvO7bPAK5WoS9HSDauLUcpAUoX0jxqwwDZGVLE6M1POVluGtMe/Qs1O+RwKUsrw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743087536; c=relaxed/simple; bh=GQBTk+ncJlvAyehAfXbgTYWGnel3PY5BCaVaJFWy3mM=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=NxcepxrG0avt+k8SFecX4WLvfpio1OlVYqB2jLr+tX2KqRgSRjkXwMp9OshiIeRyGmu3pjTB6n6vfbDH3YmA0EOuu6RxjOPMHLwfBuZndSBJP4s6mDWW2IWV0pAoKsLCmZKhY8DSKqb99iuPYofjPbdyknj4wBqhVOWBIXQsUTA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=lKrKs2NY; 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="lKrKs2NY" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 640DAC4CEE8; Thu, 27 Mar 2025 14:58:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1743087535; bh=GQBTk+ncJlvAyehAfXbgTYWGnel3PY5BCaVaJFWy3mM=; h=From:To:Cc:Subject:Date:Reply-to:From; b=lKrKs2NYjvGiMxYNEQU5HK22Ny/LIXd6L8KJf5ixquzqNQahtSd8NVXNiya4rHfOf PtjOIsRagUagFRkvpNgVMbDBSZR627nuRfUTQFJR8ehw84HHTB7ReAlKqc1hwR+68C ukHaNmSrG495mp27swcNkXFD9yMBIp/whUCDSgI0= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-21886: RDMA/mlx5: Fix implicit ODP hang on parent deregistration Date: Thu, 27 Mar 2025 15:58:20 +0100 Message-ID: <2025032713-CVE-2025-21886-9ca3@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=3806; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=GQBTk+ncJlvAyehAfXbgTYWGnel3PY5BCaVaJFWy3mM=; b=owGbwMvMwCRo6H6F97bub03G02pJDOlP01vf2Hn2SnYHTrwbs8nCND92azp7d0es3xG3M4vS7 Td8vizWEcvCIMjEICumyPJlG8/R/RWHFL0MbU/DzGFlAhnCwMUpABNxn8IwV8h+xouCZfkC7pWr tuhKyDolt4f0M8wz2FcimMMSErI4MNT+8R1Ja4fFS74AAA== X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit Description =========== In the Linux kernel, the following vulnerability has been resolved: RDMA/mlx5: Fix implicit ODP hang on parent deregistration Fix the destroy_unused_implicit_child_mr() to prevent hanging during parent deregistration as of below [1]. Upon entering destroy_unused_implicit_child_mr(), the reference count for the implicit MR parent is incremented using: refcount_inc_not_zero(). A corresponding decrement must be performed if free_implicit_child_mr_work() is not called. The code has been updated to properly manage the reference count that was incremented. [1] INFO: task python3:2157 blocked for more than 120 seconds. Not tainted 6.12.0-rc7+ #1633 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. task:python3 state:D stack:0 pid:2157 tgid:2157 ppid:1685 flags:0x00000000 Call Trace: __schedule+0x420/0xd30 schedule+0x47/0x130 __mlx5_ib_dereg_mr+0x379/0x5d0 [mlx5_ib] ? __pfx_autoremove_wake_function+0x10/0x10 ib_dereg_mr_user+0x5f/0x120 [ib_core] ? lock_release+0xc6/0x280 destroy_hw_idr_uobject+0x1d/0x60 [ib_uverbs] uverbs_destroy_uobject+0x58/0x1d0 [ib_uverbs] uobj_destroy+0x3f/0x70 [ib_uverbs] ib_uverbs_cmd_verbs+0x3e4/0xbb0 [ib_uverbs] ? __pfx_uverbs_destroy_def_handler+0x10/0x10 [ib_uverbs] ? lock_acquire+0xc1/0x2f0 ? ib_uverbs_ioctl+0xcb/0x170 [ib_uverbs] ? ib_uverbs_ioctl+0x116/0x170 [ib_uverbs] ? lock_release+0xc6/0x280 ib_uverbs_ioctl+0xe7/0x170 [ib_uverbs] ? ib_uverbs_ioctl+0xcb/0x170 [ib_uverbs] __x64_sys_ioctl+0x1b0/0xa70 ? kmem_cache_free+0x221/0x400 do_syscall_64+0x6b/0x140 entry_SYSCALL_64_after_hwframe+0x76/0x7e RIP: 0033:0x7f20f21f017b RSP: 002b:00007ffcfc4a77c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007ffcfc4a78d8 RCX: 00007f20f21f017b RDX: 00007ffcfc4a78c0 RSI: 00000000c0181b01 RDI: 0000000000000003 RBP: 00007ffcfc4a78a0 R08: 000056147d125190 R09: 00007f20f1f14c60 R10: 0000000000000001 R11: 0000000000000246 R12: 00007ffcfc4a7890 R13: 000000000000001c R14: 000056147d100fc0 R15: 00007f20e365c9d0 The Linux kernel CVE team has assigned CVE-2025-21886 to this issue. Affected and fixed versions =========================== Issue introduced in 6.12.13 with commit 7cc8f681f6d4ae4478ae0f60485fc768f2b450da and fixed in 6.12.18 with commit cb96ae783e7249e8e5a50c22952c0bb2983133df Issue introduced in 6.13.2 with commit edfb65dbb9ffd3102f3ff4dd21316158e56f1976 and fixed in 6.13.6 with commit a095ede2daca49d15e74d66d014883f2fa8bb924 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-21886 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/cb96ae783e7249e8e5a50c22952c0bb2983133df https://git.kernel.org/stable/c/a095ede2daca49d15e74d66d014883f2fa8bb924 https://git.kernel.org/stable/c/3d8c6f26893d55fab218ad086719de1fc9bb86ba