Redis is an open source, in-memory database that persists on disk. An authenticated user may use a specially crafted Lua script to manipulate the garbage collector and potentially lead to remote code execution. The problem is fixed in 7.4.2, 7.2.7, and 6.2.17. An additional workaround to mitigate the problem without patching the redis-server executable is to prevent users from executing Lua scripts. This can be done using ACL to restrict EVAL and EVALSHA commands.
Referencing memory after it has been freed can cause a program to crash, use unexpected values, or execute code.
Name | Vendor | Start Version | End Version |
---|---|---|---|
Discovery 1 for RHEL 9 | RedHat | discovery/discovery-server-rhel9:1.12.0-1 | * |
Discovery 1 for RHEL 9 | RedHat | discovery/discovery-ui-rhel9:1.12.0-1 | * |
Red Hat Enterprise Linux 8 | RedHat | redis:6-8100020250113083959.489197e6 | * |
Red Hat Enterprise Linux 8.4 Advanced Mission Critical Update Support | RedHat | redis:6-8040020250123095605.522a0ee4 | * |
Red Hat Enterprise Linux 8.4 Telecommunications Update Service | RedHat | redis:6-8040020250123095605.522a0ee4 | * |
Red Hat Enterprise Linux 8.4 Update Services for SAP Solutions | RedHat | redis:6-8040020250123095605.522a0ee4 | * |
Red Hat Enterprise Linux 8.6 Advanced Mission Critical Update Support | RedHat | redis:6-8060020250122114132.ad008a3a | * |
Red Hat Enterprise Linux 8.6 Telecommunications Update Service | RedHat | redis:6-8060020250122114132.ad008a3a | * |
Red Hat Enterprise Linux 8.6 Update Services for SAP Solutions | RedHat | redis:6-8060020250122114132.ad008a3a | * |
Red Hat Enterprise Linux 8.8 Extended Update Support | RedHat | redis:6-8080020250120175236.63b34585 | * |
Red Hat Enterprise Linux 9 | RedHat | redis:7-9050020250115104757.9 | * |
Red Hat Enterprise Linux 9 | RedHat | redis-0:6.2.17-1.el9_5 | * |
Red Hat Enterprise Linux 9.0 Update Services for SAP Solutions | RedHat | redis-0:6.2.6-1.el9_0.1 | * |
Red Hat Enterprise Linux 9.2 Extended Update Support | RedHat | redis-0:6.2.7-1.el9_2.1 | * |
Red Hat Enterprise Linux 9.4 Extended Update Support | RedHat | redis-0:6.2.7-1.el9_4.1 | * |
Red Hat Enterprise Linux 9.4 Extended Update Support | RedHat | redis:7-9040020250120173627.9 | * |
The use of previously-freed memory can have any number of adverse consequences, ranging from the corruption of valid data to the execution of arbitrary code, depending on the instantiation and timing of the flaw. The simplest way data corruption may occur involves the system’s reuse of the freed memory. Use-after-free errors have two common and sometimes overlapping causes:
In this scenario, the memory in question is allocated to another pointer validly at some point after it has been freed. The original pointer to the freed memory is used again and points to somewhere within the new allocation. As the data is changed, it corrupts the validly used memory; this induces undefined behavior in the process. If the newly allocated data happens to hold a class, in C++ for example, various function pointers may be scattered within the heap data. If one of these function pointers is overwritten with an address to valid shellcode, execution of arbitrary code can be achieved.