No induced collision avoidance?
No induced collision avoidance?
Posted Jul 15, 2024 21:42 UTC (Mon) by Cyberax (✭ supporter ✭, #52523)Parent article: A hash table by any other name
Perhaps a per-map random seed to rejiggle the buckets on array growth?
Posted Jul 15, 2024 22:30 UTC (Mon)
by Paf (subscriber, #91811)
[Link] (6 responses)
Posted Jul 15, 2024 22:40 UTC (Mon)
by Cyberax (✭ supporter ✭, #52523)
[Link] (3 responses)
The only other significant user, that is a good attack vector, seems to be bcachefs.
Posted Jul 16, 2024 23:43 UTC (Tue)
by neilbrown (subscriber, #359)
[Link] (2 responses)
Wrong answer :-)
rhashtable generates a random seed each time the table is resized, and if a chain ever reaches 16, the table is "resized" though the size doesn't change.
Posted Jul 16, 2024 23:45 UTC (Tue)
by Cyberax (✭ supporter ✭, #52523)
[Link] (1 responses)
Posted Jul 16, 2024 23:58 UTC (Tue)
by neilbrown (subscriber, #359)
[Link]
I cannot find the word "seed" in the patch, and the documentation suggests that hashing is left entirely up to the caller.
Posted Jul 16, 2024 7:35 UTC (Tue)
by Wol (subscriber, #4433)
[Link]
So while it remains constant as long as the hash table "just grows", as soon as anything triggers the hash table into rebuilding (this could be as simple as it getting too big and being rebuilt with a new size), a new seed is generated.
So any attack that needs to know the seed is aiming at a moving target ...
Cheers,
Posted Jul 16, 2024 10:46 UTC (Tue)
by npws (subscriber, #168248)
[Link]
Posted Jul 16, 2024 8:48 UTC (Tue)
by vegard (subscriber, #52330)
[Link] (1 responses)
Posted Jul 16, 2024 22:33 UTC (Tue)
by Cyberax (✭ supporter ✭, #52523)
[Link]
Hah, I wonder if this can be used in reverse, to obtain the kernel pointers by carefully timing the insertions...?
No induced collision avoidance?
No induced collision avoidance?
No induced collision avoidance?
So as long as the hash function is effective at using the seed to modify the distribution, any induced collision will be quickly disabled by the seed being changed.
Of course if client code requests a poor hash function, all bets are off.
No induced collision avoidance?
No induced collision avoidance?
So I don't think rosebush attempts to address this issue.
No induced collision avoidance?
Wol
No induced collision avoidance?
No induced collision avoidance?
No induced collision avoidance?