CVE-2026-68341 PUBLISHED

ovpn: fix use after free in unlock_ovpn()

Assigner: Linux
Reserved: 30.07.2026 Published: 10.08.2026 Updated: 10.08.2026

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

ovpn: fix use after free in unlock_ovpn()

unlock_ovpn() iterates over the release_list using llist_for_each_entry() and drops the peer reference inside the loop body via ovpn_peer_put().

If this drops the last reference, the peer is eventually freed. However, llist_for_each_entry() reads peer->release_entry.next in the loop advance expression, which runs after the body. By that time the peer may have already been freed, resulting in a use after free when advancing to the next list entry.

Fix this by using llist_for_each_entry_safe(), which caches the next pointer before executing the loop body.

Product Status

Vendor Linux
Product Linux
Versions Default: unaffected
  • affected from 80747caef33d77f5c1b3d24644e6d7dae69066b5 to 5b96227c0e8b212b74838424c929fc889aedb555 (excl.)
  • affected from 80747caef33d77f5c1b3d24644e6d7dae69066b5 to 4cdb209f12a89c5faf9be0c45edb90ccdf65db0c (excl.)
  • affected from 80747caef33d77f5c1b3d24644e6d7dae69066b5 to e1ad6fe5db719874efa45b2caf9934552e09fc43 (excl.)
Vendor Linux
Product Linux
Versions Default: affected
  • Version 6.16 is affected
  • unaffected from 0 to 6.16 (excl.)
  • unaffected from 6.18.42 to 6.18.* (incl.)
  • unaffected from 7.1.6 to 7.1.* (incl.)
  • unaffected from 7.2-rc5 to * (incl.)

References