Linux: dpaa2-switch: fix the error path in dpaa2_switch_rx()
What fixes it
- 791068c962469af0090e1a1ee63657fb9eef40dbLinuxCVE List
- 259ad6093204b999d41e7e6d0ad90ef9a71a44abLinuxCVE List
- 74c1c9f5c0c30bbd0c2cf87b6e3507e7ea46c13dLinuxCVE List
- 5.15.222LinuxCVE List
- 6.1.189LinuxCVE List
- 6.6.158LinuxCVE List
A fixed version on one release line is not the upgrade target for every line. Check your exact version and any vendor backports.
Description
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.
Text from CVE List
Affected versions 17
- Linuxaffected: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 before 791068c962469af0090e1a1ee63657fb9eef40dbCVE List
- Linuxaffected: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 before ee54f8d7e642c44cfcc2dcb390b4c50e145d81b8CVE List
- Linuxaffected: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 before 259ad6093204b999d41e7e6d0ad90ef9a71a44abCVE List
- Linuxaffected: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 before f4ceb8e3d6d5becb4cda7a7098a8638e18c835a1CVE List
- Linuxaffected: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 before fa232b4496cb59503ae5108c756cbe10e59b0bc3CVE List
- Linuxaffected: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 before 74c1c9f5c0c30bbd0c2cf87b6e3507e7ea46c13dCVE List
- Linuxaffected: all versions before 5.15.222CVE List
- Linuxaffected: all versions before 6.1.189CVE List
- Linuxaffected: all versions before 6.6.158CVE List
- Linuxaffected: all versions before 6.12.111CVE List
- Linuxaffected: all versions before 6.18.53CVE List
- Linuxunaffected: 5.15.222 through 5.15.*CVE List
- Linuxunaffected: 6.1.189 through 6.1.*CVE List
- Linuxunaffected: 6.6.158 through 6.6.*CVE List
- Linuxunaffected: 6.12.111 through 6.12.*CVE List
- Linuxunaffected: 6.18.53 through 6.18.*CVE List
- Linuxunaffected: 7.2CVE List
References 6
- git.kernel.org/stable/c/791068c962469af0090e1a1ee63657fb9eef40dbReferencevia CVE List
- git.kernel.org/stable/c/ee54f8d7e642c44cfcc2dcb390b4c50e145d81b8Referencevia CVE List
- git.kernel.org/stable/c/259ad6093204b999d41e7e6d0ad90ef9a71a44abReferencevia CVE List
- git.kernel.org/stable/c/f4ceb8e3d6d5becb4cda7a7098a8638e18c835a1Referencevia CVE List
- git.kernel.org/stable/c/fa232b4496cb59503ae5108c756cbe10e59b0bc3Referencevia CVE List
- git.kernel.org/stable/c/74c1c9f5c0c30bbd0c2cf87b6e3507e7ea46c13dReferencevia CVE List