{
  "schema_version": "1.6.1",
  "id": "RPI-CVE-2024-36476",
  "modified": "2026-10-09T11:39:44Z",
  "upstream": [
    "CVE-2024-36476"
  ],
  "published": "2025-01-15T13:11:32Z",
  "summary": "RDMA/rtrs: Ensure 'ib_sge list' is accessible",
  "details": "In the Linux kernel, the following vulnerability has been resolved:\n\nRDMA/rtrs: Ensure 'ib_sge list' is accessible\n\nMove the declaration of the 'ib_sge list' variable outside the\n'always_invalidate' block to ensure it remains accessible for use\nthroughout the function.\n\nPreviously, 'ib_sge list' was declared within the 'always_invalidate'\nblock, limiting its accessibility, then caused a\n'BUG: kernel NULL pointer dereference'[1].\n ? __die_body.cold+0x19/0x27\n ? page_fault_oops+0x15a/0x2d0\n ? search_module_extables+0x19/0x60\n ? search_bpf_extables+0x5f/0x80\n ? exc_page_fault+0x7e/0x180\n ? asm_exc_page_fault+0x26/0x30\n ? memcpy_orig+0xd5/0x140\n rxe_mr_copy+0x1c3/0x200 [rdma_rxe]\n ? rxe_pool_get_index+0x4b/0x80 [rdma_rxe]\n copy_data+0xa5/0x230 [rdma_rxe]\n rxe_requester+0xd9b/0xf70 [rdma_rxe]\n ? finish_task_switch.isra.0+0x99/0x2e0\n rxe_sender+0x13/0x40 [rdma_rxe]\n do_task+0x68/0x1e0 [rdma_rxe]\n process_one_work+0x177/0x330\n worker_thread+0x252/0x390\n ? __pfx_worker_thread+0x10/0x10\n\nThis change ensures the variable is available for subsequent operations\nthat require it.\n\n[1] https://lore.kernel.org/linux-rdma/6a1f3e8f-deb0-49f9-bc69-a9b03ecfcda7@fujitsu.com/",
  "severity": [
    {
      "type": "CVSS_V3",
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/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.124",
            "compiled_filter": false
          }
        }
      }
    }
  ],
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://www.cve.org/CVERecord?id=CVE-2024-36476"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/7eaa71f56a6f7ab87957213472dc6d4055862722"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/143378075904e78b3b2a810099bcc3b3d82d762f"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/32e1e748a85bd52b20b3857d80fd166d22fa455a"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/b238f61cc394d5fef27b26d7d9aa383ebfddabb0"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/6ffb5c1885195ae5211a12b4acd2d51843ca41b0"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/fb514b31395946022f13a08e06a435f53cf9e8b3"
    }
  ],
  "database_specific": {
    "source": "https://git.kernel.org/pub/scm/linux/security/vulns.git",
    "upstream_modified": "2026-08-05T11:52:36Z",
    "severity": {
      "source": "kernel CNA",
      "cvss_v3_score": 9.8,
      "cvss_v3_severity": "Critical",
      "scenario": "AV:N - The rtrs server listens via RDMA CM on RDMA_PS_TCP (RoCEv2/iWARP, routable over ordinary IP networks) and RDMA_PS_IB, and the vulnerable function is invoked purely in response to messages sent by a remote peer over the established QP. No local access is needed.\nAC:L - The `always_invalidate` module parameter defaults to true, so the defective branch is the default code path, and a single RTRS_MSG_WRITE with an unrecognized RNBD header type (or any ordinary write I/O completion) deterministically reaches `send_io_resp_imm()`. There is no race to win and no memory grooming required.\nPR:N - `rtrs_rdma_connect()` validates only RTRS_MAGIC, the protocol major version, and a UUID chosen by the client \u2014 the RTRS/RNBD wire protocol contains no authentication whatsoever. The `send_err_msg:` path into the vulnerable function is reachable before any block device has been opened on the session.\nUI:N - The server processes incoming RDMA work completions in a kernel workqueue with no operator involvement. No victim action is required beyond the storage server already running rnbd_server/rtrs_server.\nS:U - The dangling stack descriptor is consumed by kernel code and the resulting reads and crash occur within the kernel's own security authority. No VM, IOMMU, or sandbox boundary is crossed.\nC:H - The out-of-lifetime `ib_sge` supplies an unbounded address/length pair under `local_dma_lkey`; `rxe_mr_copy()` short-circuits to `rxe_mr_copy_dma()` before `mr_check_range()`, memcpy'ing from that raw kernel virtual address into the outbound packet with no bounds check. Arbitrary kernel memory is therefore transmitted to the unauthenticated remote peer.\nI:H - The RDMA device is handed a work-request descriptor built entirely from out-of-lifetime memory, and the corrupted rkey response it produces is stored unvalidated by the peer (`clt_path->rbufs[buf_id].rkey = le32_to_cpu(msg->rkey)`), so subsequent server-to-client RDMA writes target an attacker-unintended memory region. Combined with the unchecked DMA-MR access primitive this is treated as a high integrity impact.\nA:H - The reported and reproduced consequence is a kernel page fault oops (`BUG: kernel NULL pointer dereference` in `rxe_mr_copy`/`memcpy_orig` from the `rxe_sender` workqueue), and failed posts additionally drive `close_path()`, tearing down the storage session. This is remotely and repeatedly triggerable."
    }
  }
}
