RDMA/rxe: Validate num_sge/cur_sge before indexing wqe->dma.sge[]
No exploitation in the wild has been reported. EPSS puts the chance of exploitation in the next 30 days at 0%. Fixed in Kernel c067aa7b231e91a18a1b3666201ab14dfb00347a, Kernel 126c757e4cd46f866ddc283143b58eb4d9bf52cd, Kernel 13cb7160e5b791f5e3ecf9311cf32849fe7e9b62 and 8 more.
In the Linux kernel, the following vulnerability has been resolved: RDMA/rxe: Validate num_sge/cur_sge before indexing wqe->dma.sge[] For a user QP, qp->sq.queue is a ring the application writes directly, so rxe_post_send() takes the is_user branch and only schedules send_task without validating the WQE. rxe_requester() consumes it in place via req_next_wqe() and calls copy_data(), which indexes &wqe->dma.sge[cur_sge] with the attacker-controlled num_sge/cur_sge. Only the kernel path bounds num_sge (validate_send_wr()); the user WQE is never checked, so a local unprivileged user can post a WQE with an out-of-range cur_sge or oversized num_sge and force an out-of-bounds read of the per-WQE sge array in copy_data() (vmalloc OOB read, local DoS). Bound num_sge to qp->sq.max_sge in rxe_requester() before use, the way get_srq_wqe() already guards SRQ entries, and bound cur_sge only when the WQE carries payload (dma.resid): copy_data() returns early on a zero-length copy before touching dma->sge[], so a zero-payload WQE -- the only kind a max_sge == 0 QP can post -- stays valid. Reproduced under KASAN; the vmalloc-out-of-bounds in copy_data() is gone.
Affected
Vendors, products and packages with version ranges
| Vendor | Product | Versions | Fixed |
|---|---|---|---|
| Linux | Kernel | >=8700e3e7c4857d28ebaa824509934556da0b3e76 <c067aa7b231e91a18a1b3666201ab14dfb00347a, >=8700e3e7c4857d28ebaa824509934556da0b3e76 <126c757e4cd46f866ddc283143b58eb4d9bf52cd, >=8700e3e7c4857d28ebaa824509934556da0b3e76 <13cb7160e5b791f5e3ecf9311cf32849fe7e9b62, >=8700e3e7c4857d28ebaa824509934556da0b3e76 <5ec111ddc1f727c1e4580aea459842ae5a8359a5, >=8700e3e7c4857d28ebaa824509934556da0b3e76 <69d3ccf6543f24c452a020c8028ca6f46cb1e8db, >=8700e3e7c4857d28ebaa824509934556da0b3e76 <750bba6ce9bb0b11d6a166031c9728ae3f21765e, =4.8 | c067aa7b231e91a18a1b3666201ab14dfb00347a, 126c757e4cd46f866ddc283143b58eb4d9bf52cd, 13cb7160e5b791f5e3ecf9311cf32849fe7e9b62, 5ec111ddc1f727c1e4580aea459842ae5a8359a5, 69d3ccf6543f24c452a020c8028ca6f46cb1e8db, 750bba6ce9bb0b11d6a166031c9728ae3f21765e |
| linux-kernel: Kernel | >=6.13.0 <6.18.52, >=6.19.0 <7.2.6, >=6.2.0 <6.6.157, >=6.7.0 <6.12.110, >=4.8.0 <6.1.188 | 6.18.52, 7.2.6, 6.6.157, 6.12.110, 6.1.188 |
Timeline
Every event on this vulnerability
Related
Other vulnerabilities in Kernel, strongest first
Embed
A live severity badge for an advisory, README or ticket