FKIE_CVE-2026-139584

Vulnerability from fkie_nvd - Published: 2026-11-30 14:19 - Updated: 2026-11-30 14:19
Severity
Summary
In the Linux kernel, the following vulnerability has been resolved: IB/mad: fix UAF and double-free in RMPP receive reassembly mad_rmpp_recv.state is protected by two locks that do not exclude each other: recv_timeout_handler() (port workqueue) uses agent->lock, continue_rmpp() (CQ softirq) uses rmpp_recv->lock. Nothing serializes the check-then-set sequence on the state word: T1 (CQ softirq) T2 (port workqueue) continue_rmpp() lock(rmpp_recv->lock) state == ACTIVE [passes] recv_timeout_handler() lock(agent->lock) state = TIMEOUT list_del(&rmpp_recv->list) unlock(agent->lock) destroy_rmpp_recv() wait_for_completion() [blocks on T1's ref] state = COMPLETE unlock(rmpp_recv->lock) complete_rmpp() queue cleanup_work (+10s) deref() [unblocks] kfree(rmpp_recv) ib_free_recv_mad(done_wc) +10s: recv_cleanup_handler() runs lock/list_del/destroy on the freed rmpp_recv -> UAF write and double free; nothing can cancel that cleanup_work anymore, the entry is already off agent->rmpp_list. done_wc is also returned to ib_mad_complete_recv() and freed again -> UAF read and double free. Reaching this requires sending MADs to a kernel RMPP agent from the InfiniBand/RoCE fabric: the per-port sa_query agent accepts subnet manager responses whose SLID/GID/TID are not authenticated on the fabric, and legacy user_mad agents registered without IB_USER_MAD_USER_RMPP start reassembly on any incoming RMPP DATA MAD with an attacker-chosen TID, no in-flight send required. The attacker controls segment timing and can run many transactions in parallel (agent->rmpp_list has no cap), so landing the microseconds-wide receive critical section on the 40-second timeout boundary is a matter of patience, not luck. Unify state transitions under rmpp_recv->lock in recv_timeout_handler(), keeping list manipulation under agent->lock (which preserves the agent->lock -> rmpp_recv->lock ordering used by continue_rmpp()). State check/set in both paths is then serialized, so the loser of the race always observes the final state and bails out. recv_cleanup_handler() needs no change: with transitions serialized, a cleanup_work can only be pending after COMPLETE, in which case the timeout handler exits early. The race is as old as the RMPP implementation itself.
Impacted products
Vendor Product Version

{
  "affected": [
    {
      "affectedData": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "drivers/infiniband/core/mad_rmpp.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "e936a56c1ab8ba5d07938812b934b8b1d8b56dc7",
              "status": "affected",
              "version": "fa619a77046bef30478697aba0553991033afb8e",
              "versionType": "git"
            },
            {
              "lessThan": "d8ef8b4626d9df682bdb27be8c039f9532f07740",
              "status": "affected",
              "version": "fa619a77046bef30478697aba0553991033afb8e",
              "versionType": "git"
            },
            {
              "lessThan": "bebbe1555677dbfa3542d2d2caa58a9adf4ec859",
              "status": "affected",
              "version": "fa619a77046bef30478697aba0553991033afb8e",
              "versionType": "git"
            },
            {
              "lessThan": "ae817ef1690cadb9bb176a814f6d1d386d0a544e",
              "status": "affected",
              "version": "fa619a77046bef30478697aba0553991033afb8e",
              "versionType": "git"
            },
            {
              "lessThan": "2eab6afb62da0b29b731ee76f07658bda0b1dd19",
              "status": "affected",
              "version": "fa619a77046bef30478697aba0553991033afb8e",
              "versionType": "git"
            },
            {
              "lessThan": "1391b9d5db622cc883e945cc0b66666f2995bfca",
              "status": "affected",
              "version": "fa619a77046bef30478697aba0553991033afb8e",
              "versionType": "git"
            },
            {
              "lessThan": "9edaa226ea03da865204e67f745ee974806136e3",
              "status": "affected",
              "version": "fa619a77046bef30478697aba0553991033afb8e",
              "versionType": "git"
            },
            {
              "lessThan": "90e9b6357bec75f627cde1a85b5887215c80aad8",
              "status": "affected",
              "version": "fa619a77046bef30478697aba0553991033afb8e",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "drivers/infiniband/core/mad_rmpp.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "2.6.13"
            },
            {
              "lessThan": "2.6.13",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.10.*",
              "status": "unaffected",
              "version": "5.10.275",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.15.*",
              "status": "unaffected",
              "version": "5.15.226",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.1.*",
              "status": "unaffected",
              "version": "6.1.193",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.6.*",
              "status": "unaffected",
              "version": "6.6.163",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.12.*",
              "status": "unaffected",
              "version": "6.12.119",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.18.*",
              "status": "unaffected",
              "version": "6.18.65",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "7.3.*",
              "status": "unaffected",
              "version": "7.3.6",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "7.4-rc1",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
    }
  ],
  "cveTags": [],
  "descriptions": [
    {
      "lang": "en",
      "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nIB/mad: fix UAF and double-free in RMPP receive reassembly\n\nmad_rmpp_recv.state is protected by two locks that do not exclude\neach other: recv_timeout_handler() (port workqueue) uses agent-\u003elock,\ncontinue_rmpp() (CQ softirq) uses rmpp_recv-\u003elock. Nothing serializes\nthe check-then-set sequence on the state word:\n\n  T1 (CQ softirq)              T2 (port workqueue)\n  continue_rmpp()\n    lock(rmpp_recv-\u003elock)\n    state == ACTIVE  [passes]\n                               recv_timeout_handler()\n                                 lock(agent-\u003elock)\n                                 state = TIMEOUT\n                                 list_del(\u0026rmpp_recv-\u003elist)\n                                 unlock(agent-\u003elock)\n                                 destroy_rmpp_recv()\n                                   wait_for_completion()\n                                   [blocks on T1\u0027s ref]\n    state = COMPLETE\n    unlock(rmpp_recv-\u003elock)\n    complete_rmpp()\n      queue cleanup_work (+10s)\n    deref()\n                               [unblocks]\n                               kfree(rmpp_recv)\n                               ib_free_recv_mad(done_wc)\n\n  +10s: recv_cleanup_handler() runs lock/list_del/destroy on the\n        freed rmpp_recv -\u003e UAF write and double free; nothing can\n        cancel that cleanup_work anymore, the entry is already off\n        agent-\u003ermpp_list. done_wc is also returned to\n        ib_mad_complete_recv() and freed again -\u003e UAF read and\n        double free.\n\nReaching this requires sending MADs to a kernel RMPP agent from the\nInfiniBand/RoCE fabric: the per-port sa_query agent accepts subnet\nmanager responses whose SLID/GID/TID are not authenticated on the\nfabric, and legacy user_mad agents registered without\nIB_USER_MAD_USER_RMPP start reassembly on any incoming RMPP DATA\nMAD with an attacker-chosen TID, no in-flight send required. The\nattacker controls segment timing and can run many transactions in\nparallel (agent-\u003ermpp_list has no cap), so landing the\nmicroseconds-wide receive critical section on the 40-second timeout\nboundary is a matter of patience, not luck.\n\nUnify state transitions under rmpp_recv-\u003elock in\nrecv_timeout_handler(), keeping list manipulation under agent-\u003elock\n(which preserves the agent-\u003elock -\u003e rmpp_recv-\u003elock ordering used\nby continue_rmpp()). State check/set in both paths is then\nserialized, so the loser of the race always observes the final\nstate and bails out. recv_cleanup_handler() needs no change: with\ntransitions serialized, a cleanup_work can only be pending after\nCOMPLETE, in which case the timeout handler exits early.\n\nThe race is as old as the RMPP implementation itself."
    }
  ],
  "id": "CVE-2026-139584",
  "lastModified": "2026-11-30T14:19:39.840",
  "metrics": {},
  "published": "2026-11-30T14:19:39.840",
  "references": [
    {
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
      "url": "https://git.kernel.org/stable/c/1391b9d5db622cc883e945cc0b66666f2995bfca"
    },
    {
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
      "url": "https://git.kernel.org/stable/c/2eab6afb62da0b29b731ee76f07658bda0b1dd19"
    },
    {
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
      "url": "https://git.kernel.org/stable/c/90e9b6357bec75f627cde1a85b5887215c80aad8"
    },
    {
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
      "url": "https://git.kernel.org/stable/c/9edaa226ea03da865204e67f745ee974806136e3"
    },
    {
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
      "url": "https://git.kernel.org/stable/c/ae817ef1690cadb9bb176a814f6d1d386d0a544e"
    },
    {
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
      "url": "https://git.kernel.org/stable/c/bebbe1555677dbfa3542d2d2caa58a9adf4ec859"
    },
    {
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
      "url": "https://git.kernel.org/stable/c/d8ef8b4626d9df682bdb27be8c039f9532f07740"
    },
    {
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
      "url": "https://git.kernel.org/stable/c/e936a56c1ab8ba5d07938812b934b8b1d8b56dc7"
    }
  ],
  "sourceIdentifier": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
  "vulnStatus": "Received"
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Drag nodes to arrange them. Double-click a related vulnerability to open it, or a source to visit its link. The Physics button on the left tunes the layout and the simulation; the legend at the bottom left hides or shows nodes by kind and by sighting type.

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Vulnerability timeline

Sightings and recorded dates, grouped by day · UTC

JSON
How durations are calculated

Following the VTEM framework (Black Hat USA 2015), time to patch starts when the vendor or a coordinator was informed, total time to patch at discovery, and disclosure to patch at public disclosure; vendor response time runs from the report to its acknowledgement. Time to exploit and time unpatched start at the earliest discovery or report, falling back to public disclosure. Unpatched time ends at the first recorded patch, or the calculation time when no patch is recorded. Exploitation to patch shows the interval between those two events; a published proof of concept is a public exploit, not exploitation. The method is described in a publication.

Each result shows its source dates. A negative interval means the end event came first; when date-only inputs leave the order open, the result says so. Date-only inputs are approximate. The earliest evidence wins: KEV report dates and sightings are labelled as such. Records describing another vulnerability are listed but never calculated from, and a PoC alone does not establish exploitation. Missing patch evidence does not prove that no patch exists. Filters below change the event list only.

Events included in the timeline

Loading timeline…


    Loading…

    Loading…

    Loading…

    Related by attack behaviour

    Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.