Falhas do tipo CWE-682

65 resultados

Cálculo incorreto ou lógica aritmética falha

O software realiza operações matemáticas ou lógicas com erros que resultam em valores incorretos, violando a semântica esperada. Isso inclui overflow, underflow, arredondamentos errados, precedência de operadores mal interpretada ou condições lógicas invertidas. O impacto varia: pode levar a contornos de segurança, alocações de memória indevidas, saltos de autenticação ou comportamentos inesperados em decisões críticas.

Exemplo

Um código calcula o tamanho de um buffer como (quantidade * tamanho_unitário) sem verificar overflow; com valores grandes, o resultado fica menor que o esperado e ocorre estouro de buffer. Outro caso: validação que usa >= quando deveria usar >, permitindo acesso um byte além do limite.

Como mitigar

Use bibliotecas de aritmética segura (como safe_math em Rust ou Apache Commons Lang em Java); revise cálculos críticos com testes de boundary (valores mínimos, máximos, zero); valide explicitamente resultados intermediários antes de usá-los em decisões ou alocações; aplique code review focado em operações matemáticas.

CVE-2023-35641HIGHInternet Connection Sharing (ICS) Remote Code Execution VulnerabilityEPSS 7.2%CVE-2020-0022HIGHIn reassemble_and_dispatch of packet_fragmenter.cc, there is possible out of bounds write due to an incorrect bounds calculation. This couldEPSS 5.4%CVE-2022-30600A flaw was found in moodle where logic used to count failed login attempts could result in the account lockout threshold being bypassed.EPSS 5.1%CVE-2021-45960HIGHIn Expat (aka libexpat) before 2.4.3, a left shift by 29 (or more) places in the storeAtts function in xmlparse.c can lead to realloc misbehEPSS 4.2%CVE-2023-2163CRITICALIncorrect Verifier Branch Pruning Logic Leads To Arbitrary Read/Write In Linux Kernel and Lateral Privilege EscalationEPSS 3.5%CVE-2022-23066CRITICALSolana rBPF - Incorrect Calculation in sdiv instructionEPSS 2.4%CVE-2021-31440HIGHThis vulnerability allows local attackers to escalate privileges on affected installations of Linux Kernel 5.11.15. An attacker must first oEPSS 1.8%CVE-2020-26240MEDIUMErroneous Proof of Work calculation in gethEPSS 1.6%CVE-2020-28393An unauthenticated remote attacker could create a permanent denial-of-service condition by sending specially crafted OSPF packets. SuccessfuEPSS 1.6%CVE-2022-31104MEDIUMMiscompilation of `i8x16.swizzle` and `select` with v128 inputs in WasmtimeEPSS 1.6%CVE-2020-26262HIGHLoopback bypass in CoturnEPSS 1.3%CVE-2023-35642MEDIUMInternet Connection Sharing (ICS) Denial of Service VulnerabilityEPSS 1.3%CVE-2020-26241MEDIUMShallow copy bug in gethEPSS 1.1%CVE-2022-23628MEDIUMArray literal misordering in github.com/open-policy-agent/opaEPSS 1.0%CVE-2022-23011On certain hardware BIG-IP platforms, in version 15.1.x before 15.1.4 and 14.1.x before 14.1.3, virtual servers may stop responding while prEPSS 0.9%CVE-2020-26265MEDIUMConsensus flaw during block processingEPSS 0.9%CVE-2022-23028On BIG-IP AFM version 16.x before 16.1.0, 15.1.x before 15.1.5, 14.1.x before 14.1.4.5, and all versions of 13.1.x, when global AFM SYN cookEPSS 0.9%CVE-2023-28431HIGHFrontier's modexp precompile is slow for even modulusEPSS 0.9%CVE-2022-31169MEDIUMCranelift vulnerable to miscompilation of constant values in division on AArch64EPSS 0.8%CVE-2021-41122MEDIUMBounds check missing for decimal args in VyperEPSS 0.8%