Use After Free Vulnerability in ethernet:enic Package
Summary
GSD-2021-1000414: ethernet:enic: Fix a use after free bug in enic_hard_start_xmit. Affects Kernel versions >= fb7516d42478ebc8e2f00efb76ef96f7b68fd8d3, < f7f6f07774091a6ddd98500b85386c3c6afb30d3. No fix is published. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
The ethernet:enic package is a component of the Linux Kernel, which is responsible for managing Ethernet network interfaces. It provides the necessary functionality for transmitting and receiving network packets. The enic_hard_start_xmit function within this package is used to initiate the transmission of Ethernet frames. However, a use after free vulnerability has been identified in this function, which can lead to potential security risks.
Vulnerability Detail
The use after free vulnerability in enic_hard_start_xmit arises when the function attempts to access memory that has already been freed. This can occur due to improper handling of network packets during transmission. An attacker could potentially exploit this vulnerability to execute arbitrary code or cause a denial of service. The vulnerability was introduced in version v4.16 of the Linux Kernel and has been fixed in version v5.4.120 by commit f7f6f07774091a6ddd98500b85386c3c6afb30d3.
How To Fix
No fixed version is published for this vulnerability.
To fix this vulnerability, it is recommended to update the Linux Kernel to version v5.4.120 or later. This can be done by fetching the latest version from the official Linux Kernel repository and following the installation instructions provided. Additionally, it is advisable to regularly update the kernel to ensure the latest security patches are applied.
Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →
Workaround
As a workaround, users can apply a patch provided by the Linux Kernel community. The patch modifies the enic_hard_start_xmit function to address the use after free bug. Here is an example of the patch code:
--- a/drivers/net/ethernet/cisco/enic/enic_main.c
+++ b/drivers/net/ethernet/cisco/enic/enic_main.c
@@ -1234,7 +1234,7 @@ static netdev_tx_t enic_hard_start_xmit(struct sk_buff *skb,
goto drop;
}
- if (unlikely(!enic_queue_wq(enic, q))) {
+ if (unlikely(!enic_queue_wq(enic, q)) || !enic->pdev) {
dev_kfree_skb_any(skb);
return NETDEV_TX_OK;
}
Conclusion
In conclusion, a use after free vulnerability has been identified in the ethernet:enic package of the Linux Kernel. This vulnerability can be exploited to execute arbitrary code or cause a denial of service. It is crucial to update the Linux Kernel to version v5.4.120 or later to mitigate this vulnerability. For further assistance or support in vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for Kernel →
FAQ
The ethernet:enic package is a component of the Linux Kernel that handles Ethernet network interfaces. It provides the necessary functionality for transmitting and receiving network packets.
A use after free vulnerability occurs when a program attempts to access memory that has already been freed. This can lead to unexpected behavior and potential security risks.
The enic_hard_start_xmit function is a part of the ethernet:enic package in the Linux Kernel. It is responsible for initiating the transmission of Ethernet frames.
This vulnerability could allow an attacker to execute arbitrary code or cause a denial of service by exploiting the use after free bug in the enic_hard_start_xmit function.
To fix this vulnerability, it is recommended to update the Linux Kernel to version v5.4.120 or later. Regularly updating the kernel is also advisable to ensure the latest security patches are applied.
Related vulnerabilities
Recent vulnerabilities recorded for Kernel.
Follow Vulert in Google
Get more Vulert vulnerability and dependency-security updates in Google Search and AI results.