Descrizione
A race condition vulnerability was discovered in how signals are handled by OpenSSH's server (sshd). If a remote attacker does not authenticate within a set time period, then sshd's SIGALRM handler is called asynchronously. However, this signal handler calls various functions that are not async-signal-safe, for example, syslog(). As a consequence of a successful attack, in the worst case scenario, an attacker may be able to perform a remote code execution (RCE) as an unprivileged user running the sshd server.
Tipo di vulnerabilità
CWE-364
Signal Handler Race Condition
The product uses a signal handler that introduces a race condition.
Impatto sui sistemi
| Ambito | Impatto |
| Integrità, Riservatezza, Disponibilità |
Modificare i dati dell’applicazione, Modificare la memoria, Interruzione del servizio: arresto o riavvio, Eseguire codice o comandi non autorizzati |
| Controllo degli accessi |
Ottenere privilegi o assumere un’altra identità |
Come si previene
Requisiti · Scelta del linguaggio
Use a language that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid.
Architettura e progettazione
Design signal handlers to only set flags, rather than perform complex functionality. These flags can then be checked and acted upon within the main program loop.
Sviluppo
Only use reentrant functions within signal handlers. Also, use validation to ensure that state is consistent while performing asynchronous actions that affect the state of execution.
Tutte le 9 CVE di tipo CWE-364, con andamento e prevenzione