Skip to content
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

Fix infinite loop for SSL connections - Closes #4314 #4321

Merged
merged 3 commits into from
Aug 15, 2023
Merged

Conversation

JavierJF
Copy link
Collaborator

@JavierJF JavierJF commented Aug 11, 2023

If a peer closes the socket under certain timing conditions, e.g. during connection establishment, an infinite loop will take place if POLLHUP and POLLIN are set in the socket, and no data is present, just the final EOF.

Fix details:

This was due to read_data_from_net only expecting POLLIN flag to be set in revents. The scenario were POLLHUP and POLLIN are both present is now covered by this PR.

If a peer closes the socket under certain timing conditions, e.g. during
connection establishment, an infinite loop will take place if 'POLLHUP'
and 'POLLIN' are set in the socket, and no data is present, just the
final 'EOF'.
- Fix regression test 'reg_test_3273_ssl_con-t' with more restrictive
  traffic control rules so they don't affect the whole interface.
- Fix measurement of CPU usage in two regression tests.
- Removed redundant part of check.
- Updated comment, elaborating on 'POLLHUP' omission in the check.
@JavierJF JavierJF merged commit 221596b into v2.x Aug 15, 2023
20 checks passed
@renecannao renecannao deleted the v2.x-4314 branch August 29, 2024 11:18
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.

1 participant