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
In memcache.go there's TemplatesShard which has a map with uint32 as key.
The key is computed as a hash of the sender's IP and template ID.
It is possible to have multiple senders or multiple template IDs that will result in in the same hash.
In such a case, they will overwrite each-other in the cache, leading to incorrect parsing of the traffic from the other sender.
In the best case scenario, the incorrectly parsed packets would cause some error and the packet would be ignored. In the worst case scenario, the parsing would succeed, but would result in garbage values.
I do not understand the motivation of making this map with a key of uint32 and going through the trouble of manually computing the hash. If the code would use a map with a struct holding the IP and ID, then the code would be much simpler and the problem described here would never happen.
The text was updated successfully, but these errors were encountered:
In memcache.go there's TemplatesShard which has a map with uint32 as key.
The key is computed as a hash of the sender's IP and template ID.
It is possible to have multiple senders or multiple template IDs that will result in in the same hash.
In such a case, they will overwrite each-other in the cache, leading to incorrect parsing of the traffic from the other sender.
In the best case scenario, the incorrectly parsed packets would cause some error and the packet would be ignored. In the worst case scenario, the parsing would succeed, but would result in garbage values.
I do not understand the motivation of making this map with a key of uint32 and going through the trouble of manually computing the hash. If the code would use a map with a struct holding the IP and ID, then the code would be much simpler and the problem described here would never happen.
The text was updated successfully, but these errors were encountered: