-
Notifications
You must be signed in to change notification settings - Fork 643
Closed
Labels
Description
Describe the bug
The following commands when used together could hang the keydb-server, making it unable to reply to any clients and increasingly consuming memory.
To reproduce
sadd a xxx
srandmember a -1428663252545913856
Expected behavior
An error should be returned instead of hanging. This could avoid DoS and server OOM.
Additional information
- This is likely due to improper checks for the range. When issued these two commands, the memory consumption of keydb increases over time drastically and is likely to cause an OOM of the server.
- A similar bug was also found in redis reported here: [CRASH] OOM Crash for
srandmemberredis/redis#11668, where redis crashes with an OOM panic before consuming lots of memory. The fix is to implement proper checks.
Thanks.