Linux Kernel OpenVPN Peer Reference Count Vulnerability in Error Handling Path

Vulnerability

A vulnerability exists in the OpenVPN implementation within the Linux kernel, specifically related to how peer references are managed during error handling. When a new peer is created and an error occurs, the peer's reference count is not properly updated, leading to potential use-after-free issues. This problem arises because the error handling path releases the peer directly, bypassing the necessary reference count management. As a result, if an error occurs while a peer is being actively used, it can lead to accessing freed memory, causing instability or crashes.

Impact

Exploitation of this vulnerability can lead to use-after-free conditions, where memory that has been freed is accessed again, potentially causing crashes or allowing for arbitrary code execution.

Reproduction

To reproduce this vulnerability, create a new OpenVPN peer over a TCP connection. While the peer is being established, introduce an error in the peer creation process. This can be done by simulating a failure in the 'ovpn_nl_peer_modify()' or 'ovpn_peer_add()' functions. The error handling will then release the peer reference incorrectly, leading to a use-after-free situation.

Remediation

The vulnerability has been addressed in the Linux kernel. Users should upgrade to the latest version where this issue has been fixed.

Added: Jul 19, 2026, 6:17 PM
Updated: Jul 19, 2026, 6:17 PM

Vulnerability Rating

Custom Algorithm
spread
9.0
impact
3.1
exploitability
3.9
remediation
7.7
relevance
9.7
threat
4.8
urgency
2.9
incentive
0.0

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.