esnet / esnet/iperf

crash with buffer overflow when more than 1024 files open

Open
#1,604 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
8.8k
Forks
1.5k
PR merge metrics
No merged PRs in 30d

Description

_NOTE: The iperf3 issue tracker is for registering bugs, enhancement
requests, or submissions of code. It is not a means for asking
questions about building or using iperf3. Those are best directed
towards the Discussions section for this project at
https://github.com/esnet/iperf/discussions
or to the iperf3 mailing list at iperf-dev@googlegroups.com.
A list of frequently-asked questions
regarding iperf3 can be found at http://software.es.net/iperf/faq.html._

# Context
iperf3 --version
iperf 3.16-beta1 (cJSON 1.7.15)
Linux xxx 6.2.0-36-generic #37~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Mon Oct 9 15:34:04 UTC 2 x86_64
Optional features available: CPU affinity setting, IPv6 flow label, SCTP, TCP congestion algorithm setting, sendfile / zerocopy, socket pacing, authentication, bind to device, support IPv4 don't fragment, POSIX threads

# Bug Report

* Expected Behavior
In a system with more than 1024 open files, iperf3 still works

* Actual Behavior
iperf3 crashes with "*** buffer overflow detected ***: terminated"

#9 0x00007fc37189f90c in iperf_connect (test=test@entry=0x559ba8cc0c10)
at iperf_client_api.c:431
431 FD_SET(test->ctrl_sck, &test->read_set);

* Steps to Reproduce
keep more than 1024 files open, run iperf3 as client

* Possible Solution
move from select() to poll() or something else that is not limited to a static FD_SETSIZE parameter

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.