{"id":"CVE-2026-68341","state":"PUBLISHED","title":"ovpn: fix use after free in unlock_ovpn()","description":"In the Linux kernel, the following vulnerability has been resolved:\n\novpn: fix use after free in unlock_ovpn()\n\nunlock_ovpn() iterates over the release_list using llist_for_each_entry()\nand drops the peer reference inside the loop body via ovpn_peer_put().\n\nIf this drops the last reference, the peer is eventually freed. However,\nllist_for_each_entry() reads peer->release_entry.next in the loop advance\nexpression, which runs after the body. By that time the peer may have\nalready been freed, resulting in a use after free when advancing to the\nnext list entry.\n\nFix this by using llist_for_each_entry_safe(), which caches the next\npointer before executing the loop body.","publishedAt":"2026-08-10T12:03:17.821Z","updatedAt":"2026-08-17T05:03:41.213Z","severity":{"score":8.8,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"80747caef33d77f5c1b3d24644e6d7dae69066b5","status":"affected","lessThan":"5b96227c0e8b212b74838424c929fc889aedb555","versionType":"git"},{"version":"80747caef33d77f5c1b3d24644e6d7dae69066b5","status":"affected","lessThan":"4cdb209f12a89c5faf9be0c45edb90ccdf65db0c","versionType":"git"},{"version":"80747caef33d77f5c1b3d24644e6d7dae69066b5","status":"affected","lessThan":"e1ad6fe5db719874efa45b2caf9934552e09fc43","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/net/ovpn/peer.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.16","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.16","versionType":"semver"},{"version":"6.18.42","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.1.6","status":"unaffected","lessThanOrEqual":"7.1.*","versionType":"semver"},{"version":"7.2","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/net/ovpn/peer.c"]}],"references":["https://git.kernel.org/stable/c/5b96227c0e8b212b74838424c929fc889aedb555","https://git.kernel.org/stable/c/4cdb209f12a89c5faf9be0c45edb90ccdf65db0c","https://git.kernel.org/stable/c/e1ad6fe5db719874efa45b2caf9934552e09fc43"],"weaknesses":[],"ingestedAt":"2026-10-29T20:12:49.727Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/68xxx/CVE-2026-68341.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-68341","state":"PUBLISHED","datePublished":"2026-08-10T12:03:17.821Z","dateUpdated":"2026-08-17T05:03:41.213Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-07-30T09:28:09.384Z"},"containers":{"cna":{"title":"ovpn: fix use after free in unlock_ovpn()","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\novpn: fix use after free in unlock_ovpn()\n\nunlock_ovpn() iterates over the release_list using llist_for_each_entry()\nand drops the peer reference inside the loop body via ovpn_peer_put().\n\nIf this drops the last reference, the peer is eventually freed. However,\nllist_for_each_entry() reads peer->release_entry.next in the loop advance\nexpression, which runs after the body. By that time the peer may have\nalready been freed, resulting in a use after free when advancing to the\nnext list entry.\n\nFix this by using llist_for_each_entry_safe(), which caches the next\npointer before executing the loop body."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"80747caef33d77f5c1b3d24644e6d7dae69066b5","status":"affected","lessThan":"5b96227c0e8b212b74838424c929fc889aedb555","versionType":"git"},{"version":"80747caef33d77f5c1b3d24644e6d7dae69066b5","status":"affected","lessThan":"4cdb209f12a89c5faf9be0c45edb90ccdf65db0c","versionType":"git"},{"version":"80747caef33d77f5c1b3d24644e6d7dae69066b5","status":"affected","lessThan":"e1ad6fe5db719874efa45b2caf9934552e09fc43","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/net/ovpn/peer.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.16","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.16","versionType":"semver"},{"version":"6.18.42","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.1.6","status":"unaffected","lessThanOrEqual":"7.1.*","versionType":"semver"},{"version":"7.2","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/net/ovpn/peer.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/5b96227c0e8b212b74838424c929fc889aedb555"},{"url":"https://git.kernel.org/stable/c/4cdb209f12a89c5faf9be0c45edb90ccdf65db0c"},{"url":"https://git.kernel.org/stable/c/e1ad6fe5db719874efa45b2caf9934552e09fc43"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":8.8,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:N - unlock_ovpn() is reached directly from remote-peer activity: a malformed/aborted OpenVPN TCP stream schedules ovpn_tcp_peer_del_work() -> ovpn_peer_del() (tcp.c:154/287/506), peer disconnect hits ovpn_tcp_close(), and remote peers falling silent make ovpn_peer_keepalive_work() queue peers onto release_list. No local action is needed to enter the vulnerable loop.\nAC:L - The attacker controls both the trigger and its repetition rate: a remote peer can force transport errors, reconnects and keepalive expiries arbitrarily often, and in MP mode can control how many peers land on release_list at once, plus generate traffic-driven allocation pressure to influence slab reuse of the freed ovpn_peer.\nPR:L - The vulnerable loop only runs for peers already installed in the kernel, which the openvpn userspace daemon does for a connected client, so the attacker acts as an established (low-privileged) VPN peer rather than an unauthenticated stranger; no administrative rights on the target are needed.\nUI:N - Peer removal and the subsequent list walk happen automatically inside the kernel's TCP error/close handling and keepalive worker; no administrator or user action on the victim host is required.\nS:U - The use-after-free corrupts kernel heap state within the same kernel security authority; no VM, IOMMU, or sandbox boundary is crossed.\nC:H - The freed ovpn_peer is re-read to obtain the next list pointer, so a reclaimed and re-populated slab object lets the attacker steer the walk onto arbitrary memory that is then dereferenced (peer->sock, peer->refcount), yielding a kernel-memory read primitive and disclosure of sensitive kernel data.\nI:H - Continuing the walk onto a stale/attacker-groomed object causes rcu_replace_pointer() writes, lock_sock() and kref_put() (a controlled decrement plus invocation of a release callback) on a bogus struct ovpn_peer, giving heap-spray-based write and control-flow-hijack potential typical of exploitable UAFs.\nA:H - Dereferencing freed or recycled memory as an ovpn_peer reliably produces oops/panic or slab corruption, taking down the VPN gateway kernel; the path is remotely repeatable, so it is a dependable denial of service."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-17T05:03:41.213Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.16","versionEndExcluding":"6.18.42"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.16","versionEndExcluding":"7.1.6"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.16","versionEndExcluding":"7.2"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}