1. 12 12月, 2018 4 次提交
  2. 22 11月, 2018 1 次提交
  3. 14 11月, 2018 2 次提交
  4. 31 10月, 2018 3 次提交
  5. 10 10月, 2018 3 次提交
  6. 04 8月, 2018 1 次提交
  7. 03 8月, 2018 3 次提交
    • A
      Redis 4.0.11. · f2e9d94e
      antirez 提交于
      f2e9d94e
    • A
      Set repl_down_since to zero on state change. · 677f7585
      antirez 提交于
      PR #5081 fixes an "interesting" bug about Redis Cluster failover but in
      general about the updating of repl_down_since, that is used in order to
      count the time a slave was left disconnected from its master.
      
      While the fix provided resolves the specific issue, in general the
      validity of repl_down_since is limited to states that are different
      than the state CONNECTED, and the disconnected time is set when the
      state is DISCONNECTED. However from CONNECTED to other states, the state
      machine must always go to DISCONNECTED first. So it makes sense to set
      the field to zero (since it is meaningless in that context) when the
      state is set to CONNECTED.
      677f7585
    • W
      fix server.repl_down_since resetting, so that slaves could failover · 8c6223f9
      WuYunlong 提交于
      automatically as expected.
      8c6223f9
  8. 24 7月, 2018 1 次提交
    • O
      fix rare replication stream corruption with disk-based replication · 9535c215
      Oran Agra 提交于
      The slave sends \n keepalive messages to the master while parsing the rdb,
      and later sends REPLCONF ACK once a second. rarely, the master recives both
      a linefeed char and a REPLCONF in the same read, \n*3\r\n$8\r\nREPLCONF\r\n...
      and it tries to trim two chars (\r\n) from the query buffer,
      trimming the '*' from *3\r\n$8\r\nREPLCONF\r\n...
      
      then the master tries to process a command starting with '3' and replies to
      the slave a bunch of -ERR and one +OK.
      although the slave silently ignores these (prints a log message), this corrupts
      the replication offset at the slave since the slave increases the replication
      offset, and the master did not.
      
      other than the fix in processInlineBuffer, i did several other improvments
      while hunting this very rare bug.
      
      - when redis replies with "unknown command" it includes a portion of the
        arguments, not just the command name. so it would be easier to understand
        what was recived, in my case, on the slave side,  it was -ERR, but
        the "arguments" were the interesting part (containing info on the error).
      - about a year ago i added code in addReplyErrorLength to print the error to
        the log in case of a reply to master (since this string isn't actually
        trasmitted to the master), now changed that block to print a similar log
        message to indicate an error being sent from the master to the slave.
        note that the slave is marked as CLIENT_SLAVE only after PSYNC was received,
        so this will not cause any harm for REPLCONF, and will only indicate problems
        that are gonna corrupt the replication stream anyway.
      - two places were c->reply was emptied, and i wanted to reset sentlen
        this is a precaution (i did not actually see such a problem), since a
        non-zero sentlen will cause corruption to be transmitted on the socket.
      9535c215
  9. 29 6月, 2018 3 次提交
    • Z
      fix exists command on slave · 5f1fcc59
      zhaozhao.zz 提交于
      5f1fcc59
    • A
      Fix infinite loop in dbRandomKey(). · ab145a9f
      antirez 提交于
      Thanks to @kevinmcgehee for signaling the issue and reasoning about the
      consequences and potential fixes.
      
      Issue #5015.
      ab145a9f
    • A
      Sentinel: add an option to deny online script reconfiguration. · 2fa43ece
      antirez 提交于
      The ability of "SENTINEL SET" to change the reconfiguration script at
      runtime is a problem even in the security model of Redis: any client
      inside the network may set any executable to be ran once a failover is
      triggered.
      
      This option adds protection for this problem: by default the two
      SENTINEL SET subcommands modifying scripts paths are denied. However the
      user is still able to rever that using the Sentinel configuration file
      in order to allow such a feature.
      2fa43ece
  10. 13 6月, 2018 6 次提交
    • A
      Redis 4.0.10. · 556b2d2b
      antirez 提交于
      556b2d2b
    • A
      Security: fix redis-cli buffer overflow. · 9fdcc159
      antirez 提交于
      Thanks to Fakhri Zulkifli for reporting it.
      
      The fix switched to dynamic allocation, copying the final prompt in the
      static buffer only at the end.
      9fdcc159
    • A
      Security: fix Lua struct package offset handling. · cf760071
      antirez 提交于
      After the first fix to the struct package I found another similar
      problem, which is fixed by this patch. It could be reproduced easily by
      running the following script:
      
          return struct.unpack('f', "xxxxxxxxxxxxx",-3)
      
      The above will access bytes before the 'data' pointer.
      cf760071
    • A
      Security: more cmsgpack fixes by @soloestoy. · a57595ca
      antirez 提交于
      @soloestoy sent me this additional fixes, after searching for similar
      problems to the one reported in mp_pack(). I'm committing the changes
      because it was not possible during to make a public PR to protect Redis
      users and give Redis providers some time to patch their systems.
      a57595ca
    • A
      Security: update Lua struct package for security. · 8783fb94
      antirez 提交于
      During an auditing Apple found that the "struct" Lua package
      we ship with Redis (http://www.inf.puc-rio.br/~roberto/struct/) contains
      a security problem. A bound-checking statement fails because of integer
      overflow. The bug exists since we initially integrated this package with
      Lua, when scripting was introduced, so every version of Redis with
      EVAL/EVALSHA capabilities exposed is affected.
      
      Instead of just fixing the bug, the library was updated to the latest
      version shipped by the author.
      8783fb94
    • A
      Security: fix Lua cmsgpack library stack overflow. · 8cb9344b
      antirez 提交于
      During an auditing effort, the Apple Vulnerability Research team discovered
      a critical Redis security issue affecting the Lua scripting part of Redis.
      
      -- Description of the problem
      
      Several years ago I merged a pull request including many small changes at
      the Lua MsgPack library (that originally I authored myself). The Pull
      Request entered Redis in commit 90b6337c, in 2014.
      Unfortunately one of the changes included a variadic Lua function that
      lacked the check for the available Lua C stack. As a result, calling the
      "pack" MsgPack library function with a large number of arguments, results
      into pushing into the Lua C stack a number of new values proportional to
      the number of arguments the function was called with. The pushed values,
      moreover, are controlled by untrusted user input.
      
      This in turn causes stack smashing which we believe to be exploitable,
      while not very deterministic, but it is likely that an exploit could be
      created targeting specific versions of Redis executables. However at its
      minimum the issue results in a DoS, crashing the Redis server.
      
      -- Versions affected
      
      Versions greater or equal to Redis 2.8.18 are affected.
      
      -- Reproducing
      
      Reproduce with this (based on the original reproduction script by
      Apple security team):
      
      https://gist.github.com/antirez/82445fcbea6d9b19f97014cc6cc79f8a
      
      -- Verification of the fix
      
      The fix was tested in the following way:
      
      1) I checked that the problem is no longer observable running the trigger.
      2) The Lua code was analyzed to understand the stack semantics, and that
      actually enough stack is allocated in all the cases of mp_pack() calls.
      3) The mp_pack() function was modified in order to show exactly what items
      in the stack were being set, to make sure that there is no silent overflow
      even after the fix.
      
      -- Credits
      
      Thank you to the Apple team and to the other persons that helped me
      checking the patch and coordinating this communication.
      8cb9344b
  11. 01 6月, 2018 1 次提交
  12. 29 5月, 2018 11 次提交
  13. 23 5月, 2018 1 次提交