CVE-2021-47241·Kernel vulnerability
In the Linux kernel, the following vulnerability has been resolved: ethtool: strset: fix message length calculation Outer nest for ETHTOOL_A_STRSET_STRINGSETS is not accounted for. This may result in ETHTOOL_MSG_STRSET_GET producing a warning like: calculated message payload length (684) not sufficient WARNING: CPU: 0 PID: 30967 at net/ethtool/netlink.c:369 ethnl_default_doit+0x87a/0xa20 and a splat. As usually with such warnings three conditions must be met for the warning to trigger: - there must be no skb size rounding up (e.g. reply_size of 684); - string set must be per-device (so that the header gets populated); - the device name must be at least 12 characters long. all in all with current user space it looks like reading priv flags is the only place this could potentially happen. Or with syzbot :)
- Severity
- high
- Software
- Kernel
- Fixed in
- 5.12.13
- Published
- 2024-05-21
Affected versions
From: 5.11
Until: 5.12.13
Fixed in: 5.12.13
How to fix this CVE
Update your Linux kernel to version 5.12.13 or later to resolve a memory allocation calculation flaw in the ethtool netlink interface. This vulnerability can cause kernel warnings and system instability when querying network device string sets, particularly on devices with longer names. Apply the patch immediately to prevent potential denial of service conditions.
sudo dnf update kernel kernel-develDefensia detects this vulnerability
How to check if you are affected
- Step 1: Check your current kernel version with `uname -r` and compare against 5.12.13—versions from 5.11 through 5.12.12 are vulnerable.
- Step 2: Verify ethtool is installed and can query network devices using `ethtool --show-priv-flags <device_name>` on interfaces with device names 12+ characters long.
- Step 3: Search kernel logs for the specific warning message using `dmesg | grep -i 'calculated message payload length.*not sufficient'` or `journalctl -k | grep 'ethnl_default_doit'`.
- Step 4: After patching, confirm the new kernel version with `uname -r` and verify no warnings are generated when running ethtool queries again.
FAQ
What is CVE-2021-47241?
This vulnerability is a buffer size miscalculation bug in the Linux kernel's ethtool netlink handler where the outer nesting structure for string set responses is not properly accounted for in message length calculations. When certain conditions align (specific payload sizes, per-device string sets, and longer device names), the kernel emits warnings and may exhibit unstable behavior.
Is CVE-2021-47241 being actively exploited?
No, this vulnerability is not being actively exploited in the wild. CISA has not listed it in the Known Exploited Vulnerabilities catalog, and no public exploit code is available.
What versions of Kernel are affected by CVE-2021-47241?
Linux kernel versions 5.11.0 through 5.12.12 are vulnerable. Version 5.12.13 and later contain the fix.
How do I check if my server is vulnerable to CVE-2021-47241?
Run `uname -r` to see your kernel version. If it shows 5.11.x or 5.12.0 through 5.12.12, your system is vulnerable and requires immediate patching.
Does Defensia detect CVE-2021-47241?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If the Linux kernel is installed on a monitored server, CVE-2021-47241 will appear in your dashboard with remediation steps.
Related Kernel CVEs
References
- https://git.kernel.org/stable/c/cfc7f0e70d649e6d2233fba0d9390b525677d971
- https://git.kernel.org/stable/c/e175aef902697826d344ce3a12189329848fe898
- https://git.kernel.org/stable/c/fb3a948143688e14e2cfd2a2812877923d0e5e92
- https://git.kernel.org/stable/c/cfc7f0e70d649e6d2233fba0d9390b525677d971
- https://git.kernel.org/stable/c/e175aef902697826d344ce3a12189329848fe898
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2021-47241. Free for 1 server.
Get started free