Linux kernel invalid free in DPAA2 switch receive error handling
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 613c0a5810b79610db8535c3816b0c149675f8ee · < 74c1c9f5c0c30bbd0c2cf87b6e3507e7ea46c13d| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
dpaa2-switch: fix the error path in dpaa2_switch_rx()
In case of an error in dpaa2_switch_rx(), the dpaa2_switch_free_fd() function is called in order to free the FD. This is incorrect since the dpaa2_switch_free_fd() is intended to be used on Tx frame descriptors, meaning that it expects in the software annotation area of the FD data to find a valid skb pointer on which to call dev_kfree_skb().
Fix this by extracting the dma_unmap_page() from dpaa2_switch_build_linear_skb() directly into the dpaa2_switch_rx() function. This allows us to directly use free_pages() in case of an error before an SKB was created and kfree_skb() afterwards.
From the CVE record · Linux
The Linux kernel’s dpaa2-switch receive function uses a transmit-frame cleanup function on an error path, where it expects an SKB pointer that may not exist. The input does not establish how an attacker could trigger this error or whether network access, authentication, or user interaction is required.
Engineers running Linux kernels with the dpaa2-switch component should check their versions; affected versions were not provided.