-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Open
Labels
NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.vulncheck or vulndbIssues for the x/vuln or x/vulndb repoIssues for the x/vuln or x/vulndb repo
Milestone
Description
Type propagation appears to taint some functions in the call graph, causing them to be reported as vulnerable, sometimes shadowing the actual results.
The example below is a quite basic example of this. Because VulnerableImplementation
flows from EntryB
through EntryA
, the latter is reported as vulnerable, shadowing EntryB
, since we try to only show a single finding per vulnerability. Removing EntryB
causes nothing to be reported.
I suspect this will also lead to more confusing results, where it is less obvious how the type is being propagated, tainting a function.
cc @zpavlinovic
package example
import "vuln"
type OrdinaryInterface interface {
F()
}
func EntryA(oi OrdinaryInterface) {
oi.F()
}
func EntryB() {
var oi OrdinaryInterface
oi = &vuln.VulnerableImplementation{}
EntryA(oi)
}
package vuln
type VulnerableImplementation struct {}
func (vi *VulnerableImplementation) F() {}
[
{
"id": "GO-EXAMPLE",
"package": {
"name": "vuln",
"ecosystem": "Go"
},
"ecosystem_specific": {
"symbols": [
"VulnerableImplementation.F"
]
}
}
]
Trace:
vuln.VulnerableImplementation.F (/Users/roland/vulncheck-permissive/main.go:10:6)
example.OrdinaryInterface.F(...) [approx. resolved to (*vuln.VulnerableImplementation).F] (/Users/roland/vulncheck-permissive/main.go:10:6)
example.EntryA(...) (/Users/roland/vulncheck-permissive/main.go:9:6)
Vulnerabilities:
vuln ()
Metadata
Metadata
Assignees
Labels
NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.vulncheck or vulndbIssues for the x/vuln or x/vulndb repoIssues for the x/vuln or x/vulndb repo
Type
Projects
Status
No status