Skip to content

Commit 9418303

Browse files
[AutoPR- Security] Patch mysql for CVE-2025-62813 [MEDIUM] (microsoft#14933)
1 parent bdd91d4 commit 9418303

File tree

2 files changed

+65
-1
lines changed

2 files changed

+65
-1
lines changed

SPECS/mysql/CVE-2025-62813.patch

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
From 8c26ee46da1cca4559c8b9da023c06ab5a2fb2c8 Mon Sep 17 00:00:00 2001
2+
From: AllSpark <[email protected]>
3+
Date: Mon, 27 Oct 2025 18:38:03 +0000
4+
Subject: [PATCH] fix(null): improve error handlings when passing a null
5+
pointer to some functions from lz4frame
6+
7+
- LZ4F_createCDict_advanced: guard null dictBuffer and proper allocation check
8+
- LZ4F_getFrameInfo: validate input pointers before use
9+
- frametest: adjust cdict creation order and null check (not present in this tree)
10+
11+
Signed-off-by: Azure Linux Security Servicing Account <[email protected]>
12+
Upstream-reference: AI Backport of https://github.com/lz4/lz4/pull/1593.patch
13+
---
14+
extra/lz4/lz4-1.10.0/lib/lz4frame.c | 16 ++++++++++++++--
15+
1 file changed, 14 insertions(+), 2 deletions(-)
16+
17+
diff --git a/extra/lz4/lz4-1.10.0/lib/lz4frame.c b/extra/lz4/lz4-1.10.0/lib/lz4frame.c
18+
index f89c055..a00b31a 100644
19+
--- a/extra/lz4/lz4-1.10.0/lib/lz4frame.c
20+
+++ b/extra/lz4/lz4-1.10.0/lib/lz4frame.c
21+
@@ -539,9 +539,15 @@ LZ4F_CDict*
22+
LZ4F_createCDict_advanced(LZ4F_CustomMem cmem, const void* dictBuffer, size_t dictSize)
23+
{
24+
const char* dictStart = (const char*)dictBuffer;
25+
- LZ4F_CDict* const cdict = (LZ4F_CDict*)LZ4F_malloc(sizeof(*cdict), cmem);
26+
+ LZ4F_CDict* cdict = NULL;
27+
+
28+
DEBUGLOG(4, "LZ4F_createCDict_advanced");
29+
- if (!cdict) return NULL;
30+
+
31+
+ if (!dictStart)
32+
+ return NULL;
33+
+ cdict = (LZ4F_CDict*)LZ4F_malloc(sizeof(*cdict), cmem);
34+
+ if (!cdict)
35+
+ return NULL;
36+
cdict->cmem = cmem;
37+
if (dictSize > 64 KB) {
38+
dictStart += dictSize - 64 KB;
39+
@@ -1480,12 +1486,18 @@ size_t LZ4F_headerSize(const void* src, size_t srcSize)
40+
* @return : an hint about how many srcSize bytes LZ4F_decompress() expects for next call,
41+
* or an error code which can be tested using LZ4F_isError()
42+
* note 1 : in case of error, dctx is not modified. Decoding operations can resume from where they stopped.
43+
+
44+
* note 2 : frame parameters are *copied into* an already allocated LZ4F_frameInfo_t structure.
45+
*/
46+
LZ4F_errorCode_t LZ4F_getFrameInfo(LZ4F_dctx* dctx,
47+
LZ4F_frameInfo_t* frameInfoPtr,
48+
const void* srcBuffer, size_t* srcSizePtr)
49+
{
50+
+ assert(dctx != NULL);
51+
+ RETURN_ERROR_IF(frameInfoPtr == NULL, parameter_null);
52+
+ RETURN_ERROR_IF(srcSizePtr == NULL, parameter_null);
53+
+
54+
+
55+
LZ4F_STATIC_ASSERT(dstage_getFrameHeader < dstage_storeFrameHeader);
56+
if (dctx->dStage > dstage_storeFrameHeader) {
57+
/* frameInfo already decoded */
58+
--
59+
2.45.4
60+

SPECS/mysql/mysql.spec

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Summary: MySQL.
22
Name: mysql
33
Version: 8.0.44
4-
Release: 1%{?dist}
4+
Release: 2%{?dist}
55
License: GPLv2 with exceptions AND LGPLv2 AND BSD
66
Vendor: Microsoft Corporation
77
Distribution: Mariner
@@ -14,6 +14,7 @@ Patch1: CVE-2024-2410.patch
1414
# AZL's OpenSSL builds with the "no-chacha" option making all ChaCha
1515
# ciphers unavailable.
1616
Patch2: fix-tests-for-unsupported-chacha-ciphers.patch
17+
Patch3: CVE-2025-62813.patch
1718
BuildRequires: cmake
1819
BuildRequires: libtirpc-devel
1920
BuildRequires: openssl-devel
@@ -114,6 +115,9 @@ fi
114115
%{_libdir}/pkgconfig/mysqlclient.pc
115116

116117
%changelog
118+
* Mon Oct 27 2025 Azure Linux Security Servicing Account <[email protected]> - 8.0.44-2
119+
- Patch for CVE-2025-62813
120+
117121
* Wed Oct 22 2025 Kanishk Bansal <[email protected]> - 8.0.44-1
118122
- Upgrade to 8.0.44 for CVE-2025-53069, CVE-2025-53042, CVE-2025-53044, CVE-2025-53040,
119123
CVE-2025-53062, CVE-2025-53053, CVE-2025-53045, CVE-2025-53054

0 commit comments

Comments
 (0)