redict/tests
Oran Agra ca1c182567 Sanitize dump payload: ziplist, listpack, zipmap, intset, stream
When loading an encoded payload we will at least do a shallow validation to
check that the size that's encoded in the payload matches the size of the
allocation.
This let's us later use this encoded size to make sure the various offsets
inside encoded payload don't reach outside the allocation, if they do, we'll
assert/panic, but at least we won't segfault or smear memory.

We can also do 'deep' validation which runs on all the records of the encoded
payload and validates that they don't contain invalid offsets. This lets us
detect corruptions early and reject a RESTORE command rather than accepting
it and asserting (crashing) later when accessing that payload via some command.

configuration:
- adding ACL flag skip-sanitize-payload
- adding config sanitize-dump-payload [yes/no/clients]

For now, we don't have a good way to ensure MIGRATE in cluster resharding isn't
being slowed down by these sanitation, so i'm setting the default value to `no`,
but later on it should be set to `clients` by default.

changes:
- changing rdbReportError not to `exit` in RESTORE command
- adding a new stat to be able to later check if cluster MIGRATE isn't being
  slowed down by sanitation.
2020-12-06 14:54:34 +02:00
..
assets Sanitize dump payload: ziplist, listpack, zipmap, intset, stream 2020-12-06 14:54:34 +02:00
cluster Sanitize dump payload: ziplist, listpack, zipmap, intset, stream 2020-12-06 14:54:34 +02:00
helpers revert an accidental test code change done as part of the tls project 2019-12-01 16:10:09 +02:00
integration Sanitize dump payload: ziplist, listpack, zipmap, intset, stream 2020-12-06 14:54:34 +02:00
modules Make sure we do not propagate nested MULTI/EXEC (#8097) 2020-12-06 13:14:18 +02:00
sentinel Recalculate hardcoded variables from $::instances_count in sentinel tests (#7561) 2020-09-13 18:39:59 +03:00
support Sanitize dump payload: ziplist, listpack, zipmap, intset, stream 2020-12-06 14:54:34 +02:00
tmp minor fixes to the new test suite, html doc updated 2010-05-14 18:48:33 +02:00
unit prevent client tracking from causing feedback loop in performEvictions (#8100) 2020-12-06 14:51:22 +02:00
instances.tcl Allow blocked XREAD on a cluster replica (#7881) 2020-10-06 21:43:30 +03:00
test_helper.tcl Sanitize dump payload: ziplist, listpack, zipmap, intset, stream 2020-12-06 14:54:34 +02:00