{
  "schema_version": "1.6.1",
  "id": "RPI-CVE-2026-98253",
  "modified": "2026-10-09T11:39:44Z",
  "upstream": [
    "CVE-2026-98253"
  ],
  "published": "2026-10-06T08:47:10Z",
  "summary": "RDMA/ucma: Serialize join and leave on copy_to_user failure",
  "details": "In the Linux kernel, the following vulnerability has been resolved:\n\nRDMA/ucma: Serialize join and leave on copy_to_user failure\n\nrdma_join_multicast() queues RoCE work that later reads the ucma_multicast\nthrough event->param.ud.private_data, then list_add()s the CMA multicast\nat the head of id_priv->mc_list. rdma_leave_multicast() matches only by\nsockaddr and destroys the first hit.\n\nucma_process_join() used to drop ctx->mutex after a successful join and\nretake it only if copy_to_user() failed. Two concurrent JOIN_MCAST calls\nwith the same address can therefore insert a second CMA entry before the\nfirst thread's leave. leave then cancels the newer work and the older\nworker still dereferences the ucma_multicast that the first thread frees.\n\nKeep ctx->mutex held from rdma_join_multicast() through copy_to_user() and,\non -EFAULT, through rdma_leave_multicast() so leave cannot miss this join.\nDo not leave if join itself failed: that path never published this address\non mc_list, and a leave-by-addr would destroy an earlier successful join.",
  "severity": [
    {
      "type": "CVSS_V3",
      "score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
    }
  ],
  "affected": [
    {
      "package": {
        "ecosystem": "Raspberry Pi OS:12",
        "name": "linux"
      },
      "versions": [
        "1:6.1.47-1+rpt4"
      ],
      "ecosystem_specific": {
        "binaries": [
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-2712",
            "binary_version": "1:6.1.47-1+rpt4"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-v6",
            "binary_version": "1:6.1.47-1+rpt4"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-v7",
            "binary_version": "1:6.1.47-1+rpt4"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-v7l",
            "binary_version": "1:6.1.47-1+rpt4"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-v8",
            "binary_version": "1:6.1.47-1+rpt4"
          }
        ]
      },
      "database_specific": {
        "per_version": {
          "1:6.1.47-1+rpt4": {
            "linux_commit": "655fc658a15ae7a6f37103754adb39ba52a9a14e",
            "upstream_version": "6.1.47",
            "assessment": "commit ancestry (strak rule)",
            "upstream_fixed": "6.1.189",
            "compiled_filter": false
          }
        }
      }
    }
  ],
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://www.cve.org/CVERecord?id=CVE-2026-98253"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/29b9ed83d8bfab5c6e11fcbf1aa836aa4ae26cb9"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/52172e11bd074ccaded21740ffeb67123f01dd00"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/01e29d0d78a8f66f221625720a04939eef5ec1f6"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/ae805d204cf1f15b87d1bf3529b4c649f3519420"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/43c4e24bd10370fc976f6220518049ce71419399"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/01cbdb724c584d7772fd25af2e4dfdf8527ce0d5"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/83610ee5e498fa5bfcb80031d2b959baea276bf6"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/662ade4de9ff5eceb0820a9f8e9fac70ba6a815b"
    }
  ],
  "database_specific": {
    "source": "https://git.kernel.org/pub/scm/linux/security/vulns.git",
    "upstream_modified": "2026-10-07T06:50:27Z",
    "severity": {
      "source": "kernel CNA",
      "cvss_v3_score": 7.8,
      "cvss_v3_severity": "High",
      "scenario": "AV:L - The bug is reached by write() of RDMA_USER_CM_CMD_JOIN_MCAST/JOIN_IP_MCAST on the local char device /dev/infiniband/rdma_cm into ucma_process_join(). The trigger is local: two racing joins and a bad response pointer. No remote peer supplies the data that causes it, so AV:L.\nAC:L - The attacker drives every part of the race. They make copy_to_user() fail with a bad cmd->response pointer, and a second thread issues JOIN_MCAST for the same address while ctx->mutex is dropped. rdma_leave_multicast() then destroys the newer mc_list head and cancels the wrong iboe_join work. The attempt can be repeated until it wins.\nPR:L - rdma_cm is created with mode 0666 and ucma_write() does no capability check. Any local user on a host with a RoCE port can create a UD cm_id, bind it and join multicast. An unprivileged user cannot create a soft-RoCE device, because nldev NEWLINK needs CAP_NET_ADMIN in the initial namespace, so the RoCE port must already exist.\nUI:N - The attacker triggers the bug entirely through their own writes on an rdma_cm file descriptor they opened. No other user or administrator has to act.\nS:U - The freed ucma_multicast and the corrupted kernel heap are in the same kernel security authority. This is local kernel memory corruption, not a VM or IOMMU boundary crossing.\nC:H - cma_iboe_join_work_handler() calls ucma_create_uevent() on the freed ucma_multicast, reading mc->uid and mc->id into the event that GET_EVENT copies to userspace. If the freed slot is reclaimed with sprayed objects, this use-after-free gives a read primitive.\nI:H - uevent->mc keeps a pointer to the freed ucma_multicast, and ucma_get_event() then runs uevent->mc->events_reported++. That is an attacker-timed write into freed and reclaimable slab memory, usable to corrupt an object sprayed into the slot.\nA:H - The use-after-free of ucma_multicast in the RoCE join worker and in ucma_get_event() can corrupt the slab or oops the kernel, crashing the host. Syzbot reported this bug (extid a6ffe86390c8a6afc818)."
    }
  }
}
