CVE-2021-46968 s390/zcrypt: fix zcard and zqueue hot-unplug memleak
A memory leak in the Linux kernel s390/zcrypt driver during hot-unplug operations can lead to resource exhaustion and denial of service.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Local or same network only
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2021-46968?
CVE-2021-46968 is a medium-severity memory corruption vulnerability in Linux kernel, published on 27 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:
s390/zcrypt: fix zcard and zqueue hot-unplug memleak
Tests with kvm and a kmemdebug kernel showed, that on hot unplug the zcard and zqueue structs for the unplugged card or queue are not properly freed because of a mismatch with get/put for the embedded kref counter.
This fix now adjusts the handling of the kref counters. With init the kref counter starts with 1. This initial value needs to drop to zero with the unregister of the card or queue to trigger the release and free the object.
Weakness: CWE-401
Which versions are affected by CVE-2021-46968?
It affects 1 product.
Products include Linux kernel.
How do I fix CVE-2021-46968?
Apply the vendor's patch.
Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.
Is CVE-2021-46968 being exploited?
There is no known exploitation of CVE-2021-46968 in the wild and no public exploit code.
Other vulnerabilities in Linux kernel
Sources
Also known as DEBIAN-CVE-2021-46968, GHSA-rcvc-x6h8-mpp2, UBUNTU-CVE-2021-46968.