Fallos del tipo CWE-680

106 resultados

Transbordamento de inteiro causando transbordamento de buffer

Ocorre quando um cálculo de inteiro transborda (excede o limite do tipo), gerando um valor pequeno ou negativo que é depois usado como tamanho de alocação ou índice de buffer. O código acredita ter espaço suficiente, mas na verdade alocou pouco ou até nada, permitindo escrita fora dos limites da memória.

Ejemplo

Uma função recebe dois inteiros de 32 bits (tamanho + overhead) que, quando somados, causam overflow e resultam em um valor pequeno. A alocação malloc(tamanho + overhead) aloca poucos bytes, mas o código copia dados grandes para esse buffer, sobrescrevendo memória adjacente.

Cómo mitigar

Valide os operandos antes de operações aritméticas que alimentam alocações de memória; use tipos inteiros maiores (64-bit) quando apropriado; aplique testes de saturação (verificar se a soma/multiplicação ultrapassaria o máximo permitido) antes de usar o resultado em malloc, memcpy ou indexação de arrays.

CVE-2021-32765HIGHInteger Overflow to Buffer Overflow in HiredisEPSS 2.1%CVE-2026-55200CRITICALlibssh2 - Out-of-Bounds Write via Unchecked packet_length in transport.cEPSS 2.0%CVE-2021-21843HIGHMultiple exploitable integer overflow vulnerabilities exist within the MPEG-4 decoding functionality of the GPAC Project on Advanced ContentEPSS 2.0%CVE-2021-21838HIGHMultiple exploitable integer overflow vulnerabilities exist within the MPEG-4 decoding functionality of the GPAC Project on Advanced ContentEPSS 2.0%CVE-2021-21839HIGHMultiple exploitable integer overflow vulnerabilities exist within the MPEG-4 decoding functionality of the GPAC Project on Advanced ContentEPSS 2.0%CVE-2021-21845HIGHMultiple exploitable integer overflow vulnerabilities exist within the MPEG-4 decoding functionality of the GPAC Project on Advanced ContentEPSS 2.0%CVE-2021-21837HIGHMultiple exploitable integer overflow vulnerabilities exist within the MPEG-4 decoding functionality of the GPAC Project on Advanced ContentEPSS 2.0%CVE-2021-21846HIGHMultiple exploitable integer overflow vulnerabilities exist within the MPEG-4 decoding functionality of the GPAC Project on Advanced ContentEPSS 2.0%CVE-2021-21852HIGHMultiple exploitable integer overflow vulnerabilities exist within the MPEG-4 decoding functionality of the GPAC Project on Advanced ContentEPSS 2.0%CVE-2021-21847HIGHMultiple exploitable integer overflow vulnerabilities exist within the MPEG-4 decoding functionality of the GPAC Project on Advanced ContentEPSS 2.0%CVE-2021-21844HIGHMultiple exploitable integer overflow vulnerabilities exist within the MPEG-4 decoding functionality of the GPAC Project on Advanced ContentEPSS 2.0%CVE-2020-10929HIGHThis vulnerability allows network-adjacent attackers to execute arbitrary code on affected installations of NETGEAR R6700 V1.0.4.84_10.0.58 EPSS 1.9%CVE-2021-21841HIGHAn exploitable integer overflow vulnerability exists within the MPEG-4 decoding functionality of the GPAC Project on Advanced Content librarEPSS 1.7%CVE-2021-21851HIGHMultiple exploitable integer overflow vulnerabilities exist within the MPEG-4 decoding functionality of the GPAC Project on Advanced ContentEPSS 1.7%CVE-2021-21850HIGHAn exploitable integer overflow vulnerability exists within the MPEG-4 decoding functionality of the GPAC Project on Advanced Content librarEPSS 1.7%CVE-2021-21849HIGHAn exploitable integer overflow vulnerability exists within the MPEG-4 decoding functionality of the GPAC Project on Advanced Content librarEPSS 1.7%CVE-2021-21834HIGHAn exploitable integer overflow vulnerability exists within the MPEG-4 decoding functionality of the GPAC Project on Advanced Content librarEPSS 1.7%CVE-2021-21858HIGHMultiple exploitable integer overflow vulnerabilities exist within the MPEG-4 decoding functionality of the GPAC Project on Advanced ContentEPSS 1.7%CVE-2021-21848HIGHAn exploitable integer overflow vulnerability exists within the MPEG-4 decoding functionality of the GPAC Project on Advanced Content librarEPSS 1.7%CVE-2021-21840HIGHAn exploitable integer overflow vulnerability exists within the MPEG-4 decoding functionality of the GPAC Project on Advanced Content librarEPSS 1.7%