net: macb: fix dma_alloc_coherent() leak on macb_alloc() error paths
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.18
|
In the Linux kernel, the following vulnerability has been resolved:
net: macb: fix dma_alloc_coherent() leak on macb_alloc() error paths
Fix 3 leaks in macb_alloc() error paths: - Tx buffer allocated but crossing a 4G boundary: Tx leaked. - Rx buffer allocation fails: Tx leaked. - Rx buffer allocated but crossing a 4G boundary: Tx & Rx leaked.
This is because our error handling calls macb_free(bp) which in turn frees the buffers stored in bp->queues[0], but nothing has been stored in there. Fix by storing allocated buffers into bp->queues[0] ASAP.
From the CVE record · Linux
The Linux kernel’s macb driver leaks DMA buffers when macb_alloc() encounters certain allocation failures or buffers cross a 4 GB boundary. The input does not establish whether an attacker can trigger these conditions or specify any access or interaction requirements.
Engineers running Linux systems that use the macb network driver should check whether their kernel is affected; affected versions were not provided.