Skip to content

Commit 7ebb2ef

Browse files
[AutoPR- Security] Patch libsndfile for CVE-2025-56226 [MEDIUM] (#15572)
1 parent b6662b8 commit 7ebb2ef

2 files changed

Lines changed: 43 additions & 1 deletion

File tree

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
From 2a2283c82465326dafeb5b5440614bc3532e3936 Mon Sep 17 00:00:00 2001
2+
From: Sisyphus-wang <43361974+Sisyphus-wang@users.noreply.github.com>
3+
Date: Fri, 11 Jul 2025 15:14:48 +0800
4+
Subject: [PATCH] Update mpeg_l3_encode.c
5+
6+
fix memoryLeak bug
7+
8+
Signed-off-by: Azure Linux Security Servicing Account <azurelinux-security@microsoft.com>
9+
Upstream-reference: https://github.com/libsndfile/libsndfile/commit/d9a35ea0d5c64c19dd635ae578e0028df8f66d6a.patch
10+
---
11+
src/mpeg_l3_encode.c | 4 ++--
12+
1 file changed, 2 insertions(+), 2 deletions(-)
13+
14+
diff --git a/src/mpeg_l3_encode.c b/src/mpeg_l3_encode.c
15+
index 97324f7..04b1d50 100644
16+
--- a/src/mpeg_l3_encode.c
17+
+++ b/src/mpeg_l3_encode.c
18+
@@ -87,7 +87,8 @@ mpeg_l3_encoder_init (SF_PRIVATE *psf, int info_tag)
19+
if (! (pmpeg->lamef = lame_init ()))
20+
return SFE_MALLOC_FAILED ;
21+
22+
- pmpeg->compression = -1.0 ; /* Unset */
23+
+ psf->codec_close = mpeg_l3_encoder_close ; /* Set psf->codec_close early*/
24+
+ pmpeg->compression = -1.0 ; /* Unset */
25+
26+
lame_set_in_samplerate (pmpeg->lamef, psf->sf.samplerate) ;
27+
lame_set_num_channels (pmpeg->lamef, psf->sf.channels) ;
28+
@@ -115,7 +116,6 @@ mpeg_l3_encoder_init (SF_PRIVATE *psf, int info_tag)
29+
}
30+
31+
psf->sf.seekable = 0 ;
32+
- psf->codec_close = mpeg_l3_encoder_close ;
33+
psf->byterate = mpeg_l3_encoder_byterate ;
34+
psf->datalength = 0 ;
35+
36+
--
37+
2.45.4
38+

SPECS/libsndfile/libsndfile.spec

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Summary: Library for reading and writing sound files
22
Name: libsndfile
33
Version: 1.2.2
4-
Release: 3%{?dist}
4+
Release: 4%{?dist}
55
License: BSD AND GPLv2+ AND LGPLv2+ AND MIT
66
Vendor: Microsoft Corporation
77
Distribution: Azure Linux
@@ -16,6 +16,7 @@ Patch1: revert.patch
1616
Patch100: CVE-2018-13419.nopatch
1717
Patch101: CVE-2022-33065.patch
1818
Patch102: CVE-2024-50612.patch
19+
Patch103: CVE-2025-56226.patch
1920

2021
BuildRequires: alsa-lib-devel
2122
BuildRequires: autogen
@@ -140,6 +141,9 @@ LD_LIBRARY_PATH=$PWD/src/.libs make check
140141
%{_libdir}/pkgconfig/sndfile.pc
141142

142143
%changelog
144+
* Sat Jan 24 2026 Azure Linux Security Servicing Account <azurelinux-security@microsoft.com> - 1.2.2-4
145+
- Patch for CVE-2025-56226
146+
143147
* Tue Jan 07 2025 Muhammad Falak <mwani@microsoft.com> - 1.2.2-3
144148
- Patch CVE-2024-50612
145149

0 commit comments

Comments
 (0)