blob: b518eb66bf89f64df93ece0d67ede6a3e6ec2edb [file] [log] [blame]
The vulnerability, tracked as CVE-2021-46968, affects the Linux kernel's s390/zcrypt driver. Specifically, it involves a memory leak that occurs when a zcard or zqueue is hot-unplugged. This happens because of a mismatch between the get/put operations and the kref counter for the embedded struct.
The issue arises from the initial value of the kref counter being set to 1 during initialization, but not being properly decremented to zero when the card or queue is unregistered. As a result, the zcard and zqueue structs are not released and freed, leading to a memory leak.
The fix involves adjusting the handling of the kref counters, ensuring that the initial value drops to zero when the card or queue is unregistered, triggering the release and free of the object. This issue was introduced in kernel version 5.10 with commit 29c2680fd2bf and has been fixed in subsequent versions, including 5.10.36, 5.11.20, 5.12.3, and 5.13.