1. Archivio CVE
  2. 2017
  3. CVE-2017-17815

CVE-2017-17815

5.5 Gravità media CVSS v3.0 · fonte NVD CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H 5.5 – Media

Descrizione

In Netwide Assembler (NASM) 2.14rc0, there is an illegal address access in is_mmacro() in asm/preproc.c that will cause a remote denial of service attack, because of a missing check for the relationship between minimum and maximum parameter counts.

Prodotti coinvolti

FornitoreProdottoVersionePiattaforma
canonical ubuntu linux 14.04 –
nasm netwide assembler 2.14 rc0 –
Tutte le 75 vulnerabilità di Nasm Netwide Assembler

Tipo di vulnerabilità

CWE-754 Controllo improprio di condizioni anomale o eccezionali

Il prodotto non controlla, o controlla in modo errato, condizioni anomale che non dovrebbero presentarsi spesso durante il normale funzionamento.

Impatto sui sistemi

AmbitoImpatto
Integrità, Disponibilità Interruzione del servizio: arresto o riavvio, Stato imprevisto

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. Choose languages with features such as exception handling that force the programmer to anticipate unusual conditions that may generate exceptions. Custom exceptions may need to be developed to handle unusual business-logic conditions. Be careful not to pass sensitive exceptions back to the user (CWE-209, CWE-248).
Sviluppo Check the results of all functions that return a value and verify that the value is expected.
Sviluppo If using exception handling, catch and throw specific exceptions instead of overly-general exceptions (CWE-396, CWE-397). Catch and handle exceptions as locally as possible so that exceptions do not propagate too far up the call stack (CWE-705). Avoid unchecked or uncaught exceptions where feasible (CWE-248).
Sviluppo Ensure that error messages only contain minimal details that are useful to the intended audience and no one else. The messages need to strike the balance between being too cryptic (which can confuse users) or being too detailed (which may reveal more than intended). The messages should not reveal the methods that were used to determine the error. Attackers can use detailed information to refine or optimize their original attack, thereby increasing their chances of success. If errors must be captured in some detail, record them in log messages, but consider what could occur if the log messages can be viewed by attackers. Highly sensitive information such as passwords should never be saved to log files. Avoid inconsistent messaging that might accidentally tip off an attacker about internal state, such as whether a user account exists or not. Exposing additional information to a potential attacker in the context of an exceptional condition can help the attacker determine what attack vectors are most likely to succeed beyond DoS.
Sviluppo · Validazione dell’input Considera ogni input come potenzialmente malevolo. Adotta una validazione per «elenco di valori ammessi»: accetta solo gli input che rispettano rigorosamente le specifiche e rifiuta, o trasforma in qualcosa di conforme, tutto il resto. Nel validare considera tutte le proprietà rilevanti: lunghezza, tipo, intervallo dei valori ammessi, input mancanti o in più, sintassi, coerenza tra campi collegati e rispetto delle regole di business (per esempio «barca» è sintatticamente valido perché contiene solo lettere, ma non lo è se il campo deve contenere solo colori come rosso o blu). Non limitarti a cercare input malevoli o malformati: quasi certamente ne sfuggirà qualcuno, soprattutto se l’ambiente del codice cambia, lasciando all’attaccante lo spazio per aggirare la validazione. Le liste di valori vietati restano utili per rilevare possibili attacchi o scartare subito gli input più malformati.
Architettura e progettazione · Sviluppo If the program must fail, ensure that it fails gracefully (fails closed). There may be a temptation to simply let the program fail poorly in cases such as low memory conditions, but an attacker may be able to assert control before the software has fully exited. Alternately, an uncontrolled failure could cause cascading problems with other downstream components; for example, the program could send a signal to a downstream process so the process immediately knows that a problem has occurred and has a better chance of recovery.
Architettura e progettazione Use system limits, which should help to prevent resource exhaustion. However, the product should still handle low resource conditions since they may still occur.

Le indicazioni di mitigazione sono riportate nella lingua originale del catalogo CWE del MITRE.

Tutte le 645 CVE di tipo CWE-754, con andamento e prevenzione

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