Skip to content

Commit 83cbbff

Browse files
[AutoPR- Security] Patch mysql for CVE-2025-62813 [MEDIUM] (microsoft#14935)
1 parent 6f762de commit 83cbbff

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 72cf772c8e6651232c812dcc5488e9c7ee91b615 Mon Sep 17 00:00:00 2001
2+
From: AllSpark <[email protected]>
3+
Date: Tue, 28 Oct 2025 05:29:52 +0000
4+
Subject: [PATCH] fix(lz4frame): improve error handling when passing NULL
5+
pointers to functions.
6+
7+
- LZ4F_createCDict_advanced: Check for NULL dictBuffer and error on allocation failure.
8+
- LZ4F_getFrameInfo: Add assertions and RETURN_ERROR_IF guards for NULL frameInfoPtr and srcSizePtr.
9+
10+
Preserve original comments and formatting from upstream patch.
11+
12+
Signed-off-by: Azure Linux Security Servicing Account <[email protected]>
13+
Upstream-reference: AI Backport of https://github.com/lz4/lz4/pull/1593.patch
14+
---
15+
extra/lz4/lz4-1.10.0/lib/lz4frame.c | 15 +++++++++++++--
16+
1 file changed, 13 insertions(+), 2 deletions(-)
17+
18+
diff --git a/extra/lz4/lz4-1.10.0/lib/lz4frame.c b/extra/lz4/lz4-1.10.0/lib/lz4frame.c
19+
index f89c0557..35ac7545 100644
20+
--- a/extra/lz4/lz4-1.10.0/lib/lz4frame.c
21+
+++ b/extra/lz4/lz4-1.10.0/lib/lz4frame.c
22+
@@ -539,9 +539,15 @@ LZ4F_CDict*
23+
LZ4F_createCDict_advanced(LZ4F_CustomMem cmem, const void* dictBuffer, size_t dictSize)
24+
{
25+
const char* dictStart = (const char*)dictBuffer;
26+
- LZ4F_CDict* const cdict = (LZ4F_CDict*)LZ4F_malloc(sizeof(*cdict), cmem);
27+
+ LZ4F_CDict* cdict = NULL;
28+
+
29+
DEBUGLOG(4, "LZ4F_createCDict_advanced");
30+
- if (!cdict) return NULL;
31+
+
32+
+ if (!dictStart)
33+
+ return NULL;
34+
+ cdict = (LZ4F_CDict*)LZ4F_malloc(sizeof(*cdict), cmem);
35+
+ if (!cdict)
36+
+ return NULL;
37+
cdict->cmem = cmem;
38+
if (dictSize > 64 KB) {
39+
dictStart += dictSize - 64 KB;
40+
@@ -1480,12 +1486,17 @@ size_t LZ4F_headerSize(const void* src, size_t srcSize)
41+
* @return : an hint about how many srcSize bytes LZ4F_decompress() expects for next call,
42+
* or an error code which can be tested using LZ4F_isError()
43+
* note 1 : in case of error, dctx is not modified. Decoding operations can resume from where they stopped.
44+
+
45+
* note 2 : frame parameters are *copied into* an already allocated LZ4F_frameInfo_t structure.
46+
*/
47+
LZ4F_errorCode_t LZ4F_getFrameInfo(LZ4F_dctx* dctx,
48+
LZ4F_frameInfo_t* frameInfoPtr,
49+
const void* srcBuffer, size_t* srcSizePtr)
50+
{
51+
+ assert(dctx != NULL);
52+
+ RETURN_ERROR_IF(frameInfoPtr == NULL, parameter_null);
53+
+ RETURN_ERROR_IF(srcSizePtr == NULL, parameter_null);
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
@@ -3,7 +3,7 @@
33
Summary: MySQL.
44
Name: mysql
55
Version: 8.0.44
6-
Release: 1%{?dist}
6+
Release: 2%{?dist}
77
License: GPLv2 with exceptions AND LGPLv2 AND BSD
88
Vendor: Microsoft Corporation
99
Distribution: Azure Linux
@@ -14,6 +14,7 @@ Source0: https://dev.mysql.com/get/Downloads/MySQL-%{majmin}/%{name}-boos
1414
# ciphers unavailable.
1515
Patch1: fix-tests-for-unsupported-chacha-ciphers.patch
1616
Patch2: CVE-2012-2677.patch
17+
Patch3: CVE-2025-62813.patch
1718
BuildRequires: cmake
1819
BuildRequires: libtirpc-devel
1920
BuildRequires: openssl-devel
@@ -113,6 +114,9 @@ sudo -u test ctest || { cat Testing/Temporary/LastTest.log || echo 'No log found
113114
%{_libdir}/pkgconfig/mysqlclient.pc
114115

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

0 commit comments

Comments
 (0)