aboutsummaryrefslogtreecommitdiff
path: root/VERSION
diff options
context:
space:
mode:
authorJason7602 <jansonzhe@gmail.com>2021-09-14 21:38:19 +0800
committerKatie Hockman <katie@golang.org>2021-11-03 16:57:44 +0000
commitb212ba68296b503b395e7d1838ca72a19030a6bf (patch)
tree361afd88e2c109b4789d3a061c3b4c916d882b32 /VERSION
parentf9cb33c7c9d48fd0c38d17a659d5e968de648d40 (diff)
downloadgo-b212ba68296b503b395e7d1838ca72a19030a6bf.tar.gz
go-b212ba68296b503b395e7d1838ca72a19030a6bf.zip
[release-branch.go1.17] archive/zip: don't panic on (*Reader).Open
Previously, opening a zip with (*Reader).Open could result in a panic if the zip contained a file whose name was exclusively made up of slash characters or ".." path elements. Open could also panic if passed the empty string directly as an argument. Now, any files in the zip whose name could not be made valid for fs.FS.Open will be skipped, and no longer added to the fs.FS file list, although they are still accessible through (*Reader).File. Note that it was already the case that a file could be accessible from (*Reader).Open with a name different from the one in (*Reader).File, as the former is the cleaned name, while the latter is the original one. Finally, made the actual panic site robust as a defense-in-depth measure. Fixes CVE-2021-41772 Fixes #48252 Updates #48085 Co-authored-by: Filippo Valsorda <filippo@golang.org> Change-Id: I6271a3f2892e7746f52e213b8eba9a1bba974678 Reviewed-on: https://go-review.googlesource.com/c/go/+/349770 Run-TryBot: Filippo Valsorda <filippo@golang.org> Reviewed-by: Katie Hockman <katie@golang.org> Reviewed-by: Filippo Valsorda <filippo@golang.org> Trust: Katie Hockman <katie@golang.org> Trust: Julie Qiu <julie@golang.org> (cherry picked from commit b24687394b55a93449e2be4e6892ead58ea9a10f) Reviewed-on: https://go-review.googlesource.com/c/go/+/360859 Trust: Dmitri Shuralyov <dmitshur@golang.org> Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org> TryBot-Result: Go Bot <gobot@golang.org>
Diffstat (limited to 'VERSION')
0 files changed, 0 insertions, 0 deletions