CVE-2026-139691: RDMA/rxe: Use validated num_sge in local buffer
In the Linux kernel, the following vulnerability has been resolved:
RDMA/rxe: Use validated numsge in local buffer
For both SRQ and non-SRQ receive paths, the WQE is copied into a local buffer to provide a kernel-owned, validated copy. While calculating the memcpy size from the validated numsge prevents overflow during the copy, memcpy() itself still copies numsge from shared memory.
A concurrent userspace modification before or during memcpy() leaves an unvalidated numsge in the local buffer, leading to potential out-of-bounds reads in rxerespchecklength() and copydata() causing:
BUG: KASAN: slab-out-of-bounds in rxereceiver+0x8109/0x9ec0 [rdmarxe] Read of size 4 at addr ffff88812c4867f8 by task kworker/u9:6/361 Workqueue: rxewq dowork [rdmarxe] Call Trace: rxereceiver+0x8109/0x9ec0 [rdmarxe] dowork+0x149/0x610 [rdmarxe] processonework+0x726/0x10a0
The buggy address belongs to the object at ffff88812c486000 which belongs to the cache kmalloc-part-13-2k of size 2048 The buggy address is located 0 bytes to the right of allocated 2040-byte region [ffff88812c486000, ffff88812c4867f8)
Explicitly assign the validated numsge to the local buffer after the copy to prevent this race.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 5.11 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 5.16 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.1.193 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.6.163 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.12.119 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.18.65 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 7.2 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 7.3.6 - Compensating control
In both SRQ and non-SRQ receive paths, copy the WQE into a local buffer and explicitly assign the validated num_sge to that buffer after the copy, so subsequent processing does not use num_sge copied from shared memory.
Event History
Frequently Asked Questions
What access would an attacker need to trigger this issue?
An attacker would need the ability to concurrently modify userspace-shared receive work queue entry data while the rxe driver is copying it for either SRQ or non-SRQ receive processing. The race can leave an unvalidated num_sge value in the kernel-owned local buffer.
How might this appear on an affected system?
The issue can cause out-of-bounds reads in rxe_resp_check_length() and copy_data(). The provided example reports a KASAN slab-out-of-bounds read in rxe_receiver in the rdma_rxe module, running from the rxe_wq workqueue.