Running restore command with a malformed serialized value (but valid checksum and rdb version) crashes the redis process.
In general, serialized-value for restore command is obtained by calling the dump command. In my case, I am generating the serialized value directly as part of a tool I am building. Due to a bug in my code, I was generating an incorrect payload. The checksum and rdb version are correct, so redis server doesn't immediately return an error. But when it tries to load the object, it crashes.
Looking at the source code, it seems there are a variety of code paths that can cause server to crash if the payload is malformed.
I am not sure if this should be considered a bug, because normal users are unlikely to face this. My expectation was the restore command would return an error indicating malformed payload or something like that.
To reproduce:
cat hash_as_ziplist.bin | redis-cli --pipe
will crash redis-server with the message ziplist with dup elements dump (hexdump of 3343411 bytes):
hash_as_ziplist.bin.zip