Executive brief
A vulnerability in the Linux kernel's Mellanox network driver can cause system instability or network hardware failure under heavy memory pressure. When the system runs low on memory, the driver may incorrectly release active memory mappings used by the network card, leading the hardware to enter an error state. This can result in a denial of service where network connectivity is lost until the system or hardware is reset.
Technical details
A vulnerability in the `net/mlx5` driver's multi-packet Work Queue Element (WQE) transmit path arises from improper handling of DMA mapping failures. When `mlx5e_sq_xmit_mpwqe` fails to obtain a DMA mapping (typically due to IOMMU page table allocation failure under memory pressure), the code jumps to an error label that erroneously calls `mlx5e_dma_unmap_wqe_err`. This function removes an entry from the Send Queue's (SQ) FIFO list of active mappings. Because the current mapping attempt already failed, this action unmaps a different, unrelated active DMA mapping. If the PCI function subsequently attempts to use that IOVA, the IOMMU detects an unauthorized access, potentially placing the PCI function into an error state (observed on s390 architectures). The fix involves removing the erroneous unmap call from the error path.
Affected products
- Linux Linux Kernel 5.10 to 5.10.227, 5.11 to 5.15.168, 5.16 to 6.1.113, 6.2 to 6.6.55, 6.7 to 6.10.14, 6.11 to 6.11.3
Timeline
- 2024-10-21: advisory: CVE-2024-50001 published
- 2024-09-25: patched: Initial fix committed to mainline kernel
References
- https://git.kernel.org/stable/c/26fad69b34fcba80d5c7d9e651f628e6ac927754
- https://git.kernel.org/stable/c/2bcae12c795f32ddfbf8c80d1b5f1d3286341c32
- https://git.kernel.org/stable/c/8bb8c12fb5e2b1f03d603d493c92941676f109b5
- https://git.kernel.org/stable/c/ca36d6c1a49b6965c86dd528a73f38bc62d9c625
- https://git.kernel.org/stable/c/ce828b347cf1b3c1b12b091d02463c35ce5097f5
- https://git.kernel.org/stable/c/ecf310aaf256acbc8182189fe0aa1021c3ddef72
- https://git.kernel.org/stable/c/fc357e78176945ca7bcacf92ab794b9ccd41b4f4