Navigation Menu

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

cmd/go: improper validation of cgo flags can lead to remote code execution at build time #42556

Closed
katiehockman opened this issue Nov 12, 2020 · 1 comment

Comments

@katiehockman
Copy link
Contributor

The go command may execute arbitrary code at build time when cgo is in use. This may occur when running go get on a malicious package, or any other command that builds untrusted code.

This can be caused by a malicious gcc flags specified via a #cgo directive.

Thanks to Imre Rad for reporting this issue.

This issue is CVE-2020-28367.

@katiehockman katiehockman added this to the Go1.16 milestone Nov 12, 2020
@katiehockman katiehockman changed the title cmd/go: improper validation of cgo flags can lead to remote code execution at build time [Go 1.14] cmd/go: improper validation of cgo flags can lead to remote code execution at build time Nov 12, 2020
@katiehockman
Copy link
Contributor Author

katiehockman commented Nov 12, 2020

Fixed by 062e0e5

Fixed by da7aa86 (https://golang.org/cl/267277)

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

2 participants