Fallos del tipo CWE-193

129 resultados

Erro de índice por um (Off-by-One)

Ocorre quando a lógica de um loop ou acesso a array usa um índice incorreto — geralmente começando em 0 quando deveria começar em 1, ou iterando até N quando deveria parar em N-1. O resultado é acesso a posições inválidas de memória, leitura/escrita fora dos limites do buffer, ou skip de um elemento legítimo, criando brechas de segurança e crashes.

Ejemplo

Um loop que processa 10 elementos de um array mas itera de 0 a 10 (incluindo 10) tenta acessar posição 10 que não existe; ou um validador que checa strings até tamanho N mas esquece o caractere final, deixando dados não validados. Ataques exploram isso para corrupção de heap, escape de sandbox ou leitura de memória sensível.

Cómo mitigar

Use iteradores de linguagem de alto nível (for-each, ranges) que abstraem índices; ao usar índices explícitos, teste sempre com boundary values (tamanho-1, tamanho, tamanho+1); aplique assertions e sanitização rigorosa em loops críticos; prefira bibliotecas que fazem bounds-checking automático.

CVE-2026-63387HIGHLibevent: Off-by-one stack buffer overflow in dnsname_to_labels via crafted DNS server responseEPSS 0.4%CVE-2026-58014HIGHGlib: off-by-one error in glib/gkeyfile.c via "g_key_file_get_locale_string_list"EPSS 0.4%CVE-2026-5123MEDIUMosrg GoBGP bgp.go DecodeFromBytes off-by-oneEPSS 0.4%CVE-2026-41502HIGHBACnet Stack: Off-by-One Out-of-Bounds Read in ReadPropertyMultiple Object ID DecoderEPSS 0.4%CVE-2023-0818HIGHOff-by-one Error in gpac/gpacEPSS 0.4%CVE-2024-1441MEDIUMLibvirt: off-by-one error in udevlistinterfacesbystatus()EPSS 0.4%CVE-2025-54349MEDIUMIn iperf before 3.19.1, iperf_auth.c has an off-by-one error and resultant heap-based buffer overflow.EPSS 0.4%CVE-2026-46369HIGHNimiq: Validity store off by one errorEPSS 0.4%CVE-2024-51554HIGHoff-by-one-errorEPSS 0.4%CVE-2026-33997MEDIUMMoby: Off-by-one error in plugin privilege validationEPSS 0.4%CVE-2026-69609MEDIUMWin32k Information Disclosure VulnerabilityEPSS 0.4%CVE-2026-11771HIGHOpenVPN version 2.1.0 through 2.6.20 and 2.7_alpha1 through 2.7.4 allows attackers via an off-by-one buffer write in the NTLM proxy authentiEPSS 0.4%CVE-2024-57259HIGHsqfs_search_dir in Das U-Boot before 2025.01-rc1 exhibits an off-by-one error and resultant heap memory corruption for squashfs directory liEPSS 0.4%CVE-2024-48854MEDIUMVulnerabilities in TIFF and PCX Image Codecs Impact QNX Software Development PlatformEPSS 0.4%CVE-2026-26309MEDIUMEnvoy has an off-by-one write in JsonEscaper::escapeString()EPSS 0.4%CVE-2026-44603LOWTor before 0.4.9.7 has an out-of-bounds read by one byte via a malformed BEGIN cell, aka TROVE-2026-007.EPSS 0.3%CVE-2021-3930—An off-by-one error was found in the SCSI device emulation in QEMU. It could occur while processing MODE SELECT commands in mode_sense_page(EPSS 0.3%CVE-2026-45232LOWRsync < 3.4.3 Off-by-One Stack Write via HTTP ProxyEPSS 0.3%CVE-2026-55564MEDIUMFreeRDP: Out-of-bounds read in glyph_cache_get via crafted glyph fragmentsEPSS 0.3%CVE-2026-81738LOWOpenVPN 2.5.0 through 2.7.6 on Windows using the tap-windows6 driver allows attackers to trigger an out-of-bounds write via crafted DOMAIN-SEPSS 0.3%