Memory leak

Open
#100 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
c

Research direction

The report reproduces growing memory use in the SSH module with sustained connections, including on Debian and Windows. Start by reading the SSH module and connection handling paths, then reproduce the reported run while tracking memory over time. Done means identifying and fixing the leak and confirming memory use stays stable during a comparable long run; the issue names no source files or tests.

Written by the indexing model from the issue text.

Description

It use around 40MB at first
But after 4min it's 90M now.
160M after 9min

I'm using v0.7 on debian x64

It reproduced when using cl=20,CL=128,at=4,cd=50ms with 200 connections limit
or CL=256 with 400 connections limit.

tested it again with smaller CL and it's same

   PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND
   878 root      20   0   46000  42688   6276 R  36.0   9.1   0:46.86 ncrack
   878 root      20   0   53740  50428   6276 R  36.0  10.7   1:08.18 ncrack
   878 root      20   0   69744  66292   6276 R  40.0  14.1   2:17.70 ncrack

I'm using ssh module

Same for win
At start it's 30-40m and 15min after it's 90M now.
(ncrack --user root --save save -P pw.txt -m ssh:cl=20,CL=200,at=4,cd=50ms -p ssh -iL iplist/list.txt --connection-limit 400 --append-output -oN ooo)

Now cpu is ~15% but I remember in previous freeze #103 it's using 25% which is a full core.

It's using 186M@32min
289M@45min+ and still increasing

Dominant language
C
Stars
1.2k
Forks
275
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from nmap/ncrack

All issues in nmap/ncrack

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.