Skip to content

Commit e51cd7e

Browse files
[AUTO-CHERRYPICK] [AutoPR- Security] Patch sysbench for CVE-2024-25178, CVE-2024-25176 [HIGH] - branch 3.0-dev (microsoft#14339)
Co-authored-by: Azure Linux Security Servicing Account <[email protected]>
1 parent 2225ab8 commit e51cd7e

File tree

3 files changed

+60
-1
lines changed

3 files changed

+60
-1
lines changed

SPECS/sysbench/CVE-2024-25176.patch

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
From 6d48b3888b46553d021d3d43e5cbbd86a5fa0a94 Mon Sep 17 00:00:00 2001
2+
From: Azure Linux Security Servicing Account
3+
4+
Date: Thu, 17 Jul 2025 08:42:39 +0000
5+
Subject: [PATCH] Fix CVE CVE-2024-25176 in sysbench
6+
7+
Upstream Patch Reference: https://github.com/LuaJIT/LuaJIT/commit/343ce0edaf3906a62022936175b2f5410024cbfc.patch
8+
---
9+
third_party/luajit/luajit/src/lj_strfmt_num.c | 3 ++-
10+
1 file changed, 2 insertions(+), 1 deletion(-)
11+
12+
diff --git a/third_party/luajit/luajit/src/lj_strfmt_num.c b/third_party/luajit/luajit/src/lj_strfmt_num.c
13+
index 9271f68..1d4fc7c 100644
14+
--- a/third_party/luajit/luajit/src/lj_strfmt_num.c
15+
+++ b/third_party/luajit/luajit/src/lj_strfmt_num.c
16+
@@ -454,7 +454,8 @@ static char *lj_strfmt_wfnum(SBuf *sb, SFormat sf, lua_Number n, char *p)
17+
prec--;
18+
if (!i) {
19+
if (ndlo == ndhi) { prec = 0; break; }
20+
- lj_strfmt_wuint9(tail, nd[++ndlo]);
21+
+ ndlo = (ndlo + 1) & 0x3f;
22+
+ lj_strfmt_wuint9(tail, nd[ndlo]);
23+
i = 9;
24+
}
25+
}
26+
--
27+
2.45.3
28+

SPECS/sysbench/CVE-2024-25178.patch

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
From 9c8487d3b1aa90b6bd801bdda1b9843159088aaf Mon Sep 17 00:00:00 2001
2+
From: Azure Linux Security Servicing Account
3+
4+
Date: Thu, 17 Jul 2025 08:42:47 +0000
5+
Subject: [PATCH] Fix CVE CVE-2024-25178 in sysbench
6+
7+
Upstream Patch Reference: https://github.com/LuaJIT/LuaJIT/commit/defe61a56751a0db5f00ff3ab7b8f45436ba74c8.patch
8+
---
9+
third_party/luajit/luajit/src/lj_debug.c | 1 +
10+
1 file changed, 1 insertion(+)
11+
12+
diff --git a/third_party/luajit/luajit/src/lj_debug.c b/third_party/luajit/luajit/src/lj_debug.c
13+
index 8319fa1..fc1f15a 100644
14+
--- a/third_party/luajit/luajit/src/lj_debug.c
15+
+++ b/third_party/luajit/luajit/src/lj_debug.c
16+
@@ -63,6 +63,7 @@ static BCPos debug_framepc(lua_State *L, GCfunc *fn, cTValue *nextframe)
17+
if (cf == NULL || (char *)cframe_pc(cf) == (char *)cframe_L(cf))
18+
return NO_BCPOS;
19+
ins = cframe_pc(cf); /* Only happens during error/hook handling. */
20+
+ if (!ins) return NO_BCPOS;
21+
} else {
22+
if (frame_islua(nextframe)) {
23+
ins = frame_pc(nextframe);
24+
--
25+
2.45.3
26+

SPECS/sysbench/sysbench.spec

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Summary: Scriptable database and system performance benchmark
22
Name: sysbench
33
Version: 1.0.20
4-
Release: 5%{?dist}
4+
Release: 6%{?dist}
55
License: GPLv2+
66
Group: Applications/System
77
URL: https://github.com/akopytov/sysbench/
@@ -11,6 +11,8 @@ Source0: https://github.com/akopytov/%{name}/archive/%{version}/%{name}-%
1111
Patch0: enable-python3.patch
1212
Patch1: CVE-2019-19391.patch
1313
Patch2: sysbench-1.0.20-fix_deprecated_egrep_call.patch
14+
Patch3: CVE-2024-25178.patch
15+
Patch4: CVE-2024-25176.patch
1416

1517
BuildRequires: automake
1618
BuildRequires: libaio-devel
@@ -64,6 +66,9 @@ rm -f %{buildroot}%{_docdir}/sysbench/manual.html
6466
%{_datadir}/%{name}
6567

6668
%changelog
69+
* Thu Jul 17 2025 Azure Linux Security Servicing Account <[email protected]> - 1.0.20-6
70+
- Patch for CVE-2024-25178, CVE-2024-25176
71+
6772
* Wed Apr 02 2025 Kanishk Bansal <[email protected]> - 1.0.20-5
6873
- Fix ptest by adding a patch to replace deprecated egrep with grep -E.
6974

0 commit comments

Comments
 (0)