CVE-2021-46998·Kernel vulnerability
In the Linux kernel, the following vulnerability has been resolved: ethernet:enic: Fix a use after free bug in enic_hard_start_xmit In enic_hard_start_xmit, it calls enic_queue_wq_skb(). Inside enic_queue_wq_skb, if some error happens, the skb will be freed by dev_kfree_skb(skb). But the freed skb is still used in skb_tx_timestamp(skb). My patch makes enic_queue_wq_skb() return error and goto spin_unlock() incase of error. The solution is provided by Govind. See https://lkml.org/lkml/2021/4/30/961.
- Severity
- high
- Software
- Kernel
- Fixed in
- 5.12.5
- Published
- 2024-02-28
Affected versions
From: 5.12
Until: 5.12.5
Fixed in: 5.12.5
How to fix this CVE
Update your Linux kernel to version 5.12.5 or later to patch the use-after-free vulnerability in the enic Ethernet driver's packet transmission function. This vulnerability allows a freed memory region to be accessed after deallocation, potentially leading to kernel crashes or privilege escalation on systems using Cisco UCS virtual network adapters. Apply the kernel update as soon as possible, especially on production systems running affected versions.
sudo dnf update kernelDefensia detects this vulnerability
How to check if you are affected
- Check installed kernel version: uname -r (vulnerable if output shows 5.12.0 through 5.12.4)
- Verify if enic driver is loaded: lsmod | grep enic (if present, system may use affected driver)
- Review kernel ring buffer for memory errors: dmesg | grep -i 'use-after-free\|use after free\|uaf'
- Confirm fix by upgrading and checking: uname -r should show 5.12.5 or higher; verify with dmesg | tail -20 for 'enic' driver messages without errors
FAQ
What is CVE-2021-46998?
This vulnerability is a use-after-free flaw in the Linux kernel's enic Ethernet driver where freed memory is incorrectly accessed during packet transmission, potentially causing kernel instability or privilege escalation on systems with Cisco UCS virtual network adapters.
Is CVE-2021-46998 being actively exploited?
No, according to CISA's Known Exploited Vulnerabilities list, CVE-2021-46998 is not currently being actively exploited. No public exploit has been released for this vulnerability.
What versions of Kernel are affected by CVE-2021-46998?
Linux kernel versions 5.12.0 through 5.12.4 are vulnerable; the fix is included in kernel version 5.12.5 and later.
How do I check if my server is vulnerable to CVE-2021-46998?
Run 'uname -r' and check if the output falls within 5.12.0-5.12.4 range, then verify enic driver presence with 'lsmod | grep enic'. If both conditions are met, your system is vulnerable.
Does Defensia detect CVE-2021-46998?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If Linux kernel is installed on a monitored server, CVE-2021-46998 will appear in your dashboard with remediation steps.
Related Kernel CVEs
References
- https://git.kernel.org/stable/c/25a87b1f566b5eb2af2857a928f0e2310d900976
- https://git.kernel.org/stable/c/643001b47adc844ae33510c4bb93c236667008a3
- https://git.kernel.org/stable/c/6892396ebf04ea2c021d80e10f4075e014cd7cc3
- https://git.kernel.org/stable/c/7afdd6aba95c8a526038e7abe283eeac3e4320f1
- https://git.kernel.org/stable/c/d90529392aaf498dafa95d212295d64b2cea4e24
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2021-46998. Free for 1 server.
Get started free