jpillora / jpillora/chisel

a large number of udp connections cause a deadloop of server

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

Nobody has claimed this yet.

Dominant language
Go
Stars
16.6k
Forks
1.6k
PR merge metrics
No merged PRs in 30d

Description

func (u *udpListener) runOutbound(ctx context.Context) error {
p := udpPacket{}
if err := uc.decode(&p); err == io.EOF {
//outbound ssh disconnected, get new connection...
continue

} else if err != nil {
return u.Errorf("decode error: %w", err)

if the client closes the udp ssh channel(not the ssh connection) due to error"open too many files", the server will fall into a dead loop whitch reads EOF repeatedly from the same outbound ssh and have no chance to get a new connection.

Contributor guide

No contributing guide indexed for this repository

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

Start in the udpListener.runOutbound function shown in the report and inspect how udpPacket decoding handles io.EOF on the outbound SSH channel. Reproduce or trace the client closing only the UDP SSH channel after an open-files error. Done means the server does not repeatedly read EOF from the same channel and can obtain a new connection.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
networking
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.