All of lore.kernel.org
 help / color / mirror / Atom feed
* CVE-2026-98253: RDMA/ucma: Serialize join and leave on copy_to_user failure
@ 2026-10-06  8:45 Greg Kroah-Hartman
  0 siblings, 0 replies; only message in thread
From: Greg Kroah-Hartman @ 2026-10-06  8:45 UTC (permalink / raw)
  To: linux-cve-announce; +Cc: Greg Kroah-Hartman

From: Greg Kroah-Hartman <gregkh@kernel.org>

Description
===========

In the Linux kernel, the following vulnerability has been resolved:

RDMA/ucma: Serialize join and leave on copy_to_user failure

rdma_join_multicast() queues RoCE work that later reads the ucma_multicast
through event->param.ud.private_data, then list_add()s the CMA multicast
at the head of id_priv->mc_list. rdma_leave_multicast() matches only by
sockaddr and destroys the first hit.

ucma_process_join() used to drop ctx->mutex after a successful join and
retake it only if copy_to_user() failed. Two concurrent JOIN_MCAST calls
with the same address can therefore insert a second CMA entry before the
first thread's leave. leave then cancels the newer work and the older
worker still dereferences the ucma_multicast that the first thread frees.

Keep ctx->mutex held from rdma_join_multicast() through copy_to_user() and,
on -EFAULT, through rdma_leave_multicast() so leave cannot miss this join.
Do not leave if join itself failed: that path never published this address
on mc_list, and a leave-by-addr would destroy an earlier successful join.

The Linux kernel CVE team has assigned CVE-2026-98253 to this issue.


Affected and fixed versions
===========================

	Issue introduced in 5.10.20 with commit 60d613b39e8d0c9f3b526e9c96445422b4562d76 and fixed in 5.10.271 with commit 29b9ed83d8bfab5c6e11fcbf1aa836aa4ae26cb9
	Issue introduced in 5.12 with commit fe454dc31e84f8c14cb8942fcb61666c9f40745b and fixed in 5.15.222 with commit 52172e11bd074ccaded21740ffeb67123f01dd00
	Issue introduced in 5.12 with commit fe454dc31e84f8c14cb8942fcb61666c9f40745b and fixed in 6.1.189 with commit 01e29d0d78a8f66f221625720a04939eef5ec1f6
	Issue introduced in 5.12 with commit fe454dc31e84f8c14cb8942fcb61666c9f40745b and fixed in 6.6.158 with commit ae805d204cf1f15b87d1bf3529b4c649f3519420
	Issue introduced in 5.12 with commit fe454dc31e84f8c14cb8942fcb61666c9f40745b and fixed in 6.12.112 with commit 43c4e24bd10370fc976f6220518049ce71419399
	Issue introduced in 5.12 with commit fe454dc31e84f8c14cb8942fcb61666c9f40745b and fixed in 6.18.54 with commit 01cbdb724c584d7772fd25af2e4dfdf8527ce0d5
	Issue introduced in 5.12 with commit fe454dc31e84f8c14cb8942fcb61666c9f40745b and fixed in 7.2.8 with commit 83610ee5e498fa5bfcb80031d2b959baea276bf6
	Issue introduced in 5.12 with commit fe454dc31e84f8c14cb8942fcb61666c9f40745b and fixed in 7.3-rc4 with commit 662ade4de9ff5eceb0820a9f8e9fac70ba6a815b
	Issue introduced in 5.11.3 with commit a3262b3884dd67b4c5632ce7cdf9cff9d1a575d4

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-2026-98253
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/core/ucma.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/29b9ed83d8bfab5c6e11fcbf1aa836aa4ae26cb9
	https://git.kernel.org/stable/c/52172e11bd074ccaded21740ffeb67123f01dd00
	https://git.kernel.org/stable/c/01e29d0d78a8f66f221625720a04939eef5ec1f6
	https://git.kernel.org/stable/c/ae805d204cf1f15b87d1bf3529b4c649f3519420
	https://git.kernel.org/stable/c/43c4e24bd10370fc976f6220518049ce71419399
	https://git.kernel.org/stable/c/01cbdb724c584d7772fd25af2e4dfdf8527ce0d5
	https://git.kernel.org/stable/c/83610ee5e498fa5bfcb80031d2b959baea276bf6
	https://git.kernel.org/stable/c/662ade4de9ff5eceb0820a9f8e9fac70ba6a815b

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-10-06 10:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-06  8:45 CVE-2026-98253: RDMA/ucma: Serialize join and leave on copy_to_user failure Greg Kroah-Hartman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.