Fallos del tipo CWE-131

190 resultados

Cálculo Incorreto de Tamanho de Buffer

Ocorre quando o desenvolvedor calcula de forma errada o tamanho de memória necessária para um buffer, resultando em alocação insuficiente. Isso permite que dados escritos ultrapassem o limite do buffer, causando corrupção de memória, crash ou execução de código arbitrário.

Ejemplo

Um programa recebe uma string de tamanho desconhecido e aloca buffer com `malloc(strlen(input))` em vez de `malloc(strlen(input) + 1)`. O espaço para o terminador nulo é esquecido, e a cópia transborda o buffer adjacente.

Cómo mitigar

Use funções seguras como `snprintf()` ou `strncpy()` que aceitam o tamanho máximo como parâmetro. Ao calcular tamanho, sempre considere: comprimento real dos dados + espaço para terminadores + padding necessário. Automatize com ferramentas estáticas (AddressSanitizer, Valgrind) em testes para detectar transbordamentos.

CVE-2025-57807LOWImageMagick BlobStream Forward-Seek Under-AllocationEPSS 0.3%CVE-2021-4155—A data leak flaw was found in the way XFS_IOC_ALLOCSP IOCTL in the XFS filesystem allowed for size increase of files with unaligned size. A EPSS 0.3%CVE-2026-10701HIGHIncorrect boundary conditions in the Graphics: Text componentEPSS 0.3%CVE-2026-67549HIGHOpenImageIO: TIFF 1-bit CMYK bit conversion heap out-of-bounds writeEPSS 0.3%CVE-2026-41676HIGHrust-openssl: Deriver::derive and PkeyCtxRef::derive can overflow short buffers on OpenSSL 1.1.1EPSS 0.3%CVE-2026-22791MEDIUMopenCryptoki incorrectly calculates the buffer size in C_WrapKey with CKM_ECDH_AES_KEY_WRAPEPSS 0.3%CVE-2025-33124MEDIUMFixes to common vulnerabilities found in IBM Db2 Merge Backup for Linux, UNIX and WindowsEPSS 0.3%CVE-2026-104424MEDIUMZebra before 6.1.0 Incorrect Block Size Calculation in getblocktemplateEPSS 0.3%CVE-2026-33986HIGHFreeRDP: H.264 YUV Buffer Dimension Desync - Heap OOB WriteEPSS 0.3%CVE-2025-33216MEDIUMNVIDIA SNAP-4 Container contains a vulnerability in the configuration interface where an attacker on a VM may cause an incorrect calculationEPSS 0.3%CVE-2026-91962MEDIUMFreeRDP before 3.31.0 Integer Overflow via audin Apple backendsEPSS 0.3%CVE-2020-37287HIGHVyper before 0.2.6 Call Stack Corruption via Complex Type Function ArgumentsEPSS 0.3%CVE-2021-29529LOWHeap buffer overflow caused by roundingEPSS 0.3%CVE-2026-102505MEDIUMImager versions before 1.037 for Perl overflow a heap buffer fetching float samples from a paletted image in i_gsampf_fpEPSS 0.2%CVE-2021-29608MEDIUMHeap OOB and null pointer dereference in `RaggedTensorToTensor`EPSS 0.2%CVE-2022-32617MEDIUMIn typec, there is a possible out of bounds write due to an incorrect calculation of buffer size. This could lead to local escalation of priEPSS 0.2%CVE-2024-39808MEDIUMIncorrect Calculation of Buffer Size (CWE-131) in the Controller 6000 and Controller 7000 OSDP message handling, allows an attacker with phyEPSS 0.2%CVE-2022-32618MEDIUMIn typec, there is a possible out of bounds write due to an incorrect calculation of buffer size. This could lead to local escalation of priEPSS 0.2%CVE-2026-8357MEDIUMHeap buffer overflow in Calc formula compilationEPSS 0.2%CVE-2026-33985MEDIUMFreeRDP: ClearCodec Glyph Cache Count Desync - Heap OOB ReadEPSS 0.2%