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

archive/zip: Reader.Open panics on empty string [1.17 backport] #48252

Open
gopherbot opened this issue Sep 8, 2021 · 0 comments
Open

archive/zip: Reader.Open panics on empty string [1.17 backport] #48252

gopherbot opened this issue Sep 8, 2021 · 0 comments

Comments

@gopherbot
Copy link

@gopherbot gopherbot commented Sep 8, 2021

@FiloSottile requested issue #48085 to be considered for backport to the next 1.17 minor release.

Thank you for reporting this to security@golang.org. Invalid input should not cause programs to panic, if the input could be attacker controlled. If this required a call to Open("") to trigger, it could have been borderline, since it's hard for an attacker to control the argument to Open. However, the reproducer in #48085 (comment) triggers a panic with a real file name.

package main

import "archive/zip"

func main() {
	reader, err := zip.OpenReader("liquibase-core-4.4.3-sources.zip")
	if err != nil {
		panic(err)
	}

	reader.Open("META-INF/MANIFEST.MF")
}

We'll backport this as a security fix in the PUBLIC track. @gopherbot, please open backport issues.

@gopherbot gopherbot added this to the Go1.17.1 milestone Sep 8, 2021
@thanm thanm removed this from the Go1.17.1 milestone Sep 9, 2021
@thanm thanm added this to the Go1.17.2 milestone Sep 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants