Skip to content

socket: handle short read of the magic #1613

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

wenjianhn
Copy link

nmap will reset the TCP connection without sending any data during port scanning. As a result, the bootstrap will fail.

This patch fixes the issue by ignore connections that have not send the whole magic before closing.

Closes #1612

@gangxie112
Copy link

@kiskra-nvidia Can you help have a look at this issue? We hit it recently. It seems that previous fix missed something.

nmap will reset the TCP connection without sending any data during
port scanning. As a result, the bootstrap will fail.

This patch fixes the issue by ignore connections that have not send
the whole magic before closing.

Closes NVIDIA#1612
@kiskra-nvidia
Copy link
Member

@gangxie112 Are you saying that this PR doesn't fully solve the issue for you? Do you have specific instructions on how to reproduce?

I'm a bit surprised that this triggers during the bootstrap for you, given that that stage should take just a few seconds. Are you running nmap in a loop or something?

@wenjianhn
Copy link
Author

@kiskra-nvidia we have verified that the PR does fix the issue.
cc @fishautumn

We reproduced the issue by

IP=10.0.0.7
nmap -sT $IP -p 40000-60000

Since the bootstrap takes only a few seconds, we don't hit the issue often.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[bug] bootstrap may fail when connection close before sending 8 bytes
3 participants