]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.13-security] net/http: synchronize "100 Continue" write and Handl...
authorRuss Cox <rsc@golang.org>
Mon, 13 Jul 2020 17:27:22 +0000 (13:27 -0400)
committerKatie Hockman <katiehockman@google.com>
Mon, 13 Jul 2020 20:57:52 +0000 (20:57 +0000)
commite434185ec16b3783629bcb364b9a350706df7c1e
tree1b2301bde05dd063c169b17d679000c7bf0b64c0
parent6be4a5eb4898c7b5e7557dda061cc09ba310698b
[release-branch.go1.13-security] net/http: synchronize "100 Continue" write and Handler writes

The expectContinueReader writes to the connection on the first
Request.Body read. Since a Handler might be doing a read in parallel or
before a write, expectContinueReader needs to synchronize with the
ResponseWriter, and abort if a response already went out.

The tests will land in a separate CL.

Fixes #34902
Fixes CVE-2020-15586

Change-Id: Icdd8dd539f45e8863762bd378194bb4741e875fc
Reviewed-on: https://team-review.git.corp.google.com/c/golang/go-private/+/793350
Reviewed-by: Filippo Valsorda <valsorda@google.com>
(cherry picked from commit b5e504f4a07c572744b228fa1b10e3989c4c44f3)
Reviewed-on: https://team-review.git.corp.google.com/c/golang/go-private/+/793499
src/net/http/server.go