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

go/internal/gcimporter: Import can OOM on corrupt/adversarial package #53787

Closed
rolandshoemaker opened this issue Jul 11, 2022 · 1 comment
Closed
Labels
FrozenDueToAge NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made.
Milestone

Comments

@rolandshoemaker
Copy link
Member

iImportData allocates buffers based on sizes read from the package file, which may not necessarily match the actual size of the package. If the package file is corrupted, or attacker controlled, this can trigger an OOM. The security team does not consider the second part of this a security issue, since attacks which require attacker control of the local filesystem are outside of our scope.

This is somewhat similar of an issue to #53369, and is perhaps another use case for something like the saferio work @ianlancetaylor is perusing (although in this case the overhead may be somewhat less reasonable, since consumed data here is much less likely to be attacker controlled, and is likely to only really address corrupted data.) It may also be reasonable to not do anything here.

Thanks to Qing Xu for reporting this.

@rolandshoemaker rolandshoemaker added the NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made. label Jul 11, 2022
@rolandshoemaker rolandshoemaker added this to the Backlog milestone Jul 11, 2022
@gopherbot
Copy link

Change https://go.dev/cl/416861 mentions this issue: go/internal/gcimporter: use saferio to read indexed data

@golang golang locked and limited conversation to collaborators Aug 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made.
Projects
None yet
Development

No branches or pull requests

2 participants