You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
kind/featureCategorizes issue or PR as related to a new feature.
1 participant
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Description
Description
I've noticed a potential issue in the
UIDfunction inpkg/dependency/id.gowhere hash calculation errors may lead to hash collisions.Current Behavior
When
hashstructure.Hash()fails, the function:strconv.FormatUint(hash, 16)wherehash = 0(zero value)trivy/pkg/dependency/id.go
Lines 40 to 56 in f64e0da
Questions
I'm trying to understand if this behavior could actually lead to problems:
If
hashstructure.Hash()fails for multiple different packages, they would all get the same UID"0", which could cause:Is this deliberate design for fault tolerance, or is it something that should be revisited to prevent possible hash collisions?
Found by Linux Verification Center with SVACE
Target
None
Scanner
None
Beta Was this translation helpful? Give feedback.
All reactions