Falhas do tipo CWE-401

664 resultados

Fuga de memória - liberação não realizada após uso

Ocorre quando o código aloca memória (heap ou recursos) mas falha em liberá-la quando não é mais necessária. A memória fica presa no processo, reduzindo gradualmente a memória disponível até causar degradação de performance ou crash. É especialmente crítico em serviços que rodam indefinidamente (daemons, APIs, servidores).

Exemplo

Um servidor web que processa requisições sem liberar buffers de conexão fechada. Após milhares de requisições, acumula KB/MB de lixo na memória. Ou uma função que abre arquivo/socket e retorna sem chamar close() em todos os caminhos possíveis (incluindo exceções).

Como mitigar

Use padrões como RAII (Resource Acquisition Is Initialization) em C++, try-finally ou context managers em Python/Java, ou verificadores de vazamento (valgrind, AddressSanitizer). Revise especialmente blocos de exceção e retornos prematuros. Testes de longa duração ajudam a detectar fugas acumulativas.

CVE-2022-50404MEDIUMfbdev: fbcon: release buffer when fbcon_do_set_font() failedEPSS 0.2%CVE-2023-53017MEDIUMBluetooth: hci_sync: fix memory leak in hci_update_adv_data()EPSS 0.2%CVE-2022-50420MEDIUMcrypto: hisilicon/hpre - fix resource leak in remove processEPSS 0.2%CVE-2023-53271MEDIUMubi: Fix unreferenced object reported by kmemleak in ubi_resize_volume()EPSS 0.2%CVE-2023-53224MEDIUMext4: Fix function prototype mismatch for ext4_feat_ktypeEPSS 0.2%CVE-2023-53318MEDIUMrecordmcount: Fix memory leaks in the uwrite functionEPSS 0.2%CVE-2023-53234MEDIUMwatchdog: Fix kmemleak in watchdog_cdev_registerEPSS 0.2%CVE-2023-53422MEDIUMwifi: iwlwifi: fw: fix memory leak in debugfsEPSS 0.2%CVE-2022-50376MEDIUMorangefs: Fix kmemleak in orangefs_{kernel,client}_debug_init()EPSS 0.2%CVE-2022-50348MEDIUMnfsd: Fix a memory leak in an error handling pathEPSS 0.2%CVE-2022-50352MEDIUMnet: hns: fix possible memory leak in hnae_ae_register()EPSS 0.2%CVE-2023-53375MEDIUMtracing: Free error logs of tracing instancesEPSS 0.2%CVE-2022-50389MEDIUMtpm: tpm_crb: Add the missed acpi_put_table() to fix memory leakEPSS 0.2%CVE-2022-50395MEDIUMintegrity: Fix memory leakage in keyring allocation error pathEPSS 0.2%CVE-2023-53241MEDIUMnfsd: call op_release, even when op_func returns an errorEPSS 0.2%CVE-2022-50387MEDIUMnet: hinic: fix the issue of CMDQ memory leaksEPSS 0.2%CVE-2022-50342MEDIUMfloppy: Fix memory leak in do_floppy_init()EPSS 0.2%CVE-2023-53221MEDIUMbpf: Fix memleak due to fentry attach failureEPSS 0.2%CVE-2023-53230MEDIUMsmb: client: fix warning in cifs_smb3_do_mount()EPSS 0.2%CVE-2023-53279MEDIUMmisc: vmw_balloon: fix memory leak with using debugfs_lookup()EPSS 0.2%