CVE-2026-139593: RDMA/mlx5: Set QP event handler before firmware QPC insertion
In the Linux kernel, the following vulnerability has been resolved:
RDMA/mlx5: Set QP event handler before firmware QPC insertion
Four QP creation paths assigned base->containermibqp and base->mqp.event after the firmware create call that inserts the QP into dev->qptable.tree. A firmware error EQE in that window reaches qp->event() with a NULL pointer.
Move both assignments before the firmware call.
Also set ibqp.qpnum inside mlx5qpccreateqp() before createresourcecommon() so an EQE arriving early does not observe qpnum==0.
In addition, add a WARNONONCE(!qp->event) guard in rsceventnotifier() as a safeguard for future regressions.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
In the mlx5 QP creation paths, set the QP event handler and QP number before the firmware call that inserts the QP; add a WARN_ON_ONCE(!qp->event) guard in rsc_event_notifier().