OpenVPN / OpenVPN/openvpn

Infinite sendto loop

Open
#1,048 15 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

moreinformationneeded
Dominant language
C
Stars
14.6k
Forks
3.4k
PR merge metrics
No merged PRs in 30d

Description

Describe the bug
Infinite sendto loop (200000 sendto in 3 sec)
OpenVPN is maxing out the CPU and causing a packet storm

To Reproduce
I do not know

Version information (please complete the following information):

  • OS: Ubuntu 24.04 HWE

  • OpenVPN version:

    OpenVPN 2.7.4 x86_64-pc-linux-gnu [SSL (OpenSSL)] [COMP_STUB] [EPOLL] [MH/PKTINFO] [AEAD] [DCO]
    library versions: OpenSSL 3.0.13 30 Jan 2024
    DCO version: 6.17.0-35-generic #35~24.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue May 26 19:30:42 UTC 2
    

Additional context

strace -p 595 -c
strace: Process 595 attached

^Cstrace: Process 595 detached
% time seconds usecs/call calls errors syscall


71.84 3.137579 13 224467 sendto
28.16 1.229945 5 224467 poll
0.00 0.000007 7 1 getpid


100.00 4.367531 9 448935 total

root@ratty-magenta:~# sudo strace -p 595
strace: Process 595 attached
poll([{fd=6, events=POLLOUT}, {fd=5, events=POLLIN|POLLPRI}, {fd=3, events=POLLIN|POLLPRI}], 3, 0) = 2 ([{fd=6, revents=POLLOUT}, {fd=5, re vents=POLLIN|POLLERR}])
sendto(6, " +?\331\0316\252Y\271\4\0\0\0\10\0\0\0\7\0\0\0\f\0\0\0\v\370\263(\230{\206"..., 1222, 0, {sa_family=AF_INET, sin_port=htons(3467 8), sin_addr=inet_addr("46.31.30.53")}, 16) = 1222
poll([{fd=6, events=POLLOUT}, {fd=5, events=POLLIN|POLLPRI}, {fd=3, events=POLLIN|POLLPRI}], 3, 0) = 2 ([{fd=6, revents=POLLOUT}, {fd=5, re vents=POLLIN|POLLERR}])
sendto(6, " +?\331\0316\252Y\271\4\0\0\0\10\0\0\0\7\0\0\0\f\0\0\0\v\370\263(\230{\206"..., 1222, 0, {sa_family=AF_INET, sin_port=htons(3467 8), sin_addr=inet_addr("46.31.30.53")}, 16) = 1222
poll([{fd=6, events=POLLOUT}, {fd=5, events=POLLIN|POLLPRI}, {fd=3, events=POLLIN|POLLPRI}], 3, 0) = 2 ([{fd=6, revents=POLLOUT}, {fd=5, re vents=POLLIN|POLLERR}])
sendto(6, " +?\331\0316\252Y\271\4\0\0\0\10\0\0\0\7\0\0\0\f\0\0\0\v\370\263(\230{\206"..., 1222, 0, {sa_family=AF_INET, sin_port=htons(3467 8), sin_addr=inet_addr("46.31.30.53")}, 16) = 1222
poll([{fd=6, events=POLLOUT}, {fd=5, events=POLLIN|POLLPRI}, {fd=3, events=POLLIN|POLLPRI}], 3, 0) = 2 ([{fd=6, revents=POLLOUT}, {fd=5, re vents=POLLIN|POLLERR}])
sendto(6, " +?\331\0316\252Y\271\4\0\0\0\10\0\0\0\7\0\0\0\f\0\0\0\v\370\263(\230{\206"..., 1222, 0, {sa_family=AF_INET, sin_port=htons(3467 8), sin_addr=inet_addr("46.31.30.53")}, 16) = 1222
poll([{fd=6, events=POLLOUT}, {fd=5, events=POLLIN|POLLPRI}, {fd=3, events=POLLIN|POLLPRI}], 3, 0) = 2 ([{fd=6, revents=POLLOUT}, {fd=5, re vents=POLLIN|POLLERR}])
sendto(6, " +?\331\0316\252Y\271\4\0\0\0\10\0\0\0\7\0\0\0\f\0\0\0\v\370\263(\230{\206"..., 1222, 0, {sa_family=AF_INET, sin_port=htons(3467 8), sin_addr=inet_addr("46.31.30.53")}, 16) = 1222
poll([{fd=6, events=POLLOUT}, {fd=5, events=POLLIN|POLLPRI}, {fd=3, events=POLLIN|POLLPRI}], 3, 0) = 2 ([{fd=6, revents=POLLOUT}, {fd=5, re vents=POLLIN|POLLERR}])

Contributor guide

Open the contributing guide

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.

Research direction

Begin with the supplied strace output and the reported OpenVPN 2.7.4 and Ubuntu 24.04 environment; no source file, test, or entry point is identified in the issue. Reproduce or isolate the POLLOUT/sendto behavior, then confirm that the repeated sendto loop and resulting packet storm no longer occur.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, linux, ubuntu
Domain
networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.