DynamoRIO / DynamoRIO/dynamorio

Instrumenting vsftpd cannot allocate memory by calling mmap.

Open
#3,423 7 comments 0 reactions 0 assignees View on GitHub
Bug-AppFail help wanted OpSys-UNIX
Dominant language
C
Stars
3.2k
Forks
629
Avg merge
2d 15h
Merged PRs (30d)
31

Description

I am instrumenting vsftpd with the inscount tool however this problem happens with all the tools as far as I tested.

When I run vsftpd standalone with drrun it lauches the server fine. From the ftp client I can succesfully use "ftp localhost" command. In FTP client, after entering the username I get error from the client side '500 OOPS: mmap' and login failed and remote server has closed the connection. The server however still is running fine and again I can try to connect it till the same point.

I found the mmap line in the source code that fails. It is at line 988 (vsftpd 3.0.3) in sysdeputil.c file. I checked the arguments during runtime with printing them and they seem ok to me. The length is also 12288 which is not very big. I checked the memory during the runtime and about 13GB of memory out of 16GB is free. I checked the error of mmap call and stderror says it is 'cannot allocate memory' error. Of course, vsftpd runs fine without using drrun.

I am using Ubuntu 18.04 with cpu corei7 and 16GB RAM.

The vsftpd version I think does not matter however I tested with 3.0.3, 3.0.2, and 3.0.0. I suggest you to use the latest to repeat the issue as for the other two I made a change in the configuration to make them work.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.