# CVE-2026-139584: IB/mad: fix UAF and double-free in RMPP receive reassembly

- **Severity:** UNSCORED
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Unknown
- **Published:** 2026-11-30T13:36:06.428Z
- **Modified:** 2026-11-30T14:19:39.840Z

> **AI summary (AI-generated, claude-haiku-5-5):** An attacker on the InfiniBand/RoCE fabric can trigger a race in RMPP receive reassembly to cause use-after-free and double-free in the Linux kernel IB MAD layer.

## Who should check

- Anyone running Linux \>= fa619a77046bef30478697aba0553991033afb8e, \< e936a56c1ab8ba5d07938812b934b8b1d8b56dc7; \>= fa619a77046bef30478697aba0553991033afb8e, \< d8ef8b4626d9df682bdb27be8c039f9532f07740; \>= fa619a77046bef30478697aba0553991033afb8e, \< bebbe1555677dbfa3542d2d2caa58a9adf4ec859; \>= fa619a77046bef30478697aba0553991033afb8e, \< ae817ef1690cadb9bb176a814f6d1d386d0a544e; \>= fa619a77046bef30478697aba0553991033afb8e, \< 2eab6afb62da0b29b731ee76f07658bda0b1dd19; \>= fa619a77046bef30478697aba0553991033afb8e, \< 1391b9d5db622cc883e945cc0b66666f2995bfca; \>= fa619a77046bef30478697aba0553991033afb8e, \< 9edaa226ea03da865204e67f745ee974806136e3; \>= fa619a77046bef30478697aba0553991033afb8e, \< 90e9b6357bec75f627cde1a85b5887215c80aad8
- Anyone running Linux 2.6.13

## Description

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.

## Affected and fixed versions

- Linux: \>= fa619a77046bef30478697aba0553991033afb8e, \< e936a56c1ab8ba5d07938812b934b8b1d8b56dc7; \>= fa619a77046bef30478697aba0553991033afb8e, \< d8ef8b4626d9df682bdb27be8c039f9532f07740; \>= fa619a77046bef30478697aba0553991033afb8e, \< bebbe1555677dbfa3542d2d2caa58a9adf4ec859; \>= fa619a77046bef30478697aba0553991033afb8e, \< ae817ef1690cadb9bb176a814f6d1d386d0a544e; \>= fa619a77046bef30478697aba0553991033afb8e, \< 2eab6afb62da0b29b731ee76f07658bda0b1dd19; \>= fa619a77046bef30478697aba0553991033afb8e, \< 1391b9d5db622cc883e945cc0b66666f2995bfca; \>= fa619a77046bef30478697aba0553991033afb8e, \< 9edaa226ea03da865204e67f745ee974806136e3; \>= fa619a77046bef30478697aba0553991033afb8e, \< 90e9b6357bec75f627cde1a85b5887215c80aad8 (cvelist)
- Linux: 2.6.13 (cvelist)

## Technologies

Linux kernel

## Mitigation

- Upgrade Linux to 90e9b6357bec75f627cde1a85b5887215c80aad8 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-139584. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-139584.md
Affected: Linux >= fa619a77046bef30478697aba0553991033afb8e, < e936a56c1ab8ba5d07938812b934b8b1d8b56dc7; >= fa619a77046bef30478697aba0553991033afb8e, < d8ef8b4626d9df682bdb27be8c039f9532f07740; >= fa619a77046bef30478697aba0553991033afb8e, < bebbe1555677dbfa3542d2d2caa58a9adf4ec859; >= fa619a77046bef30478697a…
Fixed in: Linux 2eab6afb62da0b29b731ee76f07658bda0b1dd19, Linux 1391b9d5db622cc883e945cc0b66666f2995bfca, Linux 9edaa226ea03da865204e67f745ee974806136e3, Linux 90e9b6357bec75f627cde1a85b5887215c80aad8

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-139584 being exploited?

There is no confirmed exploitation: CVE-2026-139584 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known.

### How serious is CVE-2026-139584?

It has no CVSS score yet. Unknown.

### Which versions are affected by CVE-2026-139584?

Linux \>= fa619a77046bef30478697aba0553991033afb8e, \< e936a56c1ab8ba5d07938812b934b8b1d8b56dc7; \>= fa619a77046bef30478697aba0553991033afb8e, \< d8ef8b4626d9df682bdb27be8c039f9532f07740; \>= fa619a77046bef30478697aba0553991033afb8e, \< bebbe1555677dbfa3542d2d2caa58a9adf4ec859; \>= fa619a77046bef30478697aba0553991033afb8e, \< ae817ef1690cadb9bb176a814f6d1d386d0a544e; \>= fa619a77046bef30478697aba0553991033afb8e, \< 2eab6afb62da0b29b731ee76f07658bda0b1dd19; \>= fa619a77046bef30478697aba0553991033afb8e, \< 1391b9d5db622cc883e945cc0b66666f2995bfca; \>= fa619a77046bef30478697aba0553991033afb8e, \< 9edaa226ea03da865204e67f745ee974806136e3; \>= fa619a77046bef30478697aba0553991033afb8e, \< 90e9b6357bec75f627cde1a85b5887215c80aad8; Linux 2.6.13.

### Is there a fix for CVE-2026-139584?

Yes. Fixed in Linux 2eab6afb62da0b29b731ee76f07658bda0b1dd19, Linux 1391b9d5db622cc883e945cc0b66666f2995bfca, Linux 9edaa226ea03da865204e67f745ee974806136e3, Linux 90e9b6357bec75f627cde1a85b5887215c80aad8. Upgrade Linux to 90e9b6357bec75f627cde1a85b5887215c80aad8 or later.

### How do I check if I'm affected by CVE-2026-139584?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- other: <https://git.kernel.org/stable/c/e936a56c1ab8ba5d07938812b934b8b1d8b56dc7>
- other: <https://git.kernel.org/stable/c/d8ef8b4626d9df682bdb27be8c039f9532f07740>
- other: <https://git.kernel.org/stable/c/bebbe1555677dbfa3542d2d2caa58a9adf4ec859>
- other: <https://git.kernel.org/stable/c/ae817ef1690cadb9bb176a814f6d1d386d0a544e>
- other: <https://git.kernel.org/stable/c/2eab6afb62da0b29b731ee76f07658bda0b1dd19>
- other: <https://git.kernel.org/stable/c/1391b9d5db622cc883e945cc0b66666f2995bfca>
- other: <https://git.kernel.org/stable/c/9edaa226ea03da865204e67f745ee974806136e3>
- other: <https://git.kernel.org/stable/c/90e9b6357bec75f627cde1a85b5887215c80aad8>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-139584>

HTML: <https://flawdb.com/CVE-2026-139584> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-139584>
