commit_msg
stringlengths
1
24.2k
commit_hash
stringlengths
2
84
project
stringlengths
2
40
source
stringclasses
4 values
labels
int64
0
1
repo_url
stringlengths
26
70
commit_url
stringlengths
74
118
commit_date
stringlengths
25
25
Fix new / failing cluster slot migration test (#10482) #10381 fixed an issue in `redis-cli --cluster reshard` that used to fail it (redis-cli) because of a race condition. the race condition is / was that when moving the last slot from a node, sometimes the PONG messages delivering the configuration change arrive to that node before the SETSLOT arrives to it, and it becomes a replica. other times the the SETSLOT arrive first, and then PONG **doesn't** demote it. **however**, the PR also added a new test that suffers from exactly the same race condition, and the tests started failing a lot. The fact is (if i understand it correctly), that this test (the one being deleted here), isn't related to the fix that PR fixed (which was to fix redis-cli). The race condition in the cluster code still happens, and as long as we don't solve it, there's no reason to test it. For now, even if my understandings are wrong, i'm gonna delete that failing test, since as far as i understand, #10381 didn't introduce any new risks for that matter (which are gonna be compromised by removing this check), this race existed since forever, and still exists, and the fact that redis-cli is now immune to it is still being tested. Additional work should be carried to fix it, and i live it for other PRs to handle.
0b21ef8d49c47a5dd47a0bcc0cf1b2c235f24fd0
redis
neuralsentry
0
https://github.com/redis/redis
https://github.com/redis/redis/commit/0b21ef8d49c47a5dd47a0bcc0cf1b2c235f24fd0
2022-03-27 18:39:19+03:00
Fix protocol parsing on 'ldbReplParseCommand' (CVE-2021-32672) (#9590) The protocol parsing on 'ldbReplParseCommand' (LUA debugging) Assumed protocol correctness. This means that if the following is given: *1 $100 test The parser will try to read additional 94 unallocated bytes after the client buffer. This commit fixes this issue by validating that there are actually enough bytes to read. It also limits the amount of data that can be sent by the debugger client to 1M so the client will not be able to explode the memory. Co-authored-by: [email protected] <[email protected]>
b0ca3be2bba3092ec7cc18e1d87380b1af951d48
redis
neuralsentry
1
https://github.com/redis/redis
https://github.com/redis/redis/commit/b0ca3be2bba3092ec7cc18e1d87380b1af951d48
2021-10-04 12:14:12+03:00
Fix race condition in lazy free test (#9682) The first test exited before all the memory was reclaimed, so when the second test sampled used_memory, it was too early.
37559ca79fe621385f4ebc5f692e13677f93fb93
redis
neuralsentry
0
https://github.com/redis/redis
https://github.com/redis/redis/commit/37559ca79fe621385f4ebc5f692e13677f93fb93
2021-10-26 13:02:31+03:00
fix test Migrate the last slot away from a node using redis-cli (#11221) When using cli to add node, there can potentially be a race condition in which all nodes presenting cluster state o.k even though the added node did not yet meet all cluster nodes. this adds another utility function to wait until all cluster nodes see the same cluster size
c0ce97faccb314f00cdda38a233508d38bd1b855
redis
neuralsentry
0
https://github.com/redis/redis
https://github.com/redis/redis/commit/c0ce97faccb314f00cdda38a233508d38bd1b855
2022-09-07 02:54:24+03:00
redis-check-aof: fix potential overflow. Bug signaled by @vattezhang in PR #5940 but fixed differently.
b78ac354f41e370a4dc21ac01981cb0ccd0a1b7d
redis
neuralsentry
1
https://github.com/redis/redis
https://github.com/redis/redis/commit/b78ac354f41e370a4dc21ac01981cb0ccd0a1b7d
2019-03-18 11:15:39+01:00
Fix a possible race condition of sdown detection if the connection to master/slave/sentinel decames disconnected just after the last PONG and before the next PING.
e6d970534b41825e9b32504b4e80d0039a389d28
redis
neuralsentry
1
https://github.com/redis/redis
https://github.com/redis/redis/commit/e6d970534b41825e9b32504b4e80d0039a389d28
2016-01-12 17:06:47+08:00
Prevent corruption of server.executable after DEBUG RESTART. Doing the following ended with a broken server.executable: 1. Start Redis with src/redis-server 2. Send CONFIG SET DIR /tmp/ 3. Send DEBUG RESTART At this point we called execve with an argv[0] that is no longer related to the new path. So after the restart the absolute path of the executable is recomputed in the wrong way. With this fix we pass the absolute path already computed as argv[0].
3b9be93fdab81e27d68814aa794807897055af0d
redis
neuralsentry
1
https://github.com/redis/redis
https://github.com/redis/redis/commit/3b9be93fdab81e27d68814aa794807897055af0d
2017-11-30 18:30:06+01:00
Fix buffer overflows occurring reading redis.conf. There was not enough sanity checking in the code loading the slots of Redis Cluster from the nodes.conf file, this resulted into the attacker's ability to write data at random addresses in the process memory, by manipulating the index of the array. The bug seems exploitable using the following techique: the config file may be altered so that one of the nodes gets, as node ID (which is the first field inside the structure) some data that is actually executable: then by writing this address in selected places, this node ID part can be executed after a jump. So it is mostly just a matter of effort in order to exploit the bug. In practice however the issue is not very critical because the bug requires an unprivileged user to be able to modify the Redis cluster nodes configuration, and at the same time this should result in some gain. However Redis normally is unprivileged as well. Yet much better to have this fixed indeed. Fix #4278.
ffcf7d5ab1e98d84c28af9bea7be76c6737820ad
redis
neuralsentry
1
https://github.com/redis/redis
https://github.com/redis/redis/commit/ffcf7d5ab1e98d84c28af9bea7be76c6737820ad
2017-10-31 09:41:22+01:00
Tests: fix unmonitored servers. (#7756) There is an inherent race condition in port allocation for spawned servers. If a server fails to start because a port is taken, a new port is allocated. This fixes a problem where the logs are not truncated and as a result a large number of unmonitored servers are started.
2df4cb93acabf10bb0ff39c12030791b0947e719
redis
neuralsentry
1
https://github.com/redis/redis
https://github.com/redis/redis/commit/2df4cb93acabf10bb0ff39c12030791b0947e719
2020-09-07 17:30:36+03:00
Add RM_TrimStringAllocation(). (#9540) This commit makes it possible to explicitly trim the allocation of a RedisModuleString. Currently, Redis automatically trims strings that have been retained by a module command when it returns. However, this is not thread safe and may result with corruption in threaded modules. Supporting explicit trimming offers a backwards compatible workaround to this problem.
bebc7f8470a5c6093514abf02f2514268c78b28f
redis
neuralsentry
1
https://github.com/redis/redis
https://github.com/redis/redis/commit/bebc7f8470a5c6093514abf02f2514268c78b28f
2021-09-23 15:00:37+03:00
Support setcpuaffinity on linux/bsd Currently, there are several types of threads/child processes of a redis server. Sometimes we need deeply optimise the performance of redis, so we would like to isolate threads/processes. There were some discussion about cpu affinity cases in the issue: https://github.com/antirez/redis/issues/2863 So implement cpu affinity setting by redis.conf in this patch, then we can config server_cpulist/bio_cpulist/aof_rewrite_cpulist/ bgsave_cpulist by cpu list. Examples of cpulist in redis.conf: server_cpulist 0-7:2 means cpu affinity 0,2,4,6 bio_cpulist 1,3 means cpu affinity 1,3 aof_rewrite_cpulist 8-11 means cpu affinity 8,9,10,11 bgsave_cpulist 1,10-11 means cpu affinity 1,10,11 Test on linux/freebsd, both work fine. Signed-off-by: zhenwei pi <[email protected]>
1a0deab2a548fa306171f03439e858c00836fe69
redis
neuralsentry
0
https://github.com/redis/redis
https://github.com/redis/redis/commit/1a0deab2a548fa306171f03439e858c00836fe69
2020-05-02 20:05:39+08:00
Redis Benchmark: Fix coredump because of double free
150ba0e1ff0a24d2136f893ede550d19e78a96a0
redis
neuralsentry
1
https://github.com/redis/redis
https://github.com/redis/redis/commit/150ba0e1ff0a24d2136f893ede550d19e78a96a0
2020-05-05 23:09:45+08:00
Fix redis-cli CLUSTER SETSLOT race conditions (#10381) After migrating a slot, send CLUSTER SETSLOT NODE to the destination node first to make sure the slot isn't left without an owner in case the destination node crashes before it is set as new owner. When informing the source node, it can happen that the destination node has already informed it and if the source node has lost its last slot, it has already turned itself into a replica. Redis-cli should ignore this error in this case.
69017fa232093728a84dfcb1befe7bc4b204c182
redis
neuralsentry
1
https://github.com/redis/redis
https://github.com/redis/redis/commit/69017fa232093728a84dfcb1befe7bc4b204c182
2022-03-16 18:11:38+01:00
Attempt to solve MacOS CI issues in GH Actions (#12013) The MacOS CI in github actions often hangs without any logs. GH argues that it's due to resource utilization, either running out of disk space, memory, or CPU starvation, and thus the runner is terminated. This PR contains multiple attempts to resolve this: 1. introducing pause_process instead of SIGSTOP, which waits for the process to stop before resuming the test, possibly resolving race conditions in some tests, this was a suspect since there was one test that could result in an infinite loop in that case, in practice this didn't help, but still a good idea to keep. 2. disable the `save` config in many tests that don't need it, specifically ones that use heavy writes and could create large files. 3. change the `populate` proc to use short pipeline rather than an infinite one. 4. use `--clients 1` in the macos CI so that we don't risk running multiple resource demanding tests in parallel. 5. enable `--verbose` to be repeated to elevate verbosity and print more info to stdout when a test or a server starts.
997fa41e99271cc5c3a79e9bf8a1332b3d9ab0c2
redis
neuralsentry
0
https://github.com/redis/redis
https://github.com/redis/redis/commit/997fa41e99271cc5c3a79e9bf8a1332b3d9ab0c2
2023-04-12 09:19:21+03:00
Merge pull request #6890 from itamarhaber/patch-trackingGetTotalKeys Fixes segfault on calling trackingGetTotalKeys
ddb80bb3d483617787e57d29426a3e151e138534
redis
neuralsentry
1
https://github.com/redis/redis
https://github.com/redis/redis/commit/ddb80bb3d483617787e57d29426a3e151e138534
2020-02-14 16:21:24+01:00
Sentinel: don't log auth-pass value for better security (#9652)
43b22f17dc3eb77a255f140fa37765f306541b7a
redis
neuralsentry
1
https://github.com/redis/redis
https://github.com/redis/redis/commit/43b22f17dc3eb77a255f140fa37765f306541b7a
2021-10-26 06:13:12-04:00
Avoid crash on crash report when a bad function pointer was called (#11298) If Redis crashes due to calling an invalid function pointer, the `backtrace` function will try to dereference this invalid pointer which will cause a crash inside the crash report and will kill the processes without having all the crash report information. Example: ``` === REDIS BUG REPORT START: Cut & paste starting from here === 198672:M 19 Sep 2022 18:06:12.936 # Redis 255.255.255 crashed by signal: 11, si_code: 1 198672:M 19 Sep 2022 18:06:12.936 # Accessing address: 0x1 198672:M 19 Sep 2022 18:06:12.936 # Crashed running the instruction at: 0x1 // here the processes is crashing ``` This PR tries to fix this crash be: 1. Identify the issue when it happened. 2. Replace the invalid pointer with a pointer to some dummy function so that `backtrace` will not crash. I identification is done by comparing `eip` to `info->si_addr`, if they are the same we know that the crash happened on the same address it tries to accesses and we can conclude that it tries to call and invalid function pointer. To replace the invalid pointer we introduce a new function, `setMcontextEip`, which is very similar to `getMcontextEip` and it knows to set the Eip for the different supported OS's. After printing the trace we retrieve the old `Eip` value.
0bf90d944313919eb8e63d3588bf63a367f020a3
redis
neuralsentry
1
https://github.com/redis/redis
https://github.com/redis/redis/commit/0bf90d944313919eb8e63d3588bf63a367f020a3
2022-09-29 08:58:58+03:00
fix wrong comments in redis.conf, change default always-show-logo (#5695) 1. default value of always-show-logo was not consistent with the default in the code 2. comment about cluster-replica-no-failover is wrong since we can only do manually failover upon replicas 3. improve description about always-show-logo
12f798dc18976839f3dfcb835433b6db63f8922f
redis
neuralsentry
0
https://github.com/redis/redis
https://github.com/redis/redis/commit/12f798dc18976839f3dfcb835433b6db63f8922f
2020-09-03 15:31:18+08:00
PSYNC2: just store script bodies into RDB. Related to #4483. As suggested by @soloestoy, we can retrieve the SHA1 from the body. Given that in the new implementation using AUX fields we ended copying around a lot to create new objects and strings, extremize such concept and trade CPU for space inside the RDB file.
452ad2e928524cfe42856e869effd2d8b37ae280
redis
neuralsentry
0
https://github.com/redis/redis
https://github.com/redis/redis/commit/452ad2e928524cfe42856e869effd2d8b37ae280
2017-11-29 16:38:16+01:00
Test: fix attach_to_replication_stream to handle newlines.
363c0f67b9bd295dbe08815497e8b0b084440139
redis
neuralsentry
0
https://github.com/redis/redis
https://github.com/redis/redis/commit/363c0f67b9bd295dbe08815497e8b0b084440139
2015-10-07 22:32:24+02:00
MEMORY command: HELP + dataset percentage (like in INFO).
e9629e148bb445474e172134c1bc0d248adf2454
redis
neuralsentry
0
https://github.com/redis/redis
https://github.com/redis/redis/commit/e9629e148bb445474e172134c1bc0d248adf2454
2016-09-15 17:33:11+02:00
Streams: fix memory leak in streamTrimByLength().
a4e6aae6b82a5118d128110f9f1c0ab0f979d5c2
redis
neuralsentry
1
https://github.com/redis/redis
https://github.com/redis/redis/commit/a4e6aae6b82a5118d128110f9f1c0ab0f979d5c2
2017-09-29 16:18:59+02:00
Removed double semicolon at the end of line (#10305)
cca3577503037117f497085d7994af944c0379e5
redis
neuralsentry
0
https://github.com/redis/redis
https://github.com/redis/redis/commit/cca3577503037117f497085d7994af944c0379e5
2022-02-16 15:42:04+01:00
More sensible name for function: restartAOFAfterSYNC(). Related to #3829.
b3408e9a9b1bdf8ea59bf80d715c695a113820f3
redis
neuralsentry
0
https://github.com/redis/redis
https://github.com/redis/redis/commit/b3408e9a9b1bdf8ea59bf80d715c695a113820f3
2019-03-21 17:21:25+01:00
Assertion and panic, print crash log without generating SIGSEGV This makes it possible to add tests that generate assertions, and run them with valgrind, making sure that there are no memory violations prior to the assertion. New config options: - crash-log-enabled - can be disabled for cleaner core dumps - crash-memcheck-enabled - useful for faster termination after a crash - use-exit-on-panic - to be used by the test suite so that valgrind can detect leaks and memory corruptions Other changes: - Crash log is printed even on system that dont HAVE_BACKTRACE, i.e. in both SIGSEGV and assert / panic - Assertion and panic won't print registers and code around EIP (which was useless), but will do fast memory test (which may still indicate that the assertion was due to memory corrpution) I had to reshuffle code in order to re-use it, so i extracted come code into function without actually doing any changes to the code: - logServerInfo - logModulesInfo - doFastMemoryTest (with the exception of it being conditional) - dumpCodeAroundEIP changes to the crash report on segfault: - logRegisters is called right after the stack trace (before info) done just in order to have more re-usable code - stack trace skips the first two items on the stack (the crash log and signal handler functions)
90b717e72340081ee87f0b85b4ef00b2a5bd2bf2
redis
neuralsentry
0
https://github.com/redis/redis
https://github.com/redis/redis/commit/90b717e72340081ee87f0b85b4ef00b2a5bd2bf2
2020-07-29 17:05:14+03:00
Fix heap overflow vulnerability in XAUTOCLAIM (CVE-2022-35951) (#11301) Executing an XAUTOCLAIM command on a stream key in a specific state, with a specially crafted COUNT argument may cause an integer overflow, a subsequent heap overflow, and potentially lead to remote code execution. The problem affects Redis versions 7.0.0 or newer.
6d21560190fd5b09ff849ad1777e868d5e78da5f
redis
neuralsentry
1
https://github.com/redis/redis
https://github.com/redis/redis/commit/6d21560190fd5b09ff849ad1777e868d5e78da5f
2022-09-22 11:55:53+03:00
Fixed memory write error in clusterManagerGetConfigSignature
fb41b8bb9c6de44ebfd56759efcd7f3edc22aedc
redis
neuralsentry
1
https://github.com/redis/redis
https://github.com/redis/redis/commit/fb41b8bb9c6de44ebfd56759efcd7f3edc22aedc
2018-02-28 11:49:10+01:00
Fix sentinel commands, ACL dictIter leak (#9661)
8f745da1597efdb5f9275af91a63c08ba26abb61
redis
neuralsentry
1
https://github.com/redis/redis
https://github.com/redis/redis/commit/8f745da1597efdb5f9275af91a63c08ba26abb61
2021-10-21 11:50:58+02:00
README: remove garbage at end of line.
462026ceb74415752a15e0ce90c05b0331026071
redis
neuralsentry
0
https://github.com/redis/redis
https://github.com/redis/redis/commit/462026ceb74415752a15e0ce90c05b0331026071
2015-11-04 12:52:37+01:00
Fix memory overlap in quicklistRotate (#8599) When the length of the quicklist is 1(only one zipmap), the rotate operation will cause memory overlap when moving an entity from the tail of the zipmap to the head. quicklistRotate is a dead code, so it has no impact on the existing code.
f07b7393a0f4b1348342c02849b4c389ac45372e
redis
neuralsentry
1
https://github.com/redis/redis
https://github.com/redis/redis/commit/f07b7393a0f4b1348342c02849b4c389ac45372e
2021-03-04 19:12:00+08:00
ACL: automatically authenticate the nopass default user.
35fe59935ef809956f593cd4973387665d2d072f
redis
neuralsentry
0
https://github.com/redis/redis
https://github.com/redis/redis/commit/35fe59935ef809956f593cd4973387665d2d072f
2019-01-15 17:57:49+01:00
redis-cli: fix writeConn() buffer handling. (#7749) Fix issues with writeConn() which resulted with corruption of the stream by leaving an extra byte in the buffer. The trigger for this is partial writes or write errors which were not experienced on Linux but reported on macOS.
58e5feb3f49c50b9c18f38fd8f6cad2317c02265
redis
neuralsentry
1
https://github.com/redis/redis
https://github.com/redis/redis/commit/58e5feb3f49c50b9c18f38fd8f6cad2317c02265
2020-09-03 18:15:48+03:00
redis-cli: Add -X option and extend --cluster call take arg from stdin (#9980) There are two changes in this commit: 1. Add -X option to redis-cli. Currently `-x` can only be used to provide the last argument, so you can do `redis-cli dump keyname > key.dump`, and then do `redis-cli -x restore keyname 0 < key.dump`. But what if you want to add the replace argument (which comes last?). oran suggested adding such usage: `redis-cli -X <tag> restore keyname <tag> replace < key.dump` i.e. you're able to provide a string in the arguments that's gonna be substituted with the content from stdin. Note that the tag name should not conflict with others non-replaced args. And the -x and -X options are conflicting. Some usages: ``` [root]# echo mypasswd | src/redis-cli -X passwd_tag mset username myname password passwd_tag OK [root]# echo username > username.txt [root]# head -c -1 username.txt | src/redis-cli -X name_tag mget name_tag password 1) "myname" 2) "mypasswd\n" ``` 2. Handle the combination of both `-x` and `--cluster` or `-X` and `--cluster` Extend the broadcast option to receive the last arg or <tag> arg from the stdin. Now we can use `redis-cli -x --cluster call <host>:<port> cmd`, or `redis-cli -X <tag> --cluster call <host>:<port> cmd <tag>`. (support part of #9899)
4836ae32c7eb485dd4b0196ec67b9838c6d87f80
redis
neuralsentry
0
https://github.com/redis/redis
https://github.com/redis/redis/commit/4836ae32c7eb485dd4b0196ec67b9838c6d87f80
2021-12-30 18:10:04+08:00
GEOADD - add [CH] [NX|XX] options (#8227) New command flags similar to what SADD already has. Co-authored-by: huangwei03 <[email protected]> Co-authored-by: Itamar Haber <[email protected]> Co-authored-by: Oran Agra <[email protected]>
33fb6170531435b891faf0ed7b21a95ac65dd0a1
redis
neuralsentry
0
https://github.com/redis/redis
https://github.com/redis/redis/commit/33fb6170531435b891faf0ed7b21a95ac65dd0a1
2021-01-03 23:13:37+08:00
Fix rdbSaveKeyValuePair() integer overflow. Again thanks to @oranagra. The object idle time does not fit into an int sometimes: use the native type that the serialization function will get as argument, which is uint64_t.
b38682199b09bb77e11d9a3d4130fd8ebf8df7df
redis
neuralsentry
1
https://github.com/redis/redis
https://github.com/redis/redis/commit/b38682199b09bb77e11d9a3d4130fd8ebf8df7df
2018-06-12 17:31:04+02:00
Don't write replies if close the client ASAP (#7202) Before this commit, we would have continued to add replies to the reply buffer even if client output buffer limit is reached, so the used memory would keep increasing over the configured limit. What's more, we shouldn’t write any reply to the client if it is set 'CLIENT_CLOSE_ASAP' flag because that doesn't conform to its definition and we will close all clients flagged with 'CLIENT_CLOSE_ASAP' in ‘beforeSleep’. Because of code execution order, before this, we may firstly write to part of the replies to the socket before disconnecting it, but in fact, we may can’t send the full replies to clients since OS socket buffer is limited. But this unexpected behavior makes some commands work well, for instance ACL DELUSER, if the client deletes the current user, we need to send reply to client and close the connection, but before, we close the client firstly and write the reply to reply buffer. secondly, we shouldn't do this despite the fact it works well in most cases. We add a flag 'CLIENT_CLOSE_AFTER_COMMAND' to mark clients, this flag means we will close the client after executing commands and send all entire replies, so that we can write replies to reply buffer during executing commands, send replies to clients, and close them later. We also fix some implicit problems. If client output buffer limit is enforced in 'multi/exec', all commands will be executed completely in redis and clients will not read any reply instead of partial replies. Even more, if the client executes 'ACL deluser' the using user in 'multi/exec', it will not read the replies after 'ACL deluser' just like before executing 'client kill' itself in 'multi/exec'. We added some tests for output buffer limit breach during multi-exec and using a pipeline of many small commands rather than one with big response. Co-authored-by: Oran Agra <[email protected]>
57709c4bc663ddcb9313777c551a92dabf07095e
redis
neuralsentry
1
https://github.com/redis/redis
https://github.com/redis/redis/commit/57709c4bc663ddcb9313777c551a92dabf07095e
2020-09-24 21:01:41+08:00
Fix timing issue in slowlog redact test (#10614) * Fix timing issue in slowlog redact test This test failed once in my daily CI (test-sanitizer-address (clang)) ``` *** [err]: SLOWLOG - Some commands can redact sensitive fields in tests/unit/slowlog.tcl Expected 'migrate 127.0.0.1 25649 key 9 5000 AUTH2 (redacted) (redacted)' to match '* key 9 5000 AUTH (redacted)' (context: type eval line 12 cmd {assert_match {* key 9 5000 AUTH (redacted)} [lindex [lindex [r slowlog get] 1] 3]} proc ::test) ``` The reason is that with slowlog-log-slower-than 10000, slowlog get will have a chance to exceed 10ms. Change slowlog-log-slower-than from 10000 to -1, disable it. Also handles a same potentially problematic test above. This is actually the same timing issue as #10432. But also avoid repeated calls to `SLOWLOG GET`
a6b3ce28a8050b257659db479a3c8f1d38edbfd1
redis
neuralsentry
0
https://github.com/redis/redis
https://github.com/redis/redis/commit/a6b3ce28a8050b257659db479a3c8f1d38edbfd1
2022-04-24 17:16:30+08:00
Streams: add test cases for XADD/XTRIM maxlen
60acac4cd02913385c461465d4cca06d6c015ba7
redis
neuralsentry
0
https://github.com/redis/redis
https://github.com/redis/redis/commit/60acac4cd02913385c461465d4cca06d6c015ba7
2018-07-18 16:55:25+08:00
Fix integer overflow in _sdsMakeRoomFor (CVE-2021-41099) (#9558) The existing overflow checks handled the greedy growing, but didn't handle a case where the addition of the header size is what causes the overflow.
24cc0b984d4ed5045c6ff125b0e619b6ce5ea9c6
redis
neuralsentry
1
https://github.com/redis/redis
https://github.com/redis/redis/commit/24cc0b984d4ed5045c6ff125b0e619b6ce5ea9c6
2021-10-04 16:11:09+08:00
tests/valgrind: don't use debug restart (#7404) * tests/valgrind: don't use debug restart DEBUG REATART causes two issues: 1. it uses execve which replaces the original process and valgrind doesn't have a chance to check for errors, so leaks go unreported. 2. valgrind report invalid calls to close() which we're unable to resolve. So now the tests use restart_server mechanism in the tests, that terminates the old server and starts a new one, new PID, but same stdout, stderr. since the stderr can contain two or more valgrind report, it is not enough to just check for the absence of leaks, we also need to check for some known errors, we do both, and fail if we either find an error, or can't find a report saying there are no leaks. other changes: - when killing a server that was already terminated we check for leaks too. - adding DEBUG LEAK which was used to test it. - adding --trace-children to valgrind, although no longer needed. - since the stdout contains two or more runs, we need slightly different way of checking if the new process is up (explicitly looking for the new PID) - move the code that handles --wait-server to happen earlier (before watching the startup message in the log), and serve the restarted server too. * squashme - CR fixes
69ade87325eedebdb44760af9a8c28e15381888e
redis
neuralsentry
0
https://github.com/redis/redis
https://github.com/redis/redis/commit/69ade87325eedebdb44760af9a8c28e15381888e
2020-07-10 08:26:52+03:00
MEMORY: fix the missing of monitor clients buffers
ce2e0c02fc67658e3e891ff4f732a17db3adfb96
redis
neuralsentry
1
https://github.com/redis/redis
https://github.com/redis/redis/commit/ce2e0c02fc67658e3e891ff4f732a17db3adfb96
2018-05-27 16:34:58+08:00
Fix bugs in CONFIG REWRITE, omitting rename-command and include lines, and inserting comments around module and acl configs (#10761) A regression from #10285 (redis 7.0). CONFIG REWRITE would put lines with: `include`, `rename-command`, `user`, `loadmodule`, and any module specific config in a comment. For ACL `user`, `loadmodule` and module specific configs would be re-inserted at the end (instead of updating existing lines), so the only implication is a messy config file full of comments. But for `rename-command` and `include`, the implication would be that they're now missing, so a server restart would lose them. Co-authored-by: Oran Agra <[email protected]>
cf3323dba473f3849200d294bb0349cd442f2006
redis
neuralsentry
1
https://github.com/redis/redis
https://github.com/redis/redis/commit/cf3323dba473f3849200d294bb0349cd442f2006
2022-06-02 13:36:55+08:00
fix dlopen leak
51a03f6356973a45e3ff7baa675a3e8f2a1be6f9
redis
neuralsentry
1
https://github.com/redis/redis
https://github.com/redis/redis/commit/51a03f6356973a45e3ff7baa675a3e8f2a1be6f9
2017-02-22 14:26:21+09:00
aof: fix the short write
2d73cf236725e0f37394eed20640670a4888d426
redis
neuralsentry
1
https://github.com/redis/redis
https://github.com/redis/redis/commit/2d73cf236725e0f37394eed20640670a4888d426
2017-11-30 10:22:12+08:00
RESP3: fix cases of NULL reported instead of empty aggregate.
06d490342f51cff316588a7a45124cc410b7d050
redis
neuralsentry
1
https://github.com/redis/redis
https://github.com/redis/redis/commit/06d490342f51cff316588a7a45124cc410b7d050
2019-09-02 12:50:47+02:00
Add contribution guidelines for vulnerability reports
99e6e732352c483bcbd9efae7aaf0560f3e88173
redis
neuralsentry
0
https://github.com/redis/redis
https://github.com/redis/redis/commit/99e6e732352c483bcbd9efae7aaf0560f3e88173
2020-07-11 09:37:41-07:00
Fix occasional RM_OpenKey() crashes.
a8e20345480ac83b3bc60b7a6539b099e806d944
redis
neuralsentry
1
https://github.com/redis/redis
https://github.com/redis/redis/commit/a8e20345480ac83b3bc60b7a6539b099e806d944
2016-06-21 10:22:19+03:00
fix redis-rdb-check to provide proper arguments to rdbLoadMillisecondTime due to incorrect forward declaration, it didn't provide all arguments. this lead to random value being read from the stack and return of incorrect time, which in this case doesn't matter since no one uses it.
f31b0405f0023d8916efac3aa9b0c16d4db69fc4
redis
neuralsentry
1
https://github.com/redis/redis
https://github.com/redis/redis/commit/f31b0405f0023d8916efac3aa9b0c16d4db69fc4
2018-06-19 16:54:22+03:00
Merge pull request #2551 from charsyam/feature/sentinel-memory-leak-1 fix sentinel memory leak
827d07f005c8fcdfa839d9541e7f2c2a9d4aa0fd
redis
neuralsentry
1
https://github.com/redis/redis
https://github.com/redis/redis/commit/827d07f005c8fcdfa839d9541e7f2c2a9d4aa0fd
2015-05-04 12:17:41+02:00
Solve race in a BGSAVE test (#10190) This PR attempts to solve two problems that happen sometime in valgrind: `ERR Background save already in progress` and `not bgsave not aborted` the test used to populate the database with DEBUG, which didn't increment the dirty counter, so couldn't trigger an automatic bgsave. then it used a manual bgsave, and aborted it (when it got aborted it populated the dirty counter), and then it tried to do another bgsave. that other bgsave could have failed if the automatic one already started.
795ea011ba8674a9b5e05e79284f6f20a5d0cc03
redis
neuralsentry
0
https://github.com/redis/redis
https://github.com/redis/redis/commit/795ea011ba8674a9b5e05e79284f6f20a5d0cc03
2022-01-26 19:46:02+02:00
fix recently added time sensitive tests failing with valgrind (#7512) interestingly the latency monitor test fails because valgrind is slow enough so that the time inside PEXPIREAT command from the moment of the first mstime() call to get the basetime until checkAlreadyExpired calls mstime() again is more than 1ms, and that test was too sensitive. using this opportunity to speed up the test (unrelated to the failure) the fix is just the longer time passed to PEXPIRE.
e5227aab899628653285478a9d1083e8e8f51b57
redis
neuralsentry
0
https://github.com/redis/redis
https://github.com/redis/redis/commit/e5227aab899628653285478a9d1083e8e8f51b57
2020-07-13 16:40:03+03:00
Lua debugger: fix crash printing nested or deep objects. Example of offending code: > script debug yes OK > eval "local a = {1} a[1] = a\nprint(a)" 0 1) * Stopped at 1, stop reason = step over 2) -> 1 local a = {1} a[1] = a > next 1) * Stopped at 2, stop reason = step over 2) -> 2 print(a) > print ... server crash ... Close #2955.
a75aa4bf92013445f600297d500fe1852a8532af
redis
neuralsentry
1
https://github.com/redis/redis
https://github.com/redis/redis/commit/a75aa4bf92013445f600297d500fe1852a8532af
2016-01-08 09:14:13+01:00
Fix misleading comment (#8690) REPLICAOF actually specifies which master to attach.
4a2c4477c9f1a64a4d8512df9720afecb4b32653
redis
neuralsentry
0
https://github.com/redis/redis
https://github.com/redis/redis/commit/4a2c4477c9f1a64a4d8512df9720afecb4b32653
2021-03-25 10:39:31+08:00
Fix range issues in default value of LIMIT argument to XADD and XTRIM (#9147) This seems to be an unimportant bug that was accidentally generated. If the user does not specify limit in streamParseAddOrTrimArgsOrReply, the initial value of args->limit is 100 * server.stream_node_max_entries, which may lead to out of bounds, and then the default function of limit in xadd becomes invalid (this failure occurs in streamTrim). Additionally, provide sane default for args->limit in case stream_node_max_entries is set to 0. Co-authored-by: lizhaolong.lzl <[email protected]> Co-authored-by: Oran Agra <[email protected]> Co-authored-by: guybe7 <[email protected]>
6476c8e856f790bef24eacd62c10c2df54e33f14
redis
neuralsentry
1
https://github.com/redis/redis
https://github.com/redis/redis/commit/6476c8e856f790bef24eacd62c10c2df54e33f14
2021-06-30 21:55:09+08:00
Fix format strings serverLogObjectDebugInfo to use unsigned (#2927) This doesn't have any real impact, just a cleanup.
ee4bdf10eee1ebf988b6d00ec8bdb212948e364d
redis
neuralsentry
0
https://github.com/redis/redis
https://github.com/redis/redis/commit/ee4bdf10eee1ebf988b6d00ec8bdb212948e364d
2021-07-18 14:27:42+02:00
ACL: default user off should not allow automatic authentication. This fixes issue #7011.
f9c56dbb09fca67e2b82e5aa789cfb7af0b123be
redis
neuralsentry
1
https://github.com/redis/redis
https://github.com/redis/redis/commit/f9c56dbb09fca67e2b82e5aa789cfb7af0b123be
2020-03-20 12:45:48+01:00
Fix acl tests to support `--singledb` flag (#11077) * some of the tests don't clean the key the use * marked tests with `{singledb:skip}` if they use SELECT Co-authored-by: Valentino Geron <[email protected]>
dcafee55a580430b17ca237799a4eff245919c3b
redis
neuralsentry
0
https://github.com/redis/redis
https://github.com/redis/redis/commit/dcafee55a580430b17ca237799a4eff245919c3b
2022-08-03 12:11:32+03:00
Don't perform eviction when re-entering the event loop. Related to #5250.
51b627d916dc7930879558f7c627dc16022612a8
redis
neuralsentry
1
https://github.com/redis/redis
https://github.com/redis/redis/commit/51b627d916dc7930879558f7c627dc16022612a8
2018-09-05 13:10:05+02:00
Merge pull request #7271 from oranagra/fix_valgrind_repl_test fix valgrind test failure in replication test
05db78e9c597f96a9d3800e08e788431a77fb398
redis
neuralsentry
0
https://github.com/redis/redis
https://github.com/redis/redis/commit/05db78e9c597f96a9d3800e08e788431a77fb398
2020-05-18 10:09:39+02:00
Merge pull request #6826 from lifubang/opensslcli fix ssl args check for redis-cli
1012514e0f10aa090eb39c870b82b10724d4d667
redis
neuralsentry
1
https://github.com/redis/redis
https://github.com/redis/redis/commit/1012514e0f10aa090eb39c870b82b10724d4d667
2020-02-06 11:22:20+01:00
Merge pull request #6558 from oranagra/module_testrdb_leak fix leak in module api rdb test
b311a368e0e1f7a8badcd4093311f0a570f71542
redis
neuralsentry
0
https://github.com/redis/redis
https://github.com/redis/redis/commit/b311a368e0e1f7a8badcd4093311f0a570f71542
2019-11-19 11:49:43+01:00
Fix race in CONFIG REWRITE sanity (#8536) server may still be LOADING the RDB when receiving the ping
f745c0181a827927b220caafe6ccd9a5291907f3
redis
neuralsentry
1
https://github.com/redis/redis
https://github.com/redis/redis/commit/f745c0181a827927b220caafe6ccd9a5291907f3
2021-02-23 19:28:03+01:00
fix zslGetRank bug in dead-code (#9246) This fixes an issue with zslGetRank which will happen only if the skiplist data stracture is added two entries with the same element name, this can't happen in redis zsets (we use dict), but in theory this is a bug in the underlaying skiplist code. Fixes #3081 and #4032 Co-authored-by: minjian.cai <[email protected]>
9ca5e8c5470db52f786e1bdec61a067dd6fc289e
redis
neuralsentry
1
https://github.com/redis/redis
https://github.com/redis/redis/commit/9ca5e8c5470db52f786e1bdec61a067dd6fc289e
2021-07-22 13:40:00+03:00
Merge pull request #3686 from dvirsky/fix_lowlevel_zrange fixed stop condition in RM_ZsetRangeNext and RM_ZsetRangePrev
5ad2a94a1696fd7a87070836fdb081c4027730f5
redis
neuralsentry
1
https://github.com/redis/redis
https://github.com/redis/redis/commit/5ad2a94a1696fd7a87070836fdb081c4027730f5
2016-12-16 09:20:47+01:00
Fix sentinel FD leak test, checking the wrong OS name (#8364)
6401920d705aedbfc43409f27c8d8e89bfb0e756
redis
neuralsentry
0
https://github.com/redis/redis
https://github.com/redis/redis/commit/6401920d705aedbfc43409f27c8d8e89bfb0e756
2021-01-20 16:17:20+08:00
fix: call CLIENT INFO from redis module will crash the server (#8560) Because when the RM_Call is invoked. It will create a faker client. The point is client connection is NULL, so server will crash in connGetInfo Co-authored-by: Viktor Söderqvist <[email protected]>
81a55d026ffe6614f78e4042921713112593457c
redis
neuralsentry
1
https://github.com/redis/redis
https://github.com/redis/redis/commit/81a55d026ffe6614f78e4042921713112593457c
2021-03-01 00:18:14-06:00
Sentinel: check Slave INFO state more often when disconnected. During the initial handshake with the master a slave will report to have a very high disconnection time from its master (since technically it was disconnected since forever, so the current UNIX time in seconds is reported). However when the slave is connected again the Sentinel may re-scan the INFO output again only after 10 seconds, which is a long time. During this time Sentinels will consider this instance unable to failover, so a useless delay is introduced. Actaully this hardly happened in the practice because when a slave's master is down, the INFO period for slaves changes to 1 second. However when a manual failover is attempted immediately after adding slaves (like in the case of the Sentinel unit test), this problem may happen. This commit changes the INFO period to 1 second even in the case the slave's master is not down, but the slave reported to be disconnected from the master (by publishing, last time we checked, a master disconnection time field in INFO). This change is required as a result of an unrelated change in the replication code that adds a small delay in the master-slave first synchronization.
3e9ce38b0a9f19d9c5cd792f260c7fdbbe5e98ee
redis
neuralsentry
1
https://github.com/redis/redis
https://github.com/redis/redis/commit/3e9ce38b0a9f19d9c5cd792f260c7fdbbe5e98ee
2016-07-22 10:51:25+02:00
Fix two minor bugs (MIGRATE key args and getKeysUsingCommandTable) (#9455) 1. MIGRATE has a potnetial key arg in argv[3]. It should be reflected in the command table. 2. getKeysUsingCommandTable should never free getKeysResult, it is always freed by the caller) The reason we never encountered this double-free bug is that almost always getKeysResult uses the statis buffer and doesn't allocate a new one.
6aa2285e32a6bc16fe2938bfb40d833db7d3752d
redis
neuralsentry
1
https://github.com/redis/redis
https://github.com/redis/redis/commit/6aa2285e32a6bc16fe2938bfb40d833db7d3752d
2021-09-02 16:19:27+02:00
Fix potential issue with Lua argv caching, module command filter and libc realloc (#11652) TLDR: solve a problem introduced in Redis 7.0.6 (#11541) with RM_CommandFilterArgInsert being called from scripts, which can lead to memory corruption. Libc realloc can return the same pointer even if the size was changed. The code in freeLuaRedisArgv had an assumption that if the pointer didn't change, then the allocation didn't change, and the cache can still be reused. However, if rewriteClientCommandArgument or RM_CommandFilterArgInsert were used, it could be that we realloced the argv array, and the pointer didn't change, then a consecutive command being executed from Lua can use that argv cache reaching beyond its size. This was actually only possible with modules, since the decision to realloc was based on argc, rather than argv_len.
c8052122a2af9b85124a8697488a0c44d66777b8
redis
neuralsentry
1
https://github.com/redis/redis
https://github.com/redis/redis/commit/c8052122a2af9b85124a8697488a0c44d66777b8
2023-01-04 11:03:55+02:00
Fix cluster bus extensions backwards compatibility (#10206) Before this commit, notused1 was incorrectly resized resulting with a clusterMsg that is not backwards compatible as expected.
8013af6f3dcbcc5042f5ab6db07c05fd83058975
redis
neuralsentry
1
https://github.com/redis/redis
https://github.com/redis/redis/commit/8013af6f3dcbcc5042f5ab6db07c05fd83058975
2022-01-30 09:43:37-08:00
Streams: fix XREADGROUP history reading when CG last_id is low. This fixes the issue reported in #5570. This was fixed the hard way, that is, propagating more information to the lower level API about this being a request to read just the history, so that the code is simpler and less likely to regress.
29251f58e279738da6d45c5af3d12f35259f3d45
redis
neuralsentry
1
https://github.com/redis/redis
https://github.com/redis/redis/commit/29251f58e279738da6d45c5af3d12f35259f3d45
2018-11-19 16:41:09+01:00
Fix busy loop in ae.c when timer event is about to fire (#8764) The code used to decide on the next time to wake on a timer with microsecond accuracy, but when deciding to go to sleep it used milliseconds accuracy (with truncation), this means that it would wake up too early, see that there's no timer to process, and go to sleep again for 0ms again and again until the right microsecond arrived. i.e. a timer for 100ms, would sleep for 99ms, but then do a busy loop through the kernel in the last millisecond, triggering many calls to beforeSleep. The fix is to change all the logic in ae.c to work with microseconds, which is good since most of the ae backends support micro (or even nano) seconds. however the epoll backend, doesn't support micro, so to avoid this problem it needs to round upwards, rather than truncate. Issue created by the monotonic timer PR #7644 (redis 6.2) Before that, all the timers in ae.c were in milliseconds (using mstime), so when it requested the backend to sleep till the next timer event, it would have worked ok.
175a9e3199f79305827e826b5d2da3ed5d8a3502
redis
neuralsentry
1
https://github.com/redis/redis
https://github.com/redis/redis/commit/175a9e3199f79305827e826b5d2da3ed5d8a3502
2021-04-13 07:35:03+03:00
Add help message for client setinfo (#11995) The new sub-command was missing from CLIENT HELP Co-authored-by: Binbin <[email protected]>
ccc86a91b7bb4ef84898dadfc9741ecb3aa8eadb
redis
neuralsentry
0
https://github.com/redis/redis
https://github.com/redis/redis/commit/ccc86a91b7bb4ef84898dadfc9741ecb3aa8eadb
2023-04-04 20:56:33+08:00
Add SORT_RO command (#9299) Add a readonly variant of the STORE command, so it can be used on read-only workloads (replica, ACL, etc)
d3356bf614155f2a4352a0630065d715ce073b8a
redis
neuralsentry
0
https://github.com/redis/redis
https://github.com/redis/redis/commit/d3356bf614155f2a4352a0630065d715ce073b8a
2021-08-09 08:40:29+02:00
Modules hooks: FLUSHDB event example.
bc1ef48e5667d945d920ca8da7dd7f799148991d
redis
neuralsentry
0
https://github.com/redis/redis
https://github.com/redis/redis/commit/bc1ef48e5667d945d920ca8da7dd7f799148991d
2019-10-23 10:37:04+02:00
More strict checks and better comments in flushSlaveOutputBuffers(). Related to #6296.
e57067b677bc084b983802aa112b4b1a372e2a10
redis
neuralsentry
1
https://github.com/redis/redis
https://github.com/redis/redis/commit/e57067b677bc084b983802aa112b4b1a372e2a10
2019-08-31 14:46:21+02:00
fix comment typo in redis-cli.c
cd02c5944f178ac8252dce2170990768b428dcf3
redis
neuralsentry
0
https://github.com/redis/redis
https://github.com/redis/redis/commit/cd02c5944f178ac8252dce2170990768b428dcf3
2019-10-25 22:31:55+09:00
Fix error/warning on Arm due to unsigned char. (#10572)
bd8da0ca29b161e5bd47a6a98ce0a7a232ccda90
redis
neuralsentry
1
https://github.com/redis/redis
https://github.com/redis/redis/commit/bd8da0ca29b161e5bd47a6a98ce0a7a232ccda90
2022-04-12 18:55:11+03:00
Fix use-after-free issue in spt_copyenv. (#8088) Seems to have gone unnoticed for a long time, because at least with glibc it will only be triggered if setenv() was called before spt_init, which Redis doesn't. Fixes #8064.
7e5a6313f0add995c723351532d994118e3e8a6d
redis
neuralsentry
1
https://github.com/redis/redis
https://github.com/redis/redis/commit/7e5a6313f0add995c723351532d994118e3e8a6d
2020-11-24 17:58:10+02:00
Security: Cross Protocol Scripting protection. This is an attempt at mitigating problems due to cross protocol scripting, an attack targeting services using line oriented protocols like Redis that can accept HTTP requests as valid protocol, by discarding the invalid parts and accepting the payloads sent, for example, via a POST request. For this to be effective, when we detect POST and Host: and terminate the connection asynchronously, the networking code was modified in order to never process further input. It was later verified that in a pipelined request containing a POST command, the successive commands are not executed.
a81a92ca2ceba364f4bb51efde9284d939e7ff47
redis
neuralsentry
1
https://github.com/redis/redis
https://github.com/redis/redis/commit/a81a92ca2ceba364f4bb51efde9284d939e7ff47
2016-08-03 11:12:13+02:00
Fix invalid memory write on lua stack overflow (CVE-2021-32626) (#9591) When LUA call our C code, by default, the LUA stack has room for 10 elements. In most cases, this is more than enough but sometimes it's not and the caller must verify the LUA stack size before he pushes elements. On 3 places in the code, there was no verification of the LUA stack size. On specific inputs this missing verification could have lead to invalid memory write: 1. On 'luaReplyToRedisReply', one might return a nested reply that will explode the LUA stack. 2. On 'redisProtocolToLuaType', the Redis reply might be deep enough to explode the LUA stack (notice that currently there is no such command in Redis that returns such a nested reply, but modules might do it) 3. On 'ldbRedis', one might give a command with enough arguments to explode the LUA stack (all the arguments will be pushed to the LUA stack) This commit is solving all those 3 issues by calling 'lua_checkstack' and verify that there is enough room in the LUA stack to push elements. In case 'lua_checkstack' returns an error (there is not enough room in the LUA stack and it's not possible to increase the stack), we will do the following: 1. On 'luaReplyToRedisReply', we will return an error to the user. 2. On 'redisProtocolToLuaType' we will exit with panic (we assume this scenario is rare because it can only happen with a module). 3. On 'ldbRedis', we return an error.
0f8b634cd5cdfd77696d34d744dfc25fa97f3b73
redis
neuralsentry
1
https://github.com/redis/redis
https://github.com/redis/redis/commit/0f8b634cd5cdfd77696d34d744dfc25fa97f3b73
2021-10-04 15:17:50+03:00
make replication tests more stable on slow machines solving few replication related tests race conditions which fail on slow machines bugfix in slave buffers test: since the test is executed twice, each time with a different commands count, the threshold for the delta can't be a constant.
ba809f26d4bd81d23fa929d0c018f235ab298564
redis
neuralsentry
0
https://github.com/redis/redis
https://github.com/redis/redis/commit/ba809f26d4bd81d23fa929d0c018f235ab298564
2019-05-05 08:19:52+03:00
Cleanup typos, incorrect comments, and fixed small memory leak in redis-cli (#9153) 1. Remove forward declarations from header files to functions that do not exist: hmsetCommand and rdbSaveTime. 2. Minor phrasing fixes in #9519 3. Add missing sdsfree(title) and fix typo in redis-benchmark. 4. Modify some error comments in some zset commands. 5. Fix copy-paste bug comment in syncWithMaster about `ip-address`.
dd3ac97ffec8af88230275b560ca1f43325a5a9c
redis
neuralsentry
1
https://github.com/redis/redis
https://github.com/redis/redis/commit/dd3ac97ffec8af88230275b560ca1f43325a5a9c
2021-10-03 13:19:33+08:00
Use dummy allocator to make accesses defined as per standard (#11982) ## Issue When we use GCC-12 later or clang 9.0 later to build with `-D_FORTIFY_SOURCE=3`, we can see the following buffer overflow: ``` === REDIS BUG REPORT START: Cut & paste starting from here === 6263:M 06 Apr 2023 08:59:12.915 # Redis 255.255.255 crashed by signal: 6, si_code: -6 6263:M 06 Apr 2023 08:59:12.915 # Crashed running the instruction at: 0x7f03d59efa7c ------ STACK TRACE ------ EIP: /lib/x86_64-linux-gnu/libc.so.6(pthread_kill+0x12c)[0x7f03d59efa7c] Backtrace: /lib/x86_64-linux-gnu/libc.so.6(+0x42520)[0x7f03d599b520] /lib/x86_64-linux-gnu/libc.so.6(pthread_kill+0x12c)[0x7f03d59efa7c] /lib/x86_64-linux-gnu/libc.so.6(raise+0x16)[0x7f03d599b476] /lib/x86_64-linux-gnu/libc.so.6(abort+0xd3)[0x7f03d59817f3] /lib/x86_64-linux-gnu/libc.so.6(+0x896f6)[0x7f03d59e26f6] /lib/x86_64-linux-gnu/libc.so.6(__fortify_fail+0x2a)[0x7f03d5a8f76a] /lib/x86_64-linux-gnu/libc.so.6(+0x1350c6)[0x7f03d5a8e0c6] src/redis-server 127.0.0.1:25111(+0xd5e80)[0x557cddd3be80] src/redis-server 127.0.0.1:25111(feedReplicationBufferWithObject+0x78)[0x557cddd3c768] src/redis-server 127.0.0.1:25111(replicationFeedSlaves+0x1a4)[0x557cddd3cbc4] src/redis-server 127.0.0.1:25111(+0x8721a)[0x557cddced21a] src/redis-server 127.0.0.1:25111(call+0x47a)[0x557cddcf38ea] src/redis-server 127.0.0.1:25111(processCommand+0xbf4)[0x557cddcf4aa4] src/redis-server 127.0.0.1:25111(processInputBuffer+0xe6)[0x557cddd22216] src/redis-server 127.0.0.1:25111(readQueryFromClient+0x3a8)[0x557cddd22898] src/redis-server 127.0.0.1:25111(+0x1b9134)[0x557cdde1f134] src/redis-server 127.0.0.1:25111(aeMain+0x119)[0x557cddce5349] src/redis-server 127.0.0.1:25111(main+0x466)[0x557cddcd6716] /lib/x86_64-linux-gnu/libc.so.6(+0x29d90)[0x7f03d5982d90] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x80)[0x7f03d5982e40] src/redis-server 127.0.0.1:25111(_start+0x25)[0x557cddcd7025] ``` The main reason is that when FORTIFY_SOURCE is enabled, GCC or clang will enhance some common functions, such as `strcpy`, `memcpy`, `fgets`, etc, so that they can detect buffer overflow errors and stop program execution, thus improving the safety of the program. We use `zmalloc_usable_size()` everywhere to use memory blocks, but that is an abuse since the malloc_usable_size() isn't meant for this kind of use, it is for diagnostics only. That is also why the behavior is flaky when built with _FORTIFY_SOURCE, the compiler can sense that we reach outside the allocated block and SIGABRT. ### Solution If we need to use the additional memory we got, we need to use a dummy realloc with `alloc_size` attribute and no inlining, (see `extend_to_usable`) to let the compiler see the large of memory we need to use. This can either be an implicit call inside `z*usable` that returns the size, so that the caller doesn't have any other worry, or it can be a normal zmalloc call which means that if the caller wants to use zmalloc_usable_size it must also use extend_to_usable. ### Changes This PR does the following: 1) rename the current z[try]malloc_usable family to z[try]malloc_internal and don't expose them to users outside zmalloc.c, 2) expose a new set of `z[*]_usable` family that use z[*]_internal and `extend_to_usable()` implicitly, the caller gets the size of the allocation and it is safe to use. 3) go over all the users of `zmalloc_usable_size` and convert them to use the `z[*]_usable` family if possible. 4) in the places where the caller can't use `z[*]_usable` and store the real size, and must still rely on zmalloc_usable_size, we still make sure that the allocation used `z[*]_usable` (which has a call to `extend_to_usable()`) and ignores the returning size, this way a later call to `zmalloc_usable_size` is still safe. [4] was done for module.c and listpack.c, all the others places (sds, reply proto list, replication backlog, client->buf) are using [3]. Co-authored-by: Oran Agra <[email protected]>
e0b378d22b8eb53a5ce87f7b8d36ee63aafa4131
redis
neuralsentry
1
https://github.com/redis/redis
https://github.com/redis/redis/commit/e0b378d22b8eb53a5ce87f7b8d36ee63aafa4131
2023-04-11 01:38:40+08:00
Modules: doc layout improved.
646c958bbd506839f02dbe8801275e11e2657955
redis
neuralsentry
0
https://github.com/redis/redis
https://github.com/redis/redis/commit/646c958bbd506839f02dbe8801275e11e2657955
2016-05-10 18:54:58+02:00
Merge pull request #4215 from lamby/correct-faield-spelling Correct spelling of "faield".
c3806f5b7238b1e11e4b48b8bfb22a8dd0d36c1f
redis
neuralsentry
0
https://github.com/redis/redis
https://github.com/redis/redis/commit/c3806f5b7238b1e11e4b48b8bfb22a8dd0d36c1f
2017-11-28 18:08:32+01:00
Fix overflow of rdbWriteRaw return value (#8306) Saving string of more than 2GB to the RDB file, can result in corrupt RDB, or failure in rdbSave. S
542455ce2afbaffc065afbfdf6578399b8faecda
redis
neuralsentry
1
https://github.com/redis/redis
https://github.com/redis/redis/commit/542455ce2afbaffc065afbfdf6578399b8faecda
2021-01-12 14:22:53+08:00
fix replicationid will not change for server.masterhost==NULL in cluster mode when restart slave
8f7e97258b0b71b907a67b3078fe6374c77b9972
redis
neuralsentry
1
https://github.com/redis/redis
https://github.com/redis/redis/commit/8f7e97258b0b71b907a67b3078fe6374c77b9972
2019-02-27 17:43:05+08:00
Fix child info pipe fd leak when child process gets killed.
440385de143902a77338091cf658d15381e028fa
redis
neuralsentry
1
https://github.com/redis/redis
https://github.com/redis/redis/commit/440385de143902a77338091cf658d15381e028fa
2019-01-21 17:48:45+08:00
fix pipelined WAIT performance issue. If client gets blocked again in `processUnblockedClients`, redis will not send `REPLCONF GETACK *` to slaves untill next eventloop, so the client will be blocked for 100ms by default(10hz) if no other file event fired. move server.get_ack_from_slaves sinppet after `processUnblockedClients`, so that both the first WAIT command that puts client in blocked context and the following WAIT command processed in processUnblockedClients would trigger redis-sever to send `REPLCONF GETACK *`, so that the eventloop would get `REPLCONG ACK <reploffset>` from slaves and unblocked ASAP.
4024bc7eee9b20b2f3bc85fb6f94e243f1a61b9d
redis
neuralsentry
1
https://github.com/redis/redis
https://github.com/redis/redis/commit/4024bc7eee9b20b2f3bc85fb6f94e243f1a61b9d
2019-11-26 10:43:57+08:00
Fix zsetAdd() top comment spelling.
086c1db2d998192d92d923ae2d2fba4f145e152f
redis
neuralsentry
0
https://github.com/redis/redis
https://github.com/redis/redis/commit/086c1db2d998192d92d923ae2d2fba4f145e152f
2020-04-14 11:23:44+02:00
Remove ziplist dead code in object.c (#10751) Remove some dead code in object.c, ziplist is no longer used in 7.0 Some backgrounds: zipmap - hash: replaced by ziplist in #285 ziplist - hash: replaced by listpack in #8887 ziplist - zset: replaced by listpack in #9366 ziplist - list: replaced by quicklist (listpack) in #2143 / #9740 Moved the location of ziplist.h in the server.c
18cb4a7d938d01981e9f6c565532a2056ceb269b
redis
neuralsentry
0
https://github.com/redis/redis
https://github.com/redis/redis/commit/18cb4a7d938d01981e9f6c565532a2056ceb269b
2022-05-22 17:27:54+08:00
add acl related config in sentinel.conf (#7952)
efd17316ab122f5ddd9ecd89a98f30759b076a10
redis
neuralsentry
0
https://github.com/redis/redis
https://github.com/redis/redis/commit/efd17316ab122f5ddd9ecd89a98f30759b076a10
2020-10-28 09:05:00-04:00
Two minor fixes for cluster.c (#11441) clusterNodeClearSlotBit()/clusterNodeSetSlotBit(), only set bit when slot does not exist and clear bit when slot does exist.
ce4ebe6ba858bd6be7cabdc830f5ef30d6fcd37a
redis
neuralsentry
1
https://github.com/redis/redis
https://github.com/redis/redis/commit/ce4ebe6ba858bd6be7cabdc830f5ef30d6fcd37a
2022-11-26 03:58:19+08:00
Redis Functions - Move Lua related variable into luaCtx struct The following variable was renamed: 1. lua_caller -> script_caller 2. lua_time_limit -> script_time_limit 3. lua_timedout -> script_timedout 4. lua_oom -> script_oom 5. lua_disable_deny_script -> script_disable_deny_script 6. in_eval -> in_script The following variables was moved to lctx under eval.c 1. lua 2. lua_client 3. lua_cur_script 4. lua_scripts 5. lua_scripts_mem 6. lua_replicate_commands 7. lua_write_dirty 8. lua_random_dirty 9. lua_multi_emitted 10. lua_repl 11. lua_kill 12. lua_time_start 13. lua_time_snapshot This commit is in a low risk of introducing any issues and it is just moving varibales around and not changing any logic.
e0cd580aefe13e49df802fec5135e4f22d46e758
redis
neuralsentry
0
https://github.com/redis/redis
https://github.com/redis/redis/commit/e0cd580aefe13e49df802fec5135e4f22d46e758
2021-10-05 17:03:12+03:00
Merge pull request #6308 from oranagra/repl-diskless-load-config fix error handling on config parsing of repl-diskless-load
c326f28833c5c31f545f22c58294f0d6e8ee9733
redis
neuralsentry
1
https://github.com/redis/redis
https://github.com/redis/redis/commit/c326f28833c5c31f545f22c58294f0d6e8ee9733
2019-10-04 11:56:08+02:00
Fix misleading error message in XREADGROUP (#11799) XREADGROUP can output a misleading error message regarding use of the $ special ID. Here is the example (with some newlines): ``` redis> xreadgroup group workers worker1 count 1 streams mystream (error) ERR Unbalanced XREAD list of streams: for each stream key an ID or '$' must be specified. redis> xreadgroup group workers worker1 count 1 streams mystream $ (error) ERR The $ ID is meaningless in the context of XREADGROUP: you want to read the history of this consumer by specifying a proper ID, or use the > ID to get new messages. The $ ID would just return an empty result set. redis> xreadgroup group workers worker1 count 1 streams mystream > 1) 1) "mystream" 2) 1) 1) "1673544607848-0" 2) 1) "n" 2) "1" ``` Note that XREADGROUP first returns an error with the following problems in it: - Command name in the error should be XREADGROUP not XREAD. - It recommends using $ as an option for a stream ID, then when you try this (see second XREADGROUP command above), it errors telling you that `$` doesn't make sense in this context even though the previous error message told you to use it Suggest that the command name be fixed in the first message, and the second part error message be amended not to talk about using `$` but `>` instead, this works, see the third and final XREADGROUP example above. Fixes #11730, commit message took from simonprickett. Co-authored-by: Simon Prickett <[email protected]>
312654d5be3e7de60e6a7883d7a8f2f8120dfab6
redis
neuralsentry
0
https://github.com/redis/redis
https://github.com/redis/redis/commit/312654d5be3e7de60e6a7883d7a8f2f8120dfab6
2023-03-08 17:57:32+08:00
fix crash in redis-cli after making cluster backup (#8267) getRDB is "designed" to work in two modes: one for redis-cli --rdb and one for redis-cli --cluster backup. in the later case it uses the hiredis connection from the cluster nodes and it used to free it without nullifying the context, so a later attempt to free the context would crash. I suppose the reason it seems to want to free the hiredis context ASAP is that it wants to disconnect the replica link, so that replication buffers will not be accumulated.
41b2ed2bbc0671e43101feecc48cac26a5e312cb
redis
neuralsentry
1
https://github.com/redis/redis
https://github.com/redis/redis/commit/41b2ed2bbc0671e43101feecc48cac26a5e312cb
2021-01-03 11:56:26+02:00
fix boundary case for _dictNextPower
413d8239dfc9ddc275b6ab87caa3819f7dfb20f8
redis
neuralsentry
1
https://github.com/redis/redis
https://github.com/redis/redis/commit/413d8239dfc9ddc275b6ab87caa3819f7dfb20f8
2015-08-23 16:47:42+08:00
Use typedef'd mstime_t instead of time_t This fixes an overflow on 32-bit systems.
5fa41e0c84e46bb1fa417d6bfb60d9429734fd5f
redis
neuralsentry
1
https://github.com/redis/redis
https://github.com/redis/redis/commit/5fa41e0c84e46bb1fa417d6bfb60d9429734fd5f
2018-11-03 15:13:28-07:00