-
Notifications
You must be signed in to change notification settings - Fork 528
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
Do not lookup IP addresses of X509 certificate subject CNs #1967
Do not lookup IP addresses of X509 certificate subject CNs #1967
Conversation
A true-vs-false `nodns` parameter value bug in a recent commit 22b2a7a caused, in some environments, significant startup delays and/or runtime stalls because getaddrinfo(3) performed blocking DNS lookups when parsing common names of X509 certificate subjects. Squid parses CNs when loading configured and validating received certificates. Other side effects may have included Squid-generated certificates having wrong alternative subject names and/or wrong certificate validation results. Negative names and context-disassociated boolean constants strike again! Fortunately, associated problematic Ip::Address::lookupHostIP() will be replaced when the existing Ip::Address::Parse() TODO is addressed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@eduard-bagdasaryan, thank you for discovering and triaging this bug! Please check whether this PR addresses the problems you could reproduce in your environment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, it fixed the problem with delays in my test.
A true-vs-false `nodns` parameter value bug in a recent commit 22b2a7a caused, in some environments, significant startup delays and/or runtime stalls because getaddrinfo(3) performed blocking DNS lookups when parsing common names of X509 certificate subjects. Squid parses CNs when loading configured and validating received certificates. Other side effects may have included Squid-generated certificates having wrong alternative subject names and/or wrong certificate validation results. Negative names and context-disassociated boolean constants strike again! Fortunately, associated problematic Ip::Address::lookupHostIP() will be replaced when the existing Ip::Address::Parse() TODO is addressed.
A true-vs-false `nodns` parameter value bug in a recent commit 22b2a7a caused, in some environments, significant startup delays and/or runtime stalls because getaddrinfo(3) performed blocking DNS lookups when parsing common names of X509 certificate subjects. Squid parses CNs when loading configured and validating received certificates. Other side effects may have included Squid-generated certificates having wrong alternative subject names and/or wrong certificate validation results. Negative names and context-disassociated boolean constants strike again! Fortunately, associated problematic Ip::Address::lookupHostIP() will be replaced when the existing Ip::Address::Parse() TODO is addressed.
A true-vs-false
nodns
parameter value bug in a recent commit 22b2a7acaused, in some environments, significant startup delays and/or runtime
stalls because getaddrinfo(3) performed blocking DNS lookups when
parsing common names of X509 certificate subjects. Squid parses CNs when
loading configured and validating received certificates. Other side
effects may have included Squid-generated certificates having wrong
alternative subject names and/or wrong certificate validation results.
Negative names and context-disassociated boolean constants strike again!
Fortunately, associated problematic Ip::Address::lookupHostIP() will be
replaced when the existing Ip::Address::Parse() TODO is addressed.