Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
888effe4be | ||
|
|
15ae4e29e5 | ||
|
|
21fd252a62 |
@@ -12,6 +12,17 @@ SECURITY: There are security fixes in the release.
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
|
||||
================================================================================
|
||||
Redis 7.0.4 Released Monday Jul 18 12:00:00 IST 2022
|
||||
================================================================================
|
||||
|
||||
Upgrade urgency: SECURITY, contains fixes to security issues.
|
||||
|
||||
Security Fixes:
|
||||
* (CVE-2022-31144) A specially crafted XAUTOCLAIM command on a stream
|
||||
key in a specific state may result with heap overflow, and potentially
|
||||
remote code execution. The problem affects Redis versions 7.0.0 or newer.
|
||||
|
||||
================================================================================
|
||||
Redis 7.0.3 Released Monday Jul 11 12:00:00 IST 2022
|
||||
================================================================================
|
||||
|
||||
+2
-2
@@ -334,7 +334,7 @@ static void redisProtocolToLuaType_Error(void *ctx, const char *str, size_t len,
|
||||
/* push a field indicate to ignore updating the stats on this error
|
||||
* because it was already updated when executing the command. */
|
||||
lua_pushstring(lua,"ignore_error_stats_update");
|
||||
lua_pushboolean(lua, true);
|
||||
lua_pushboolean(lua, 1);
|
||||
lua_settable(lua,-3);
|
||||
}
|
||||
|
||||
@@ -891,7 +891,7 @@ static int luaRedisGenericCommand(lua_State *lua, int raise_error) {
|
||||
/* push a field indicate to ignore updating the stats on this error
|
||||
* because it was already updated when executing the command. */
|
||||
lua_pushstring(lua,"ignore_error_stats_update");
|
||||
lua_pushboolean(lua, true);
|
||||
lua_pushboolean(lua, 1);
|
||||
lua_settable(lua,-3);
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
@@ -3421,6 +3421,7 @@ void xautoclaimCommand(client *c) {
|
||||
/* Remember the ID for later */
|
||||
deleted_ids[deleted_id_num++] = id;
|
||||
raxSeek(&ri,">=",ri.key,ri.key_len);
|
||||
count--; /* Count is a limit of the command response size. */
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -1,2 +1,2 @@
|
||||
#define REDIS_VERSION "7.0.3"
|
||||
#define REDIS_VERSION_NUM 0x00070003
|
||||
#define REDIS_VERSION "7.0.4"
|
||||
#define REDIS_VERSION_NUM 0x00070004
|
||||
|
||||
@@ -584,9 +584,9 @@ start_server {
|
||||
# from the PEL of consumer 1, this should return nil
|
||||
r XDEL mystream $id2
|
||||
|
||||
# id1 and id3 are self-claimed here but not id2 ('count' was set to 2)
|
||||
# id1 and id3 are self-claimed here but not id2 ('count' was set to 3)
|
||||
# we make sure id2 is indeed skipped (the cursor points to id4)
|
||||
set reply [r XAUTOCLAIM mystream mygroup consumer2 10 - COUNT 2]
|
||||
set reply [r XAUTOCLAIM mystream mygroup consumer2 10 - COUNT 3]
|
||||
|
||||
assert_equal [llength $reply] 3
|
||||
assert_equal [lindex $reply 0] $id4
|
||||
@@ -595,6 +595,8 @@ start_server {
|
||||
assert_equal [llength [lindex $reply 1 0 1]] 2
|
||||
assert_equal [lindex $reply 1 0 1] {a 1}
|
||||
assert_equal [lindex $reply 1 1 1] {c 3}
|
||||
assert_equal [llength [lindex $reply 2]] 1
|
||||
assert_equal [llength [lindex $reply 2 0]] 1
|
||||
|
||||
# Delete item 3 from the stream. Now consumer 1 has PEL that is empty.
|
||||
# Try to use consumer 2 to claim the deleted item 3 from the PEL
|
||||
@@ -701,6 +703,21 @@ start_server {
|
||||
assert_equal [r XPENDING x grp - + 10 Alice] {}
|
||||
}
|
||||
|
||||
test {XAUTOCLAIM with XDEL and count} {
|
||||
r DEL x
|
||||
r XADD x 1-0 f v
|
||||
r XADD x 2-0 f v
|
||||
r XADD x 3-0 f v
|
||||
r XGROUP CREATE x grp 0
|
||||
assert_equal [r XREADGROUP GROUP grp Alice STREAMS x >] {{x {{1-0 {f v}} {2-0 {f v}} {3-0 {f v}}}}}
|
||||
r XDEL x 1-0
|
||||
r XDEL x 2-0
|
||||
assert_equal [r XAUTOCLAIM x grp Bob 0 0-0 COUNT 1] {2-0 {} 1-0}
|
||||
assert_equal [r XAUTOCLAIM x grp Bob 0 2-0 COUNT 1] {3-0 {} 2-0}
|
||||
assert_equal [r XAUTOCLAIM x grp Bob 0 3-0 COUNT 1] {0-0 {{3-0 {f v}}} {}}
|
||||
assert_equal [r XPENDING x grp - + 10 Alice] {}
|
||||
}
|
||||
|
||||
test {XCLAIM with trimming} {
|
||||
r DEL x
|
||||
r config set stream-node-max-entries 2
|
||||
|
||||
Reference in New Issue
Block a user