{"id":"CVE-2026-74727","aliases":["CVE-2026-74727"],"related":[],"kind":"vulnerability","state":"published","title":"ovpn: skip rehash for peers already removed from by_id","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\novpn: skip rehash for peers already removed from by_id\n\novpn_nl_peer_set_doit() resolves the target peer via\novpn_peer_get_by_id() before taking ovpn->lock. In the window between\nthe lookup (which only takes a refcount) and the subsequent\nspin_lock_bh(&ovpn->lock), a concurrent OVPN_CMD_PEER_DEL, keepalive\nexpiry, or socket teardown can take ovpn->lock first, run\novpn_peer_remove() to unhash the peer from all four tables (by_id,\nby_vpn_addr4/6, by_transp_addr) and release the lock. set_doit then\nacquires ovpn->lock and calls ovpn_peer_hash_vpn_ip(), which\nre-inserts the now-removed peer back into the rehashing tables.\n\nThe same race affects the float path: ovpn_peer_endpoints_update()\nholds only a refcount and acquires ovpn->lock very late (after async\nAEAD decrypt and a netlink notification), then rehashes the peer\nin the by_transp_addr table.\n\nThe resurrected peer becomes reachable again from the RX lookup\n(ovpn_peer_get_by_transp_addr) and the TX VPN-IP lookup, even though\nuserspace believes it is gone. Once the data-path refcount drops the\npeer is freed via call_rcu while the hash entries embedded in it\nremain linked, opening a UAF window.\n\nBail out of the rehash when hash_entry_id is unhashed, mirroring\nthe sentinel already used by ovpn_peer_remove() to detect the\nalready-removed state. The check is safe under ovpn->lock, which\nserializes every mutation of hash_entry_id, and is a no-op for the\nadd path because ovpn_peer_add_mp() inserts hash_entry_id before\ncalling ovpn_peer_hash_vpn_ip().","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\novpn: skip rehash for peers already removed from by_id\n\novpn_nl_peer_set_doit() resolves the target peer via\novpn_peer_get_by_id() before taking ovpn->lock. In the window between\nthe lookup (which only takes a refcount) and the subsequent\nspin_lock_bh(&ovpn->lock), a concurrent OVPN_CMD_PEER_DEL, keepalive\nexpiry, or socket teardown can take ovpn->lock first, run\novpn_peer_remove() to unhash the peer from all four tables (by_id,\nby_vpn_addr4/6, by_transp_addr) and release the lock. set_doit then\nacquires ovpn->lock and calls ovpn_peer_hash_vpn_ip(), which\nre-inserts the now-removed peer back into the rehashing tables.\n\nThe same race affects the float path: ovpn_peer_endpoints_update()\nholds only a refcount and acquires ovpn->lock very late (after async\nAEAD decrypt and a netlink notification), then rehashes the peer\nin the by_transp_addr table.\n\nThe resurrected peer becomes reachable again from the RX lookup\n(ovpn_peer_get_by_transp_addr) and the TX VPN-IP lookup, even though\nuserspace believes it is gone. Once the data-path refcount drops the\npeer is freed via call_rcu while the hash entries embedded in it\nremain linked, opening a UAF window.\n\nBail out of the rehash when hash_entry_id is unhashed, mirroring\nthe sentinel already used by ovpn_peer_remove() to detect the\nalready-removed state. The check is safe under ovpn->lock, which\nserializes every mutation of hash_entry_id, and is a no-op for the\nadd path because ovpn_peer_add_mp() inserts hash_entry_id before\ncalling ovpn_peer_hash_vpn_ip().","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta:\n\novpn: omitir el rehash para pares ya eliminados de by_id\n\novpn_nl_peer_set_doit() resuelve el par objetivo a través de ovpn_peer_get_by_id() antes de tomar ovpn -> lock. En la ventana entre la búsqueda (que solo toma un refcount) y el subsiguiente spin_lock_bh(&ovpn -> lock), un OVPN_CMD_PEER_DEL concurrente, la expiración de un keepalive o el cierre de un socket pueden tomar ovpn -> lock primero, ejecutar ovpn_peer_remove() para deshashear el par de las cuatro tablas (by_id, by_vpn_addr4/6, by_transp_addr) y liberar el bloqueo. set_doit luego adquiere ovpn -> lock y llama a ovpn_peer_hash_vpn_ip(), lo que reinserta el par ahora eliminado de nuevo en las tablas de rehashing.\n\nLa misma condición de carrera afecta la ruta flotante: ovpn_peer_endpoints_update() solo mantiene un refcount y adquiere ovpn -> lock muy tarde (después de un descifrado AEAD asíncrono y una notificación netlink), luego rehashea el par en la tabla by_transp_addr.\n\nEl par resucitado vuelve a ser accesible desde la búsqueda RX (ovpn_peer_get_by_transp_addr) y la búsqueda TX VPN-IP, aunque el userspace cree que ha desaparecido. Una vez que el refcount de la ruta de datos disminuye, el par es liberado a través de call_rcu mientras que las entradas de hash incrustadas en él permanecen vinculadas, abriendo una ventana UAF.\n\nSalir del rehash cuando hash_entry_id es deshasheado, reflejando el centinela ya utilizado por ovpn_peer_remove() para detectar el estado ya eliminado. La verificación es segura bajo ovpn -> lock, que serializa cada mutación de hash_entry_id, y es una operación nula para la ruta de adición porque ovpn_peer_add_mp() inserta hash_entry_id antes de llamar a ovpn_peer_hash_vpn_ip().","source":"nvd"}],"published":"2026-08-22T15:33:17.773Z","modified":"2026-10-14T13:10:00.187Z","severity":{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},"severities":[{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"}],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"1d36a36f6d5347360ef9681a05f6166683bafd1d","fixed":"d20c181088984b6eaa8d7fe7cb5ab3510988df59","status":"affected"},{"type":"git","introduced":"1d36a36f6d5347360ef9681a05f6166683bafd1d","fixed":"66745480298775f188b2f5ad266643e85a90f73b","status":"affected"},{"type":"git","introduced":"1d36a36f6d5347360ef9681a05f6166683bafd1d","fixed":"33ec10567fe14456063daf549fdf1a4f53448e4c","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"6.16","status":"affected"},{"type":"semver","introduced":"0","fixed":"6.16","status":"unaffected"},{"type":"semver","introduced":"6.18.45","lastAffected":"6.18.*","status":"unaffected"},{"type":"semver","introduced":"7.1.9","lastAffected":"7.1.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"7.2","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"}],"references":[{"url":"https://git.kernel.org/stable/c/d20c181088984b6eaa8d7fe7cb5ab3510988df59","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/66745480298775f188b2f5ad266643e85a90f73b","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/33ec10567fe14456063daf549fdf1a4f53448e4c","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-74727","url":"https://www.cve.org/CVERecord?id=CVE-2026-74727","licence":"CVE Terms of Use","modified":"2026-08-25T05:42:08.380Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-74727","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-74727","licence":"Public domain","modified":"2026-10-14T13:10:00.187Z"}],"updatedAt":"2026-11-25T22:59:34.954Z","epss":{"score":0.00442,"percentile":0.40199,"date":"2026-12-01T12:00:22.000Z"}}