net/mlx5e: xsk: Fix crash on regular rq reactivation
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
6.1.1916.4.106.5In the Linux kernel, the following vulnerability has been resolved:
net/mlx5e: xsk: Fix crash on regular rq reactivation
When the regular rq is reactivated after the XSK socket is closed it could be reading stale cqes which eventually corrupts the rq. This leads to no more traffic being received on the regular rq and a crash on the next close or deactivation of the rq.
Kal Cuttler Conely reported this issue as a crash on the release path when the xdpsock sample program is stopped (killed) and restarted in sequence while traffic is running.
This patch flushes all cqes when during the rq flush. The cqe flushing is done in the reset state of the rq. mlx5e_rq_to_ready code is moved into the flush function to allow for this.
From the CVE record · Linux
The Linux kernel’s net/mlx5e XSK receive-queue handling can read stale completion entries when the regular receive queue is reactivated after an XSK socket closes. If an XSK program is stopped and restarted while traffic is running, the queue can stop receiving traffic and the kernel can crash on a subsequent queue close or deactivation.
Engineers running Linux kernels that use the net/mlx5e driver with XSK sockets should check their systems; affected versions are not specified.