net/mlx5: Fix error path in multi-packet WQE transmit
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 5af75c747e2a868abbf8611494b50ed5e076fca7 · < 8bb8c12fb5e2b1f03d603d493c92941676f109b5| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
net/mlx5: Fix error path in multi-packet WQE transmit
Remove the erroneous unmap in case no DMA mapping was established
The multi-packet WQE transmit code attempts to obtain a DMA mapping for the skb. This could fail, e.g. under memory pressure, when the IOMMU driver just can't allocate more memory for page tables. While the code tries to handle this in the path below the err_unmap label it erroneously unmaps one entry from the sq's FIFO list of active mappings. Since the current map attempt failed this unmap is removing some random DMA mapping that might still be required. If the PCI function now presents that IOVA, the IOMMU may assumes a rogue DMA access and e.g. on s390 puts the PCI function in error state.
The erroneous behavior was seen in a stress-test environment that created memory pressure.
From the CVE record · Linux
The Linux kernel’s net/mlx5 multi-packet WQE transmit error path can unmap an active DMA mapping when a new mapping fails, such as under memory pressure. A subsequent DMA access may put the PCI function into an error state; the input does not identify an attacker path or authentication or user-interaction requirements.
Administrators running Linux kernels with the affected net/mlx5 transmit code should check their kernel version; affected versions are not specified.