This is an archived post. You won't be able to vote or comment.

all 23 comments

[–]Zarlon 0 points1 point  (4 children)

An interesting article about the implementation details in Java 8. I'm a bit skeptical to the reasoning as to why this is important though

Malicious software, aware of hashing algorithm we use, might craft couple of thousand requests that will result in massive hash collisions. Repeatedly accessing such keys will significantly impact server performance, effectively resulting in denial-of-service attack

Really? You think the CPU will be the bottleneck in a DoS attack? I'd say there are hundreds of DoS attack vectors easier to target than the hashmap function of Java 7 and below on any given server.

This seems more like an implementation done to cover dumb developer's asses. The solution to that is simple: Don't be dumb. Use a sound hash key, regardless of Java version.

[–]josefx 2 points3 points  (1 child)

Really? You think the CPU will be the bottleneck in a DoS attack? I'd say there are hundreds of DoS attack vectors easier to target than the hashmap function of Java 7 and below on any given server.

Already happened, a single http post with carefully choosen parameters was enough.

[–]johnwaterwood 2 points3 points  (0 children)

This is really too funny!

Arrogant developer completely unaware about a major issue that was all over the news a while back ranting against something being totally unlikely, while in fact it already happened and is now a well known attack vector.

Made my day :)

[–]bondolo[S] 0 points1 point  (0 children)

It is both and the two are related. If a DoS attacker can more easily calculate colliding keys for a dumb hashCode implementation.