-
Notifications
You must be signed in to change notification settings - Fork 32
Closed
Labels
Description
| Target version | Related issue | Related PR |
|---|---|---|
| 4.4.1 | wazuh/wazuh#16265 | wazuh/wazuh#16478 |
Description
This issue aims to test the fix to a Memory Leak related to VDT in version 4.4.0-1a The leak was detected that when disk errors are caused by some functions, like wm_vuldet_index_feed, the function would not complete and not free the memory that it is using, causing memory to build up until it crashes the wazuh-modulesd daemon.
The Issue was detected in the Stress tests pipeline, and is not easily reproduced manually.
Proposed checks
- Memory leaks in Vulnerability Detector after disk errors
Steps to reproduce
To reproduce the error, disk or database error must be forced, for this, the cve.db file will be installed to a folder in a custom partiton, so that SQL error: 'database or disk is full' error appears
- Create custom partiton
$ touch 2gbarea $ truncate -s 2Mb 2mbarea $ mke2fs -t ext4 -F 2mbarea $ mkdir /targetfolder $ sudo mount 2gbarea /targetfolder - Clone repository
- Modify the line that configures the location of
cve.dbto the configured folder - Install manager from sources
- Configure VDT with custom feeds for faster downloads.
- Stop wazuh-modulesd
- Execute Valgrind command
valgrind --track-fds=yes --show-leak-kinds=all --leak-check=full /var/ossec/bin/wazuh-modulesd -ddf
