From 7a72ebf592ecf5dc186f198b857cc1c88c11a4aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E6=A2=81=E9=B9=8F=E5=A0=83?= Date: Thu, 9 Oct 2025 03:58:31 +0000 Subject: [PATCH] fix CVE-2025-49844 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 张梁鹏堃 --- CVE-2025-49844.patch | 32 ++++++++++++++++++++++++++++++++ redis6.spec | 7 ++++++- 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 CVE-2025-49844.patch diff --git a/CVE-2025-49844.patch b/CVE-2025-49844.patch new file mode 100644 index 0000000..af548af --- /dev/null +++ b/CVE-2025-49844.patch @@ -0,0 +1,32 @@ +From d5728cb5795c966c5b5b1e0f0ac576a7e69af539 Mon Sep 17 00:00:00 2001 +From: Mincho Paskalev +Date: Mon, 23 Jun 2025 11:41:37 +0300 +Subject: [PATCH] Lua script may lead to remote code execution (CVE-2025-49844) + +--- + deps/lua/src/lparser.c | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/deps/lua/src/lparser.c b/deps/lua/src/lparser.c +index dda7488dcad..ee7d90c90d7 100644 +--- a/deps/lua/src/lparser.c ++++ b/deps/lua/src/lparser.c +@@ -384,13 +384,17 @@ Proto *luaY_parser (lua_State *L, ZIO *z, Mbuffer *buff, const char *name) { + struct LexState lexstate; + struct FuncState funcstate; + lexstate.buff = buff; +- luaX_setinput(L, &lexstate, z, luaS_new(L, name)); ++ TString *tname = luaS_new(L, name); ++ setsvalue2s(L, L->top, tname); ++ incr_top(L); ++ luaX_setinput(L, &lexstate, z, tname); + open_func(&lexstate, &funcstate); + funcstate.f->is_vararg = VARARG_ISVARARG; /* main func. is always vararg */ + luaX_next(&lexstate); /* read first token */ + chunk(&lexstate); + check(&lexstate, TK_EOS); + close_func(&lexstate); ++ --L->top; + lua_assert(funcstate.prev == NULL); + lua_assert(funcstate.f->nups == 0); + lua_assert(lexstate.fs == NULL); diff --git a/redis6.spec b/redis6.spec index 62bf6d4..49b6bd2 100644 --- a/redis6.spec +++ b/redis6.spec @@ -6,7 +6,7 @@ %global Pname redis Name: redis6 Version: 6.2.7 -Release: 3 +Release: 4 Summary: A persistent key-value database License: BSD and MIT URL: https://redis.io @@ -22,6 +22,7 @@ Source10: https://github.com/%{Pname}/%{Pname}-doc/archive/%{doc_comm Patch0001: Modify-aarch64-architecture-jemalloc-page-size-from-from-4k-to-64k.patch Patch0003: Add-loongarch64-support.patch Patch0004: Update-config.guess-and-config.sub.patch +Patch0005: CVE-2025-49844.patch BuildRequires: make gcc %if %{with tests} @@ -88,6 +89,7 @@ tar -xvf %{SOURCE10} %patch0003 -p1 %patch0004 -p1 %endif +%patch0005 -p1 mv ../%{Pname}-doc-%{doc_commit} doc mv deps/lua/COPYRIGHT COPYRIGHT-lua mv deps/jemalloc/COPYING COPYING-jemalloc @@ -216,6 +218,9 @@ fi %{_docdir}/%{Pname} %changelog +* Thu Oct 09 2025 zhangliangpengkun - 6.2.7-4 +- fix CVE-2025-49844 + * Wed Dec 20 2023 xiexing - 6.2.7-3 - add Conflicts with redis and redis5 -- Gitee