memo-map is vulnerable to Memory safety
30
CVE Score
Low
Memory safety
Public iter and keys on MemoMap hand back a &K that outlives the internal Mutex, while the key remains stored inline in the HashMap. A caller who keeps that key reference and then inserts enough new entries to resize the map is left holding a reference to moved or freed memory. MemoMap is also Sync for any Send key and value, so sharing a map whose key or value is not Sync (for example Cell) is a data race. The fix stores each key-value pair in one pinned allocation so those key references stay valid across resizes, and implements Sync only when both the key and the value are Send and Sync.
Upgrade the memo-map library to the patch version.
You are affected if you are using a version that falls within the vulnerable range and retain a key reference from iter or keys across an insertion that can resize the map, or share the map across threads when the key or value type is not Sync.
0.1.0 - 0.3.3
Fixed in 0.3.4memo-map is vulnerable to Memory safety in versions 0.1.0 - 0.3.3.
Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.
No credit card required | Scan results in 32 seconds.
I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant
ISO 42001Compliant© All Intel data is openly available and commercially licensed.