Falhas do tipo CWE-662

17 resultados

Sincronização inadequada entre threads

É quando múltiplas threads acessam e modificam dados compartilhados sem mecanismos de proteção (locks, mutexes, etc.), causando race conditions. Dois threads podem ler/escrever no mesmo recurso simultaneamente, levando a estados inconsistentes, corrupção de dados ou comportamento imprevisto.

Exemplo

Duas requisições simultâneas acessam um contador global sem lock: thread A lê valor 5, thread B lê valor 5, A incrementa para 6, B incrementa para 6 — ambas escrevem 6 em vez de 7. O resultado final fica incorreto e imprevisível.

Como mitigar

Use primitivas de sincronização apropriadas (mutex, semáforo, monitores) para proteger seções críticas. Em linguagens modernas, prefira estruturas thread-safe (concurrent collections) ou padrões de imutabilidade. Realize testes com múltiplas threads e ferramentas de detecção de race conditions (ThreadSanitizer, Helgrind).

CVE-2024-7409HIGHQemu: denial of service via improper synchronization in qemu nbd server during socket closureEPSS 1.0%CVE-2024-32644CRITICALEvmos' transaction execution not accounting for all state transition after interaction with precompilesEPSS 0.9%CVE-2026-39865MEDIUMAxios HTTP/2 Session Cleanup State Corruption VulnerabilityEPSS 0.7%CVE-2025-27104LOWdouble eval in For List Iter in VyperEPSS 0.4%CVE-2026-28789HIGHOliveTin: Unauthenticated DoS via concurrent map writes in OAuth2 state handlingEPSS 0.4%CVE-2026-13489LOW78 xiaozhi-esp32 MCP Response mcp_server.cc ParseMessage improper synchronizationEPSS 0.2%CVE-2022-32643MEDIUMIn ccd, there is a possible use after free due to a race condition. This could lead to local escalation of privilege with System execution pEPSS 0.2%CVE-2025-22853LOWImproper synchronization in the firmware for some Intel(R) TDX may allow a privileged user to potentially enable escalation of privilege viaEPSS 0.1%CVE-2022-32642MEDIUMIn ccd, there is a possible memory corruption due to a race condition. This could lead to local escalation of privilege with System executioEPSS 0.1%CVE-2022-32610MEDIUMIn vcu, there is a possible use after free due to a race condition. This could lead to local escalation of privilege with System execution pEPSS 0.1%CVE-2022-32609MEDIUMIn vcu, there is a possible use after free due to a race condition. This could lead to local escalation of privilege with System execution pEPSS 0.1%CVE-2022-32644MEDIUMIn vow, there is a possible use after free due to a race condition. This could lead to local escalation of privilege with System execution pEPSS 0.1%CVE-2022-32648MEDIUMIn disp, there is a possible use after free due to a race condition. This could lead to local escalation of privilege with System execution EPSS 0.1%CVE-2023-20611MEDIUMIn gpu, there is a possible use after free due to a race condition. This could lead to local escalation of privilege with System execution pEPSS 0.1%CVE-2023-20610MEDIUMIn display drm, there is a possible memory corruption due to a race condition. This could lead to local escalation of privilege with System EPSS 0.1%CVE-2023-20607MEDIUMIn ccu, there is a possible memory corruption due to a race condition. This could lead to local escalation of privilege with System executioEPSS 0.1%CVE-2023-20625MEDIUMIn adsp, there is a possible double free due to a race condition. This could lead to local escalation of privilege with System execution priEPSS 0.1%