CVE-2026-139288

RDMA/rxe: Clear pkt->qp before the early drop exits in rxe_rcv()

Published Nov 30, 2026 CVSS n/a EPSS n/a KEV · Not listed
Description
In the Linux kernel, the following vulnerability has been resolved:

RDMA/rxe: Clear pkt->qp before the early drop exits in rxe_rcv()

rxe_rcv() puts pkt->qp at its drop label, but leaves pkt->qp
uninitialized on the two paths that take an early goto:

if (unlikely(skb->len < RXE_BTH_BYTES))
goto drop;

if (rxe_chk_dgid(rxe, skb) < 0)
goto drop;

pkt->opcode = bth_opcode(pkt);
pkt->psn = bth_psn(pkt);
pkt->qp = NULL; <- too late for the gotos above
...
drop:
if (pkt->qp)
rxe_put(pkt->qp);

pkt points into skb->cb, which rxe does not own at this point: the
network stack has used that space for its own state. For IPv6,
ip6_rcv_core() memsets inet6_skb_parm and then writes

IP6CB(skb)->nhoff = offsetof(struct ipv6hdr, nexthdr);

at offset 14, so the qword at cb + 8, which is where pkt->qp lives,
reads back as 0x0006000000000000 for every IPv6 packet.

Any IPv6 datagram to port 4791 whose payload is shorter than the BTH
takes the first goto and reaches the drop label with that value, so
rxe_put() runs refcount_dec_and_test() on 0x0006000000000150 and the
kernel faults, in softirq, on a non-canonical address:

general protection fault, probably for non-canonical address
0x0006000000000150: 0000 [#1] PREEMPT SMP
RIP: 0010:__rxe_put+0x.../...
Call Trace:
<IRQ>
rxe_rcv+0x.../... [rdma_rxe]
rxe_udp_encap_recv+0x.../... [rdma_rxe]
udp_queue_rcv_one_skb
...
Kernel panic - not syncing: Fatal exception in interrupt

The fault happens in softirq, so it panics even with panic_on_oops=0,
and with panic=0 the machine hangs until it is power cycled. A remote
sender only needs to send an empty UDP datagram to port 4791; no RDMA
connection, GID or other state is involved and the rxe socket is bound
in init_net.

IPv4 is not affected: ip_rcv_core() memsets the whole inet_skb_parm, so
the pkt->qp slot is zero there.

Fix by clearing pkt->qp before the first early exit. pkt->qp is only
ever assigned a reference-owning value by hdr_check() and
rxe_rcv_mcast_pkt(), both of which run after this point, so the put at
the drop label stays balanced.

The ordering has been unsafe since the driver was merged: the two early
gotos have preceded pkt->qp = NULL in every version since 8700e3e7c485.

Testing done: the driver was built and run on a 6.2 vendor tree that
carries this code, where a single 0-byte IPv6 datagram to port 4791
reproduced the panic above (that tree does not pull the UDP header in
rxe_udp_encap_recv(), so payloads of 0..3 bytes reach the first goto
there, versus 0..11 on mainline). With this change, the same packets
are dropped as intended and tracing the drop label shows pkt->qp is 0
on every path that reaches it. Not done: the mainline tree was not
built in the environment used to prepare this, and the reproducer is
left out of this message on purpose - both are available on request.

Analysis

AI-generated

Technical impact

The vulnerability stems from the RDMA/rxe driver using an uninitialized packet field, pkt->qp, before an early exit. When a small IPv6 UDP packet is sent to port 4791, the driver reaches the drop label with pkt->qp still containing garbage from network stack state. The code then calls rxe_put on that garbage, which decrements a reference count on a non‑canonical address and triggers a kernel fault. The fault occurs in softirq and results in a kernel panic or hanging even when oops handling is disabled. This behavior is a direct implementation flaw (uninitialized variable) and leads to application‑level denial of service.

Affected Systems

Any Linux kernel that builds and runs the rdma/rxe driver is affected. The flaw is present in kernel trees that contain the rxe_rcv function before the patch, including vendor builds like the 6.2 tree mentioned. Only IPv6 traffic to UDP port 4791 triggers the crash; IPv4 traffic is unaffected because the driver zeroes the field for IPv4 frames. No specific vendor or version list is provided, but all kernels that ship with rxe and have not incorporated the fix for this bug are vulnerable.

Risk and Exploitability

The flaw has a high exploitability score given that it requires only a crafted IPv6 UDP packet sent to a specific port and no authentication or privileged access. The CVSS score is not listed, and EPSS data is unavailable, but the lack of a CISA KEV listing does not diminish the danger: a kernel panic halts the system, making the vulnerability highly impactful. Attackers can abuse this by flooding the target with small UDP packets, causing repeated panics and a denial of service. The vulnerability is easily reproducible on machines with the rxe driver enabled and is therefore considered a high‑risk, remotely exploitable flaw.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Update the Linux kernel to a version that includes the patch for the rxe driver, such as the latest mainline release or the vendor’s patched 6.2 tree.
  • If the driver is not required, unload or disable the rdma/rxe module to eliminate the code path that can crash.
  • As an interim measure, block IPv6 UDP traffic to port 4791 using firewall rules (e.g., ip6tables -A INPUT -p udp --dport 4791 -j DROP) to prevent the walk‑away packets from reaching the driver.

Generated by OpenCVE AI on November 30, 2026 at 21:07 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Weaknesses CWE-457
Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: RDMA/rxe: Clear pkt->qp before the early drop exits in rxe_rcv() rxe_rcv() puts pkt->qp at its drop label, but leaves pkt->qp uninitialized on the two paths that take an early goto: if (unlikely(skb->len < RXE_BTH_BYTES)) goto drop; if (rxe_chk_dgid(rxe, skb) < 0) goto drop; pkt->opcode = bth_opcode(pkt); pkt->psn = bth_psn(pkt); pkt->qp = NULL; <- too late for the gotos above ... drop: if (pkt->qp) rxe_put(pkt->qp); pkt points into skb->cb, which rxe does not own at this point: the network stack has used that space for its own state. For IPv6, ip6_rcv_core() memsets inet6_skb_parm and then writes IP6CB(skb)->nhoff = offsetof(struct ipv6hdr, nexthdr); at offset 14, so the qword at cb + 8, which is where pkt->qp lives, reads back as 0x0006000000000000 for every IPv6 packet. Any IPv6 datagram to port 4791 whose payload is shorter than the BTH takes the first goto and reaches the drop label with that value, so rxe_put() runs refcount_dec_and_test() on 0x0006000000000150 and the kernel faults, in softirq, on a non-canonical address: general protection fault, probably for non-canonical address 0x0006000000000150: 0000 [#1] PREEMPT SMP RIP: 0010:__rxe_put+0x.../... Call Trace: <IRQ> rxe_rcv+0x.../... [rdma_rxe] rxe_udp_encap_recv+0x.../... [rdma_rxe] udp_queue_rcv_one_skb ... Kernel panic - not syncing: Fatal exception in interrupt The fault happens in softirq, so it panics even with panic_on_oops=0, and with panic=0 the machine hangs until it is power cycled. A remote sender only needs to send an empty UDP datagram to port 4791; no RDMA connection, GID or other state is involved and the rxe socket is bound in init_net. IPv4 is not affected: ip_rcv_core() memsets the whole inet_skb_parm, so the pkt->qp slot is zero there. Fix by clearing pkt->qp before the first early exit. pkt->qp is only ever assigned a reference-owning value by hdr_check() and rxe_rcv_mcast_pkt(), both of which run after this point, so the put at the drop label stays balanced. The ordering has been unsafe since the driver was merged: the two early gotos have preceded pkt->qp = NULL in every version since 8700e3e7c485. Testing done: the driver was built and run on a 6.2 vendor tree that carries this code, where a single 0-byte IPv6 datagram to port 4791 reproduced the panic above (that tree does not pull the UDP header in rxe_udp_encap_recv(), so payloads of 0..3 bytes reach the first goto there, versus 0..11 on mainline). With this change, the same packets are dropped as intended and tracing the drop label shows pkt->qp is 0 on every path that reaches it. Not done: the mainline tree was not built in the environment used to prepare this, and the reproducer is left out of this message on purpose - both are available on request.
Title RDMA/rxe: Clear pkt->qp before the early drop exits in rxe_rcv()
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References
Weaknesses
  • CWE-457

    Use of Uninitialized Variable

Sources

Status
PUBLISHED
Assigner
Linux
Published
Updated
Nov 30, 2026, 1:33 PM
Reserved
Nov 30, 2026, 1:22 PM
Status
Received
Published
Nov 30, 2026, 2:18 PM
Modified
Nov 30, 2026, 2:18 PM