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

crypto/tls: DialWithDialer performs racy copy if config.ServerName is not set #16134

Closed
lmb opened this issue Jun 21, 2016 · 1 comment
Closed
Milestone

Comments

@lmb
Copy link
Contributor

lmb commented Jun 21, 2016

tls.DialWithDialer copies the passed in tls.Config if Config.ServerName is not set, but does not exclude copying the unexported sync.Once: tls.go:138.

DialWithDialer should use something like cloneTLSClientConfig from net/http. Related to #15771, which proposes implementing a Clone method on Config, which would help here.

CC @GeoffreyPlouviez who found the bug originally.

@ianlancetaylor ianlancetaylor added this to the Go1.7 milestone Jun 21, 2016
@gopherbot
Copy link

CL https://golang.org/cl/24287 mentions this issue.

@golang golang locked and limited conversation to collaborators Jun 27, 2017
FiloSottile pushed a commit to FiloSottile/go that referenced this issue Oct 12, 2018
This fixes some 40 warnings from go vet.

Fixes golang#16134.

Change-Id: Ib9fcba275fe692f027a2a07b581c8cf503b11087
Reviewed-on: https://go-review.googlesource.com/24287
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
FiloSottile pushed a commit to FiloSottile/go that referenced this issue Oct 12, 2018
This fixes some 40 warnings from go vet.

Fixes golang#16134.

Change-Id: Ib9fcba275fe692f027a2a07b581c8cf503b11087
Reviewed-on: https://go-review.googlesource.com/24287
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants