CVE-2022-50476: ntb_netdev: Use dev_kfree_skb_any() in interrupt context
In the Linux kernel, the following vulnerability has been resolved:
ntbnetdev: Use devkfreeskbany() in interrupt context
TX/RX callback handlers (ntbnetdevtxhandler(), ntbnetdevrxhandler()) can be called in interrupt context via the DMA framework when the respective DMA operations have completed. As such, any calls by these routines to free skb's, should use the interrupt context safe devkfreeskbany() function.
Previously, these callback handlers would call the interrupt unsafe version of devkfreeskb(). This has not presented an issue on Intel IOAT DMA engines as that driver utilizes tasklets rather than a hard interrupt handler, like the AMD PTDMA DMA driver. On AMD systems, a kernel WARNING message is encountered, which is being issued from skbreleaseheadstate() due to inhardirq() being true.
Besides the user visible WARNING from the kernel, the other symptom of this bug was that TCP/IP performance across the ntbnetdev interface was very poor, i.e. approximately an order of magnitude below what was expected. With the repair to use devkfreeskbany(), kernel WARNINGs from skbreleaseheadstate() ceased and TCP/IP performance, as measured by iperf, was on par with expected results, approximately 20 Gb/s on AMD Milan based server. Note that this performance is comparable with Intel based servers.
Affected Software
Remediation
Event History
Frequently Asked Questions
What is the severity of CVE-2022-50476?
CVE-2022-50476 has a moderate severity level due to potential exploitation in interrupt context affecting network drivers.
How do I fix CVE-2022-50476?
To fix CVE-2022-50476, you should update to the latest stable version of the Linux Kernel where the vulnerability is patched.
What vulnerabilities does CVE-2022-50476 affect?
CVE-2022-50476 affects the Linux Kernel specifically related to NTB network device drivers.
What is the impact of CVE-2022-50476 if exploited?
Exploitation of CVE-2022-50476 could lead to denial of service or unexpected behavior in network communications.
Who is at risk from CVE-2022-50476?
Users and systems running vulnerable versions of the Linux Kernel with NTB network device drivers are at risk from CVE-2022-50476.