net: stmmac: fix dma mapping leak in stmmac_tso_xmit()
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 |
|
|
In the Linux kernel, the following vulnerability has been resolved:
net: stmmac: fix dma mapping leak in stmmac_tso_xmit()
In stmmac_tso_xmit(), if the DMA mapping of an skb fragment fails, the frame is dropped but the DMA mappings already created for the linear part and for the fragments mapped before the failure are never unmapped, leaking DMA mappings.
Fix the leak by walking back over the descriptors used by the frame and releasing each of them with stmmac_free_tx_buffer(). Moreover, release the descriptors with stmmac_release_tx_desc() unmapping the DMA buffers.
From the CVE record · Linux
The Linux kernel's stmmac_tso_xmit() leaks DMA mappings when mapping an skb fragment fails: it drops the frame without unmapping buffers mapped earlier. The input does not establish how an attacker could trigger this failure or whether access or user interaction is required.
Engineers running Linux kernels with the stmmac driver should check whether their kernel includes the fix; affected versions are not specified.