CVE-2021-46979 iio: core: fix ioctl handlers removal
A double free vulnerability in the Linux kernel IIO subsystem allows local attackers to cause a kernel panic and system crash.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Local or same network only
- Victim action needed
- Not needed
- Fix
- None listed
What is CVE-2021-46979?
CVE-2021-46979 is a medium-severity use after free vulnerability in Linux kernel, published on 28 Feb 2024. It can only be exploited from the same machine or local network, with no action from the victim.
Official description
In the Linux kernel, the following vulnerability has been resolved:
iio: core: fix ioctl handlers removal
Currently ioctl handlers are removed twice. For the first time during iio_device_unregister() then later on inside iio_device_unregister_eventset() and iio_buffers_free_sysfs_and_mask(). Double free leads to kernel panic.
Fix this by not touching ioctl handlers list directly but rather letting code responsible for registration call the matching cleanup routine itself.
Weakness: CWE-415
Which versions are affected by CVE-2021-46979?
It affects 1 product.
Products include Linux kernel.
How do I fix CVE-2021-46979?
No fix has been published for CVE-2021-46979 yet. Limit exposure of the affected software until one is available.
Upgrade to the fixed version. These bugs are found with fuzzing and sanitisers and avoided by memory-safe languages. More about Use after free.
Is CVE-2021-46979 being exploited?
There is no known exploitation of CVE-2021-46979 in the wild and no public exploit code.
Other vulnerabilities in Linux kernel
Sources
Also known as GHSA-cghh-45gx-84f7, UBUNTU-CVE-2021-46979.