1. Archivio CVE
  2. 2026
  3. CVE-2026-79977

CVE-2026-79977

8.2 Gravità alta CVSS v3.1 · fonte NVD CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:H 8.2 – Alta

Descrizione

The WireGuard VPN service in subsys/net/lib/wireguard/wg.c updated the peer endpoint from a message it could not authenticate. In handle_transport_data(), when the 32-bit receiver index of an incoming transport-data message matched no session, the code both scheduled a new handshake and copied the datagram's source address into peer->endpoint with memcpy(&peer->endpoint, peer_addr, sizeof(peer->endpoint)). Because the receiver index is unknown, there is no key with which such a message could be verified, so the address written into peer->endpoint is entirely attacker-supplied. Every other endpoint update in the implementation happens only after authentication — after the Noise handshake in handle_handshake_init(), or after AEAD decryption plus the anti-replay check in wg_process_data_message(). The WireGuard listener is registered with net_udp_register() using no remote address or port filter and defaults to UDP port 51820 (CONFIG_WIREGUARD_PORT), and wg_ctrl_recv() resolves the peer by interface rather than by any cryptographic identity. Any host able to send a UDP datagram to that port can therefore reach the defect off-path, with no need to observe legitimate traffic: a 16-byte datagram carrying the transport-data type, zeroed reserved bytes and an arbitrary receiver index is sufficient. The vulnerable branch runs whenever the peer has neither a valid handshake nor a current keypair — the state at boot and after a session expires. A single spoofed datagram redirects peer->endpoint to an address of the attacker's choosing, and all subsequent handshake initiations, keepalives and encrypted data packets are sent there. The legitimate peer never receives the initiations and so never re-authenticates, and nothing resets the endpoint afterwards, leaving the tunnel persistently unusable on devices whose peer does not initiate handshakes itself. The attacker can also relay the redirected initiations to the real peer to place itself in the path of the tunnel, observing ciphertext and traffic metadata and selectively dropping packets. WireGuard's end-to-end cryptography still prevents decryption or forgery of tunnel content, so the impact is loss of availability plus limited confidentiality, not key compromise. The fix removes the endpoint learning from this path entirely: the stale-session recovery is kept, but the handshake is sent only to an endpoint learnt from an authenticated message, falling back to the configured cfg_endpoint, and the message is dropped when neither is known. CONFIG_WIREGUARD is marked experimental and is not enabled by default.

Prodotti coinvolti

FornitoreProdottoVersionePiattaforma
zephyrproject zephyr >= 4.4.0 < 4.5.0 –
Tutte le 398 vulnerabilità di Zephyrproject Zephyr

Tipo di vulnerabilità

CWE-306 Autenticazione mancante per una funzione critica

Il prodotto non richiede alcuna autenticazione per una funzione che dovrebbe essere riservata a utenti identificati o che consuma molte risorse.

Impatto sui sistemi

AmbitoImpatto
Controllo degli accessi, Altro Ottenere privilegi o assumere un’altra identità, Dipende dal contesto
Esporre una funzione critica significa di fatto dare all’attaccante il livello di privilegio di quella funzione. Le conseguenze dipendono dalla funzione: dalla lettura o modifica di dati sensibili all’accesso a funzioni amministrative o privilegiate, fino all’esecuzione di codice arbitrario.

Come si previene

Architettura e progettazione Dividi il software in aree anonime, normali, privilegiate e amministrative, individua quali richiedono un’identità verificata e usa un sistema di autenticazione centralizzato. Individua tutti i canali di comunicazione e le altre vie di interazione con il software e proteggili in modo adeguato, compresi quelli che si presume siano raggiungibili solo da soggetti autorizzati. A volte l’autenticazione è applicata sul canale principale ma non su un canale secondario ritenuto privato: per esempio un meccanismo di login in ascolto su una porta che, dopo l’accesso, apre una seconda porta senza autenticazione, dando per scontato che vi si colleghi solo chi si è già autenticato. In generale, se il software o il protocollo mantiene la sessione o lo stato dell’utente su più connessioni o canali, autenticazione e gestione delle credenziali vanno applicate a tutti.
Architettura e progettazione Per ogni controllo di sicurezza eseguito lato client, ripeti lo stesso controllo lato server, per evitare CWE-602: un attaccante può aggirare i controlli del client modificando i valori dopo il controllo o eliminando del tutto i controlli dal client, e inviare poi al server i valori modificati.
Architettura e progettazione Dove possibile, evita routine di autenticazione scritte in proprio e usa quelle offerte dal framework, dal sistema operativo o dall’ambiente: evitano gli errori tipici dell’autenticazione, supportano la registrazione e il tracciamento automatici e aiutano a separare chiaramente autenticazione e autorizzazione. Sul web il confine tra le due è a volte sfumato. Se servono routine di autenticazione personalizzate al posto di quelle del server, vanno applicate a ogni singola pagina, perché ogni pagina può essere richiesta direttamente.
Architettura e progettazione · Librerie o framework Usa una libreria o un framework collaudato che non permetta questo tipo di errore o che renda più facile evitarlo. Per esempio, valuta librerie con funzioni di autenticazione come OpenSSL o l’Authenticator di ESAPI.
Sviluppo · Configurazione del sistema · Esercizio Quando conservi dati nel cloud (bucket S3, blob di Azure, Google Cloud Storage e simili), usa i controlli del fornitore per richiedere un’autenticazione forte agli utenti autorizzati ad accedere ai dati.

Tutte le 3.438 CVE di tipo CWE-306, con andamento e prevenzione

Fonte: catalogo CWE del MITRE · cwe.mitre.org