Skip to content

[BUG] hrandfield hangs the server #11671

@yype

Description

@yype

Describe the bug

Using hrandfield in the following way hangs the server. Other clients are then not able to connect to the server and get any response, potentially leading to DoS.

To reproduce

Run the following commands in the cli with the server running:

hmset myhash a 1
hrandfield myhash -9223372036854770000

Expected behavior

Returns an error code or a result, instead of hanging.

Additional information

Tested on:

Ubuntu 22.04.1 LTS
Redis ver: built from commit af0a4fe20771603f0eab75a1f60748d124cf33c3

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

Backlog

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions