CVE-2026-68342: ovpn: avoid putting unrelated P2P peer on socket release

Published Aug 10, 2026
·
Updated

In the Linux kernel, the following vulnerability has been resolved:

ovpn: avoid putting unrelated P2P peer on socket release

ovpnpeerreleasep2p() is called when an OVPN UDP socket is being destroyed. It checks the currently published P2P peer and releases it only if that peer still uses the socket being destroyed.

A peer replacement can publish a new peer before the old UDP socket is destroyed. When the old socket destruction path runs afterwards, ovpnpeerreleasep2p() observes the new peer through ovpn->peer. Since the new peer uses a different socket, the function takes the socket mismatch branch.

That branch still calls ovpnpeerput(peer). At this point, however, peer is the currently published replacement peer, not the peer associated with the socket being destroyed. Dropping its reference can free it while ovpn->peer still points to it, leading to later use-after-free accesses from the peer and socket cleanup paths.

KASAN reports this as a slab-use-after-free on the kmalloc-1k ovpnpeer object. In the reproducer, the object is allocated from ovpnpeernew() via ovpnnlpeernewdoit(), and freed through ovpnpeerreleasercu() from RCU callback processing. Observed access sites include ovpnpeerremove(), ovpnsocketrelease(), ovpnnlpeerdelnotify(), and unlockovpn().

Fix this by returning from the socket mismatch branch without putting the peer.

Affected Software

1 affected component
Linux Linux kernel

Event History

Aug 10, 2026
CVE Published
via MITRE·12:03 PM
Data Sourced
via MITRE·12:03 PM
Description
Data Sourced
via NVD·01:20 PM
Description
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-68342?

CVE-2026-68342 is classified with medium severity due to potential impacts on connection stability.

2

How do I fix CVE-2026-68342?

To fix CVE-2026-68342, update your Linux kernel to the latest version where this vulnerability has been resolved.

3

What are the potential impacts of CVE-2026-68342?

CVE-2026-68342 can result in unexpected behavior during socket releases, potentially leading to information leakage or denial of service.

4

What systems are affected by CVE-2026-68342?

CVE-2026-68342 affects environments utilizing OpenVPN with the Linux kernel where related P2P peer functionality is deployed.

5

Is CVE-2026-68342 exploit-related?

While CVE-2026-68342 is not directly associated with exploitation, it could allow an attacker to destabilize connections under certain conditions.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203