Fallos del tipo CWE-170

57 resultados

Terminação inadequada com nulo

Ocorre quando uma string ou buffer não é finalizado com o caractere nulo ('\0'), violando a convenção de strings em C/C++. Funções de manipulação de strings esperam encontrar esse terminador para saber onde a string acaba; sem ele, leem além dos limites da memória alocada, causando vazamento de dados ou corrupção.

Ejemplo

Um desenvolvedor copia dados para um buffer com strncpy() mas esquece de adicionar o nulo no final: char buf[10]; strncpy(buf, entrada, 10); — agora buf não é uma string válida, e strcmp() ou printf() vão ler memória aleatória até achar um nulo por acaso.

Cómo mitigar

Use sempre funções seguras (strlcpy, snprintf) que garantem o terminador nulo, ou adicione manualmente buf[tamanho_cópia] = '\0' após copiar dados. Em validação, sempre sanitize entrada garantindo que buffers destinados a strings sejam nulos-terminados antes de usá-los.

CVE-2024-31197MEDIUMImproper Null Termination in libfluid_msg libraryEPSS 0.3%CVE-2025-67790CRITICALAn issue was discovered in DriveLock 24.1 before 24.1.6, 24.2 before 24.2.7, and 25.1 before 25.1.5. An unprivileged user could cause occasiEPSS 0.3%CVE-2024-45288HIGHMultiple vulnerabilities in libnvEPSS 0.3%CVE-2026-24852MEDIUMiccDEV has a heap-buffer-overflow in icXmlParseTextString()EPSS 0.3%CVE-2026-33948LOWjq: Embedded-NUL Truncation in CLI JSON Input Path Causes Prefix-Only Validation of Malformed InputEPSS 0.3%CVE-2021-1120HIGHNVIDIA vGPU software contains a vulnerability in the Virtual GPU Manager (vGPU plugin), where a string provided by the guest OS may not be pEPSS 0.2%CVE-2026-32837MEDIUMmackron / miniaudio Out-of-Bounds Read in BEXT Coding History ParsingEPSS 0.2%CVE-2026-73324MEDIUMVLC media player 3.0.0 through 3.0.23 information disclosure vulnerabilityEPSS 0.2%CVE-2026-40334LOWlibgphoto2 missing null termination in ptp_unpack_Canon_FE() filename buffer in ptp-pack.cEPSS 0.2%CVE-2026-34462HIGHSandboxie-Plus ProcessServer boxname stack buffer overflows via unterminated wide string copyEPSS 0.2%CVE-2026-34464HIGHSandboxie-Plus NamedPipeServer OpenHandler stack overflow via unterminated server fieldEPSS 0.2%CVE-2025-66220MEDIUMEnvoy’s TLS certificate matcher for `match_typed_subject_alt_names` may incorrectly treat certificates containing an embedded null byteEPSS 0.2%CVE-2026-23749LOWGolioth Firmware SDK < 0.22.0 Blockwise Transfer Path Out-of-Bounds ReadEPSS 0.2%CVE-2026-27692HIGHiccDEV has HBO in CIccTagTextDescription::Release()EPSS 0.2%CVE-2026-21488MEDIUMiccDEV has Out-of-bounds Read, Heap-based Buffer Overflow and Improper Null TerminationEPSS 0.1%CVE-2026-12386LOWBuffer Overflow in TUBITAK BILGEM's Pardus PenEPSS 0.1%CVE-2026-81882LOWradare2: Missing string termination causes heap out-of-bounds read in radare2 bplist parserEPSS