1. 04 Oct, 2021 1 commit
    • Oran Agra's avatar
      Fix ziplist and listpack overflows and truncations (CVE-2021-32627, CVE-2021-32628) · 6facfb7a
      Oran Agra authored
      - fix possible heap corruption in ziplist and listpack resulting by trying to
        allocate more than the maximum size of 4GB.
      - prevent ziplist (hash and zset) from reaching size of above 1GB, will be
        converted to HT encoding, that's not a useful size.
      - prevent listpack (stream) from reaching size of above 1GB.
      - XADD will start a new listpack if the new record may cause the previous
        listpack to grow over 1GB.
      - XADD will respond with an error if a single stream record is over 1GB
      - List type (ziplist in quicklist) was truncating strings that were over 4GB,
        now it'll respond with an error.
      
      (cherry picked from commit 68e221a3f98a427805d31c1760b4cdf37ba810ab)
      6facfb7a
  2. 31 Jul, 2019 1 commit
  3. 14 Mar, 2019 3 commits
  4. 11 Dec, 2018 1 commit
  5. 02 Aug, 2018 6 commits
  6. 03 Jul, 2018 1 commit
  7. 12 Jun, 2018 1 commit
  8. 05 Jun, 2018 2 commits
  9. 01 Jun, 2018 1 commit
  10. 31 May, 2018 1 commit
  11. 22 May, 2018 1 commit
  12. 11 May, 2018 2 commits
    • antirez's avatar
      ZPOP: change sync ZPOP to have a count argument instead of N keys. · 56bbab23
      antirez authored
      Usually blocking operations make a lot of sense with multiple keys so
      that we can listen to multiple queues (or whatever the app models) with
      a single connection. However in the synchronous case it is more useful
      to be able to ask for N elements. This is a change that I also wanted to
      perform soon or later in the blocking list variant, but here it is more
      natural since there is no reply type difference.
      56bbab23
    • antirez's avatar
      ZPOP: renaming to have explicit MIN/MAX score idea. · 6efb6c1e
      antirez authored
      This commit also adds a top comment about a subtle behavior of mixing
      blocking operations of different types in the same key.
      6efb6c1e
  13. 29 Apr, 2018 1 commit
  14. 08 Dec, 2017 1 commit
  15. 20 Feb, 2017 1 commit
    • antirez's avatar
      Use SipHash hash function to mitigate HashDos attempts. · adeed29a
      antirez authored
      This change attempts to switch to an hash function which mitigates
      the effects of the HashDoS attack (denial of service attack trying
      to force data structures to worst case behavior) while at the same time
      providing Redis with an hash function that does not expect the input
      data to be word aligned, a condition no longer true now that sds.c
      strings have a varialbe length header.
      
      Note that it is possible sometimes that even using an hash function
      for which collisions cannot be generated without knowing the seed,
      special implementation details or the exposure of the seed in an
      indirect way (for example the ability to add elements to a Set and
      check the return in which Redis returns them with SMEMBERS) may
      make the attacker's life simpler in the process of trying to guess
      the correct seed, however the next step would be to switch to a
      log(N) data structure when too many items in a single bucket are
      detected: this seems like an overkill in the case of Redis.
      
      SPEED REGRESION TESTS:
      
      In order to verify that switching from MurmurHash to SipHash had
      no impact on speed, a set of benchmarks involving fast insertion
      of 5 million of keys were performed.
      
      The result shows Redis with SipHash in high pipelining conditions
      to be about 4% slower compared to using the previous hash function.
      However this could partially be related to the fact that the current
      implementation does not attempt to hash whole words at a time but
      reads single bytes, in order to have an output which is endian-netural
      and at the same time working on systems where unaligned memory accesses
      are a problem.
      
      Further X86 specific optimizations should be tested, the function
      may easily get at the same level of MurMurHash2 if a few optimizations
      are performed.
      adeed29a
  16. 02 Dec, 2016 1 commit
  17. 14 Sep, 2016 1 commit
  18. 12 Sep, 2016 1 commit
  19. 20 Jun, 2016 1 commit
  20. 10 May, 2016 3 commits
  21. 09 May, 2016 1 commit
  22. 18 Apr, 2016 1 commit
  23. 15 Apr, 2016 2 commits
  24. 14 Apr, 2016 2 commits
  25. 18 Feb, 2016 1 commit
  26. 01 Oct, 2015 1 commit
  27. 27 Jul, 2015 1 commit