CVE-2026-80520: ovpn: fix NULL dereference when killing missing key
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
ovpn: fix NULL dereference when killing missing key
ovpn_crypto_kill_key assumes both crypto slots are populated and dereferences each slot before checking it. That is not guaranteed: a peer can have only one installed key, and the kill path may be asked to remove a key that is not present.
Read each slot once while holding the crypto state lock, check for NULL before looking at key_id, and only replace the slot that actually matches.
The Linux kernel CVE team has assigned CVE-2026-80520 to this issue.
Affected and fixed versions
===========================
Issue introduced in 6.16 with commit 89d3c0e4612afa1c6429ed68d298e35592fbe208 and fixed in 6.18.46 with commit a47a080d06ee9d94dc6a2da0fc2b9beeeedb92b3 Issue introduced in 6.16 with commit 89d3c0e4612afa1c6429ed68d298e35592fbe208 and fixed in 7.1.10 with commit acf32a5dff082044cf0fd9492f3c10b7357c15ee Issue introduced in 6.16 with commit 89d3c0e4612afa1c6429ed68d298e35592fbe208 and fixed in 7.2 with commit 41d44ac7a61e2f74453af40d4fe1b82af9ea0ada
Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.
Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at
https://cve.org/CVERecord/?id=CVE-2026-80520
will be updated if fixes are backported, please check that for the most up to date information about this issue.
Affected files
==============
The file(s) affected by this issue are:
drivers/net/ovpn/crypto.c
Mitigation
==========
The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:
https://git.kernel.org/stable/c/a47a080d06ee9d94dc6a2da0fc2b9beeeedb92b3 https://git.kernel.org/stable/c/acf32a5dff082044cf0fd9492f3c10b7357c15ee https://git.kernel.org/stable/c/41d44ac7a61e2f74453af40d4fe1b82af9ea0ada