Skip to content

Conversation

@bagder
Copy link
Member

@bagder bagder commented Oct 23, 2025

During TLS renegotiation, the schannel_recv_renegotiate() function is allowed to block for a short while. Reduce the maximum allowed time to block from 10 minutes down to 7 seconds.

During TLS renegotiation, the schannel_recv_renegotiate() function is
allowed to block for a short while. Reduce the maximum allowed time to
block from 10 minutes down to 7 seconds.
@bagder bagder added TLS Windows Windows-specific labels Oct 23, 2025
@bagder bagder marked this pull request as ready for review October 23, 2025 14:28
@jay
Copy link
Member

jay commented Oct 23, 2025

Renegotiation may take longer than that, but to be fair I chose a number (5 minutes) that just seemed reasonable. I don't have any metrics on what is or is not appropriate in these cases.

SCH_RENEG_CALLER_IS_SEND
};

#define MAX_REGEG_BLOCK_TIME (7 * 1000) /* 7 seconds in milliseconds */
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

REGEG/RENEG but IMO this is really a one line change where you could have set max_renegotiate_ms to 7 * 1000

@bagder
Copy link
Member Author

bagder commented Oct 23, 2025

Renegotiation may take longer than that

Sure, but that would be a very broken setup on extremely long latency and then I think it is better to fail.

this is really a one line change

Sure, but why not "clean up" while there.

@bagder
Copy link
Member Author

bagder commented Oct 24, 2025

I want to merge this and if it really turns into a problem I'm sure people will tell us and then we can adjust it up a little again.

@icing
Copy link
Contributor

icing commented Oct 24, 2025

https://en.wikipedia.org/wiki/7_Seconds_(song)

I'm fine with merging this.

Copy link
Member

@jay jay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

@bagder bagder closed this in 3e12ed9 Oct 25, 2025
@bagder bagder deleted the bagder/schannel-7seconds branch October 25, 2025 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

TLS Windows Windows-specific

Development

Successfully merging this pull request may close these issues.

3 participants