CVE-2021-47241 ethtool: strset: fix message length calculation
A flaw in the Linux kernel ethtool module causes a warning and potential crash when calculating message lengths for specific string set requests.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2021-47241?
CVE-2021-47241 is a high-severity denial of service vulnerability in Linux kernel, published on 21 May 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
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 :)
Weakness: CWE-266
Which versions are affected by CVE-2021-47241?
It affects 1 product.
Products include Linux kernel.
How do I fix CVE-2021-47241?
Apply the vendor's patch.
Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.
Is CVE-2021-47241 being exploited?
There is no known exploitation of CVE-2021-47241 in the wild and no public exploit code.
Other vulnerabilities in Linux kernel
Sources
Also known as DEBIAN-CVE-2021-47241, GHSA-hh94-frj2-pf9r, UBUNTU-CVE-2021-47241.