-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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
x/vuln: invalid finding: if Frame.Function is set, Frame.Package must also be #66139
Comments
CC @golang/vulndb |
Thanks for reporting this. Yes, reproduction steps would be really helpful here. |
@zpavlinovic - yeah, I am trying to figure it out. I am wondering if it has something to do with generated code. The vuln it was trying to point out was protojson.Unmarshal. I tried to make a sample project with just that imported (but no generated proto code) and it worked just fine on 1.0.4. I'll try it again with actually generated protobuf types to see if something weird is happening there. |
The same error message started to appear on Forgejo on outdated branches: https://codeberg.org/forgejo/forgejo/actions/runs/7853/jobs/0
It is likely related to the protobuf vulnerability, since merging the default branch (which has updated the dependency) yields:
So the cryptic initial error message does likely points to a vulnerability (however it does not help into solving it). |
Looks like this function returning an empty string for the package which leads to the error:
The docs on
It looks like the package name isn't available for "synthetic functions". I'm assuming thats what these odd function names with $ in them are. The function which appears to be causing this in my case is in the connect rpc package.
https://github.com/connectrpc/connect-go/blob/75d634f2c4ebf49b4e604565d20bd42578c71f1c/client.go#L42 Also - If I remove the failing empty package name check, I actually get reasonable output. |
Thanks for looking into this and providing the details. I think the bug is in how we are handling instantiations of generic functions. I will try to make a fix soon. I believe this should do the trick:
|
@zpavlinovic No problem. Thanks for your hard work on this tool. Edit: In case it's helpful, output included below after updating
This now includes the package name. i.e. I also think it may be worth considering changing the empty package name check to be a warning rather than a hard error. This means the vuln codebase will be more robust to future changes in |
Change https://go.dev/cl/570575 mentions this issue: |
Change https://go.dev/cl/570616 mentions this issue: |
@xxgreg - thanks for tracking this down since I had not had time to come back and repro. Also big thanks to @zpavlinovic for being responsive as well with a changeset already up. I am going to bump forward again once this is fixed in 1.0.5 |
Updates golang/go#66139 Change-Id: I3a7eb8ea6a653802740f6ccb2b6449f929da6e67 Reviewed-on: https://go-review.googlesource.com/c/vuln/+/570575 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Maceo Thompson <maceothompson@google.com> Run-TryBot: Zvonimir Pavlinovic <zpavlinovic@google.com>
Do you plan to release 1.0.5 soon? |
Yes, but we don't have an exact timeline yet. There are a few more features we'd like to add before we make the release. |
Hi – I'm having a similar error msg from a project I've recently jumped on:
I've updated
I'm definitely not a Golang specialist, and it's not clear how to fix this issue. Should I update some other package? Or, is there something obvious I'm missing? Should I downgrade govulncheck to |
The latest tagged version of govulncheck is v1.0.4 and you should see the failure with this version. You should not see it with govulncheck@master. |
… also be set Per golang/go#66139 (comment) this can be removed when v1.0.5 is released.
* add govulncheck to the build * Fix golang.org/x/net vulnerability * x/vuln: invalid finding: if Frame.Function is set, Frame.Package must also be set Per golang/go#66139 (comment) this can be removed when v1.0.5 is released. * Ensure CI uses the env for all go-version setting --------- Co-authored-by: Paulo Janotti <pjanotti@splunk.com>
But why bundle features with a vital bug fix into a patch release and make everyone use an untagged version in the meantime? |
Is it really recommended to run |
* Add base unit tests for azure vms - More in-depth unit tests will need to come in the future when mocks are eventually added * Fix vm unit test * Temporary fix for golang/go#66139 * Temporary fix for golang/go#66139 * Update dependencies
@zpavlinovic any chance you could tag v1.0.5 with this fix, and then v1.1.0 with the new features in progress? |
We tagged the new version of govulncheck with v1.1.0.
We never recommend that. The point was that the fix is in and should be available at a more stable tag soon.
We were in the process of adding a larger set of features that required a slightly breaking change in JSON output. This issue got discovered and fixed in between. Ideally, we would bundle all this together to keep releases cleaner, but given that the issue seems to affect more people than initially projected, we are providing a new tag right now. See release notes for more info. |
@zpavlinovic sorry, what do you mean with "See release notes for more info"? I'm looking for these notes but I can't find them. golang/go doesn't seem to use GitHub Releases. |
* Add azure vm support (#441) * Add Azure as supported platform in app * Update CLI flags to denote supported platforms * Update flag modification logic to include azure and other non-aws services * Add base Azure plugin package * Add initial AZ VM plugin * Add Azure VM Support - Create new module for azure and virtual machine plugin * Update build configs * Upgrade dependencies - Main upgrade was to patch google.golang.org/protobuf from `v1.32.0` to `v1.33.0` to fix `GO-2024-2611` * Update dep checksums * Add base unit tests for azure vms (#443) * Add base unit tests for azure vms - More in-depth unit tests will need to come in the future when mocks are eventually added * Fix vm unit test * Temporary fix for golang/go#66139 * Temporary fix for golang/go#66139 * Update dependencies * Add support for Azure Load Balancer (#444) * Move public IP fetching function to own struct Allows usage of it by vms and (now) LBs. It's likely to be needed for CDNs as well. * Add support for Azure Load Balancer * Add unit tests for azure/public_ip * Add unit tests for azure load balancer plugin * Minor formatting fix * Comment out unused function in load balancer unit tests * Revert previous commit * Comment out unused function in az public IP unit tests * Issue 434 add azure cdn support (#445) * Add CDN Plugin * Fix CCR GA workflow * Spin out AFD endpoint processing logic for Azure CDNs to own function Makes `GetResources()` a little less complex and clunky * Add unit tests for azure cdn plugin * Update codacy coverage reporter workflow to match others * Update `example.com` IPs in utils unit tests * Add additional services to azure service search unit test
* Deploy: Update env and app ver for new release * Deploy: Fix app ver * Feature issue 362 add azure support (#447) * Add azure vm support (#441) * Add Azure as supported platform in app * Update CLI flags to denote supported platforms * Update flag modification logic to include azure and other non-aws services * Add base Azure plugin package * Add initial AZ VM plugin * Add Azure VM Support - Create new module for azure and virtual machine plugin * Update build configs * Upgrade dependencies - Main upgrade was to patch google.golang.org/protobuf from `v1.32.0` to `v1.33.0` to fix `GO-2024-2611` * Update dep checksums * Add base unit tests for azure vms (#443) * Add base unit tests for azure vms - More in-depth unit tests will need to come in the future when mocks are eventually added * Fix vm unit test * Temporary fix for golang/go#66139 * Temporary fix for golang/go#66139 * Update dependencies * Add support for Azure Load Balancer (#444) * Move public IP fetching function to own struct Allows usage of it by vms and (now) LBs. It's likely to be needed for CDNs as well. * Add support for Azure Load Balancer * Add unit tests for azure/public_ip * Add unit tests for azure load balancer plugin * Minor formatting fix * Comment out unused function in load balancer unit tests * Revert previous commit * Comment out unused function in az public IP unit tests * Issue 434 add azure cdn support (#445) * Add CDN Plugin * Fix CCR GA workflow * Spin out AFD endpoint processing logic for Azure CDNs to own function Makes `GetResources()` a little less complex and clunky * Add unit tests for azure cdn plugin * Update codacy coverage reporter workflow to match others * Update `example.com` IPs in utils unit tests * Add additional services to azure service search unit test * Deploy: update app env to `production` * Deploy: update "Commits since..." version in README
Fixes `govulncheck` to version v1.1.0 which fixes golang/go#66139. This version also renames "stacks" to "traces" for the `-show` flag. Update to Go v1.22.2 at the same time in order to fix security issues.
Fixes `govulncheck` to version v1.1.0 which fixes golang/go#66139. This version also renames "stacks" to "traces" for the `-show` flag. Update to Go v1.22.2 at the same time in order to fix security issues. category: misc ticket: none
Bug has been fixed in v1.1.0 References: golang/go#66139
govulncheck version
This was on version 1.0.4 (I've since downgraded back to 1.0.1 which works fine).
Does this issue reproduce at the latest version of golang.org/x/vuln?
Haven't tried latest unforunately.
Output of
go env
in your module/workspace:What did you do?
A simple
govulncheck ./...
What did you see happen?
returned the above error in the title. The fun part is, switching to package instead of symbol actually showed me that there was a protobuf vuln I need to upgrade dependencies for. I will try to get a minimal reproduction together.
What did you expect to see?
A successful scan with the protobuf dependencies called out as needing an upgrade due to an active vuln.
The text was updated successfully, but these errors were encountered: