{
  "schema_version": "1.6.1",
  "id": "RPI-CVE-2026-90435",
  "modified": "2026-10-09T11:39:44Z",
  "upstream": [
    "CVE-2026-90435"
  ],
  "published": "2026-09-17T16:10:40Z",
  "summary": "RDMA/mlx5: Fix integer overflow of user QP buffer size",
  "details": "In the Linux kernel, the following vulnerability has been resolved:\n\nRDMA/mlx5: Fix integer overflow of user QP buffer size\n\nset_user_buf_size() computes the QP buffer size by left-shifting the\nuser-supplied rq.wqe_cnt and rq.wqe_shift values as signed integers.\nA sufficiently large rq.wqe_cnt causes signed integer overflow, which\nis undefined behavior, and yields a small or negative buf_size, causing\nib_umem_get() to map a buffer smaller than the hardware will actually\nwrite into.\n\nReplace the shifts and addition with check_shl_overflow() and\ncheck_add_overflow(), rejecting invalid user inputs.\n\nMoreover, guard the identical shift computing qp->sq.offset in\n_create_user_qp() before set_user_buf_size() is reached.",
  "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.188",
            "compiled_filter": false
          }
        }
      }
    }
  ],
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://www.cve.org/CVERecord?id=CVE-2026-90435"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/ccce6b7ef1d7efc59ccba3421e1339c6e63a3d20"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/d99622e40aaa910ade681dfd4dc0fa240a011331"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/c845e5e05140ea1bc64a5b1107942d93c876034d"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/42fb8aefffff5b458aaa66803364a16e0ea44129"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/d7fa2ff72ad1861eac194a4e0075d504ba8c246e"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/5b6cfc6d7ff0959dd9766fdc24286a253b59ca77"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/f917707f0de0832b8ab582391b1f64e549995c6c"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/dec47e4b0fe34afdf38caa72b4408ba95502e5de"
    }
  ],
  "database_specific": {
    "source": "https://git.kernel.org/pub/scm/linux/security/vulns.git",
    "upstream_modified": "2026-09-18T17:55:42Z",
    "severity": {
      "source": "kernel CNA",
      "cvss_v3_score": 7.8,
      "cvss_v3_severity": "High",
      "scenario": "AV:L - The overflowing inputs are mlx5_ib_create_qp.rq_wqe_count and rq_wqe_shift in driver udata, copied by ib_copy_from_udata() in mlx5_ib_create_qp() from a local write/ioctl on /dev/infiniband/uverbsN (IB_USER_VERBS_CMD_CREATE_QP / UVERBS_METHOD_QP_CREATE). A remote RoCE/InfiniBand peer does not supply those fields.\nAC:L - The attacker sets rq_wqe_count and rq_wqe_shift directly. set_rq_size() copies them into qp->rq without bounding wqe_cnt against log_max_qp_sz (only ib_uverbs_ex_create_qp.max_recv_wr is capped), so a small max_recv_wr plus a huge rq_wqe_count reliably overflows the signed wqe_cnt<<wqe_shift in set_user_buf_size() and the sq.offset shift in _create_user_qp().\nPR:L - ib_uverbs_open() and ib_uverbs_alloc_pd() have no capability check, and uverbs_devnode() creates /dev/infiniband/uverbs* as 0666. IB_QPT_RC CREATE_QP does not call rdma_uattrs_has_raw_cap() (that gate is only IB_QPT_RAW_PACKET), so an unprivileged local user with uverbs access can reach the overflow.\nUI:N - The attacker opens uverbs, allocates a PD and CQ, and issues CREATE_QP with crafted mlx5_ib_create_qp.rq_wqe_count/rq_wqe_shift. No other user must mount a device, open a file, or confirm the operation.\nS:U - The mismatch is between ib_umem_get_attr_or_va() pinning and the same process's mlx5 CREATE_QP WQ programming. Resulting DMA or kernel corruption stays in the host kernel that serves that uverbs file; it is not a guest-to-host or IOMMU cross-VM escape.\nC:H - A wrapped wqe_cnt<<wqe_shift produces a small ubuffer.buf_size, so ib_umem_get_attr_or_va() and mlx5_ib_populate_pas() register fewer pages than create_user_qp() programs via log_rq_size/log_rq_stride. The NIC then DMA-reads past the pinned QP buffer, disclosing kernel or other-process memory.\nI:H - The same undersized PAS versus programmed RQ size lets hardware DMA-write beyond the umem into adjacent physical pages, and a wrapped qp->sq.offset misplaces the send queue in the combined buffer. That is an out-of-bounds write usable for corruption and control-flow hijack.\nA:H - Hardware accessing an RQ larger than the pinned umem, or firmware CREATE_QP with a truncated PAS list, causes IOMMU faults, device errors, or a kernel oops/panic; a negative overflowed buf_size passed to ib_umem_get_attr_or_va() as size_t can also fault during QP setup."
    }
  }
}
