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: arbitrary code can be injected into cgo generated files [Go 1.15] #42561

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

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 malicious unquoted symbol names. This has been fixed by rejecting invalid symbols which may add a //go:cgo_ldflag directive to the generated file, and by ensuring that the go tool follows existing LDFLAG restrictions.

Thanks to Chris Brown and Tempus Ex for reporting this issue.

This issue is CVE-2020-28366.

@katiehockman katiehockman added Security CherryPickApproved Used during the release process for point releases labels Nov 12, 2020
@katiehockman katiehockman added this to the Go1.15.5 milestone Nov 12, 2020
@katiehockman
Copy link
Contributor Author

Github seems to have created a duplicate. Closing as duplicate of #42562

@katiehockman katiehockman removed this from the Go1.15.5 milestone Nov 12, 2020
@katiehockman katiehockman removed the CherryPickApproved Used during the release process for point releases label Nov 12, 2020
@golang golang locked and limited conversation to collaborators Nov 12, 2021
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