Fix for hash table collision attack. We simply randomize hash table initialization value at startup time.

This commit is contained in:
antirez
2012-01-21 23:05:32 +01:00
parent 447ebf3bc7
commit a48c8d873b
4 changed files with 22 additions and 4 deletions

View File

@ -589,6 +589,8 @@ void sigsegvHandler(int sig, siginfo_t *info, void *secret) {
/* Log INFO and CLIENT LIST */
redisLog(REDIS_WARNING, "--- INFO OUTPUT");
infostring = genRedisInfoString("all");
infostring = sdscatprintf(infostring, "hash_init_value: %u\n",
dictGetHashFunctionSeed());
redisLogRaw(REDIS_WARNING, infostring);
redisLog(REDIS_WARNING, "--- CLIENT LIST OUTPUT");
clients = getAllClientsInfoString();