-
Notifications
You must be signed in to change notification settings - Fork 33
Bug 1924532: Update gogo/protobuf to v1.3.2 #161
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
Conversation
gogo/protobuf@v1.3.2 fixes https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-3121 Ref: https://issues.redhat.com/browse/OCPBUGSM-24279 Signed-off-by: Emilien Macchi <emilien@redhat.com>
|
@EmilienM: This pull request references Bugzilla bug 1924532, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker. 3 validation(s) were run on this bug
DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
/lgtm |
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: iamemilio The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/hold This is hopefully just precautionary as I'm honestly not sure what I'm looking at here. However, I have 2 concerns about this patch:
Presumably (2) is just transitive updates from gogo/protobuf, but I'd like to convince myself of that. The first one seems problematic, though. |
| return "", "", fmt.Errorf(`\%c%s is not a valid Unicode code point`, r, ss) | ||
| } | ||
| return string(i), s, nil | ||
| return string(rune(i)), s, nil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't seem to be the actual CVE fix: gogo/protobuf@b03c65e
Going to try to work out what's going on here, as the explicit request was to bump to v1.3.2, which you've done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
go mod vendor performs some treeshaking on a subpackage-basis.
The fix you linked refers to the file plugin/unmarshal/unmarshal.go which is not present in the vendor/github.com/gogo/protobuf folder. This means that the fix applies to some code that is not used in CAPO
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bumping the dependency prevents any further code change to introduce the vulnerable version of the affected plugin/unmarshal subpackage; however it can be deferred to 4.8 at this point.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What seems to be going on here is that the vendor copy doesn't contain the plugin/unmarshal/unmarshal.go at all, so doesn't contain the CVE fix. This discussion seems relevant: golang/go#26366 (comment) . If I'm reading that correctly, the go mod vendor is only pulling in files from the target which are actually used to build. If that's the case then presumably:
- This patch is correctly updating the module version to 1.3.2
- It turns out it's not critical as we're not touching the CVE code anyway
|
This patch correctly bumps gogo/protobuf to v1.3.2. HOWEVER, because the CVE is in a code generator, this isn't how this problem needs to be addressed. We need to address the problem in every package which we vendor which generates code with protobuf. As per my original supposition that seems to be almost everything. Grepping for instances of generated vulnerable code reveals 51 instances: |
mandre
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs a backport of kubernetes/kubernetes#98477 to release-1.20 and bumping the affected k8s modules.
|
Issues go stale after 90d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle stale |
|
@EmilienM: PR needs rebase. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
@EmilienM: This pull request references Bugzilla bug 1924532. The bug has been updated to no longer refer to the pull request using the external bug tracker. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
This moves the OS_CLOUD data to a ConfigMap and then references that in the environment of the controller, instead of injecting OS_CLOUD directly into the environment variables. This fixes openshift#161.
gogo/protobuf@v1.3.2 fixes https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-3121
Ref: https://issues.redhat.com/browse/OCPBUGSM-24279