1. Archivio CVE
  2. 2015
  3. CVE-2015-8316

CVE-2015-8316

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

Descrizione

Array index error in LightDM (aka Light Display Manager) 1.14.3, 1.16.x before 1.16.6 when the XDMCP server is enabled allows remote attackers to cause a denial of service (process crash) via an XDMCP request packet with no address.

Prodotti coinvolti

FornitoreProdottoVersionePiattaforma
lightdm project lightdm 1.14.3 –
lightdm project lightdm 1.16 –
lightdm project lightdm 1.16.1 –
lightdm project lightdm 1.16.2 –
lightdm project lightdm 1.16.3 –
lightdm project lightdm 1.16.4 –

Tipo di vulnerabilità

CWE-129 Validazione impropria dell’indice di un array

Il prodotto usa un input non attendibile per calcolare o usare l’indice di un array, senza verificare che indichi una posizione valida.

Impatto sui sistemi

AmbitoImpatto
Integrità, Disponibilità Interruzione del servizio: arresto o riavvio
Integrità Modificare la memoria
Riservatezza, Integrità Modificare la memoria, Leggere la memoria
Integrità, Riservatezza, Disponibilità Eseguire codice o comandi non autorizzati
Integrità, Disponibilità, Riservatezza Interruzione del servizio: arresto o riavvio, Eseguire codice o comandi non autorizzati, Leggere la memoria, Modificare la memoria

Come si previene

Architettura e progettazione · Validazione dell’input Usa un framework di validazione dell’input come Struts o la Validation API di OWASP ESAPI. Un framework non risolve da solo tutti i problemi di validazione: attenzione agli errori che possono nascere da un suo uso scorretto (CWE-1173).
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. I controlli lato client restano comunque utili: aiutano a rilevare le intrusioni (se il server riceve un input che il client avrebbe dovuto rifiutare, può essere il segnale di un attacco), danno all’utente indicazioni utili sull’input atteso e riducono, seppure di poco, il lavoro del server per gli errori involontari.
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. For example, Ada allows the programmer to constrain the values of a variable and languages such as Java and Ruby will allow the programmer to handle exceptions when an out-of-bounds index is accessed.
Esercizio · Build e compilazione · Hardening dell’ambiente Run or compile the software using features or extensions that randomly arrange the positions of a program's executable and libraries in memory. Because this makes the addresses unpredictable, it can prevent an attacker from reliably jumping to exploitable code. Examples include Address Space Layout Randomization (ASLR) and Position-Independent Executables (PIE). Imported modules may be similarly realigned if their default memory addresses conflict with other modules, in a process known as rebasing (for Windows) and prelinking (for Linux) using randomly generated addresses. ASLR for libraries cannot be used in conjunction with prelink since it would require relocating the libraries at run-time, defeating the whole purpose of prelinking. For more information on these techniques see D3-SAOR (Segment Address Offset Randomization) from D3FEND.
Esercizio · Hardening dell’ambiente Use a CPU and operating system that offers Data Execution Protection (using hardware NX or XD bits) or the equivalent techniques that simulate this feature in software, such as PaX. These techniques ensure that any instruction executed is exclusively at a memory address that is part of the code segment. For more information on these techniques see D3-PSEP (Process Segment Execution Prevention) from D3FEND.
Sviluppo · Validazione dell’input Assume all input is malicious. Use an accept known good input validation strategy, i.e., use a list of acceptable inputs that strictly conform to specifications. Reject any input that does not strictly conform to specifications, or transform it into something that does. When performing input validation, consider all potentially relevant properties, including length, type of input, the full range of acceptable values, missing or extra inputs, syntax, consistency across related fields, and conformance to business rules. As an example of business rule logic, boat may be syntactically valid because it only contains alphanumeric characters, but it is not valid if the input is only expected to contain colors such as red or blue. Do not rely exclusively on looking for malicious or malformed inputs. This is likely to miss at least one undesirable input, especially if the code's environment changes. This can give attackers enough room to bypass the intended validation. However, denylists can be useful for detecting potential attacks or determining which inputs are so malformed that they should be rejected outright. When accessing a user-controlled array index, use a stringent range of values that are within the target array. Make sure that you do not allow negative values to be used. That is, verify the minimum as well as the maximum of the range of acceptable values.
Sviluppo Valida con particolare cura gli input quando richiami codice che attraversa il confine tra linguaggi diversi, per esempio da un linguaggio interpretato a codice nativo: possono nascere interazioni impreviste. Rispetta le aspettative del linguaggio con cui interagisci: per esempio Java non è esposto ai buffer overflow, ma passare un argomento molto grande a codice nativo può provocarne uno.
Architettura e progettazione · Esercizio · Hardening dell’ambiente Run your code using the lowest privileges that are required to accomplish the necessary tasks. If possible, create isolated accounts with limited privileges that are only used for a single task. That way, a successful attack will not immediately give the attacker access to the rest of the software or its environment. For example, database applications rarely need to run as the database administrator, especially in day-to-day operations.

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

Tutte le 671 CVE di tipo CWE-129, con andamento e prevenzione

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