mlx5: fix possible ptp queue fifo use-after-free
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.186.2.56.3In the Linux kernel, the following vulnerability has been resolved:
mlx5: fix possible ptp queue fifo use-after-free
Fifo indexes are not checked during pop operations and it leads to potential use-after-free when poping from empty queue. Such case was possible during re-sync action. WARN_ON_ONCE covers future cases.
There were out-of-order cqe spotted which lead to drain of the queue and use-after-free because of lack of fifo pointers check. Special check and counter are added to avoid resync operation if SKB could not exist in the fifo because of OOO cqe (skb_id must be between consumer and producer index).
From the CVE record · Linux
The Linux kernel’s mlx5 PTP queue can encounter a use-after-free when an out-of-order completion drains the FIFO and a re-sync operation pops from the empty queue. The input does not specify how an attacker could trigger this or whether access or user interaction is required.
Engineers running Linux kernels with the mlx5 driver should check their deployments; affected versions are not specified.