diff options
| author | Peter Marko <peter.marko@siemens.com> | 2026-02-03 22:47:17 +0100 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2026-02-27 17:45:06 +0000 |
| commit | 4c8f687fe6e3dd508804f432ba54cc4d6fda1f56 (patch) | |
| tree | 55156fdcb97cced50e2a58f0d481a06d6d8b25f5 | |
| parent | 34deee3e528805c79340860a42cbdb94af67d5c7 (diff) | |
| download | poky-4c8f687fe6e3dd508804f432ba54cc4d6fda1f56.tar.gz | |
libsndfile1: patch CVE-2025-56226
Pick patches from both PRs linked in issue mentioned in NVD report.
(From OE-Core rev: e0ac318128b8f78efddc0b748b1db3e96873c532)
Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 327546cc0f0bdffcbb4be690ee0b9b469db64842)
Signed-off-by: Yoann Congal <yoann.congal@smile.fr>
Signed-off-by: Paul Barker <paul@pbarker.dev>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
3 files changed, 81 insertions, 0 deletions
diff --git a/meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2025-56226-01.patch b/meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2025-56226-01.patch new file mode 100644 index 0000000000..e6e2bc12dd --- /dev/null +++ b/meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2025-56226-01.patch | |||
| @@ -0,0 +1,36 @@ | |||
| 1 | From d9a35ea0d5c64c19dd635ae578e0028df8f66d6a 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 | CVE: CVE-2025-56226 | ||
| 9 | Upstream-Status: Backport [https://github.com/libsndfile/libsndfile/commit/d9a35ea0d5c64c19dd635ae578e0028df8f66d6a] | ||
| 10 | Signed-off-by: Peter Marko <peter.marko@siemens.com> | ||
| 11 | --- | ||
| 12 | src/mpeg_l3_encode.c | 4 ++-- | ||
| 13 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
| 14 | |||
| 15 | diff --git a/src/mpeg_l3_encode.c b/src/mpeg_l3_encode.c | ||
| 16 | index 97324f79..04b1d501 100644 | ||
| 17 | --- a/src/mpeg_l3_encode.c | ||
| 18 | +++ b/src/mpeg_l3_encode.c | ||
| 19 | @@ -87,7 +87,8 @@ mpeg_l3_encoder_init (SF_PRIVATE *psf, int info_tag) | ||
| 20 | if (! (pmpeg->lamef = lame_init ())) | ||
| 21 | return SFE_MALLOC_FAILED ; | ||
| 22 | |||
| 23 | - pmpeg->compression = -1.0 ; /* Unset */ | ||
| 24 | + psf->codec_close = mpeg_l3_encoder_close ; /* Set psf->codec_close early*/ | ||
| 25 | + pmpeg->compression = -1.0 ; /* Unset */ | ||
| 26 | |||
| 27 | lame_set_in_samplerate (pmpeg->lamef, psf->sf.samplerate) ; | ||
| 28 | lame_set_num_channels (pmpeg->lamef, psf->sf.channels) ; | ||
| 29 | @@ -115,7 +116,6 @@ mpeg_l3_encoder_init (SF_PRIVATE *psf, int info_tag) | ||
| 30 | } | ||
| 31 | |||
| 32 | psf->sf.seekable = 0 ; | ||
| 33 | - psf->codec_close = mpeg_l3_encoder_close ; | ||
| 34 | psf->byterate = mpeg_l3_encoder_byterate ; | ||
| 35 | psf->datalength = 0 ; | ||
| 36 | |||
diff --git a/meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2025-56226-02.patch b/meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2025-56226-02.patch new file mode 100644 index 0000000000..077200be6b --- /dev/null +++ b/meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2025-56226-02.patch | |||
| @@ -0,0 +1,43 @@ | |||
| 1 | From 68f6c16fe1407eff4cdde158566694c3ed666c2f 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:26:24 +0800 | ||
| 4 | Subject: [PATCH] Update sndfile-convert.c | ||
| 5 | |||
| 6 | fix memoryLeak in sndfile-conver.c | ||
| 7 | |||
| 8 | CVE: CVE-2025-56226 | ||
| 9 | Upstream-Status: Backport [https://github.com/libsndfile/libsndfile/commit/68f6c16fe1407eff4cdde158566694c3ed666c2f] | ||
| 10 | Signed-off-by: Peter Marko <peter.marko@siemens.com> | ||
| 11 | --- | ||
| 12 | programs/sndfile-convert.c | 4 ++++ | ||
| 13 | 1 file changed, 4 insertions(+) | ||
| 14 | |||
| 15 | diff --git a/programs/sndfile-convert.c b/programs/sndfile-convert.c | ||
| 16 | index 95f59d3c..a9f0cfac 100644 | ||
| 17 | --- a/programs/sndfile-convert.c | ||
| 18 | +++ b/programs/sndfile-convert.c | ||
| 19 | @@ -301,6 +301,7 @@ main (int argc, char * argv []) | ||
| 20 | |||
| 21 | if ((sfinfo.format = sfe_file_type_of_ext (outfilename, sfinfo.format)) == 0) | ||
| 22 | { printf ("Error : Not able to determine output file type for %s.\n", outfilename) ; | ||
| 23 | + sf_close (infile) ; | ||
| 24 | return 1 ; | ||
| 25 | } ; | ||
| 26 | |||
| 27 | @@ -344,6 +345,7 @@ main (int argc, char * argv []) | ||
| 28 | /* Open the output file. */ | ||
| 29 | if ((outfile = sf_open (outfilename, SFM_WRITE, &sfinfo)) == NULL) | ||
| 30 | { printf ("Not able to open output file %s : %s\n", outfilename, sf_strerror (NULL)) ; | ||
| 31 | + sf_close (infile) ; | ||
| 32 | return 1 ; | ||
| 33 | } ; | ||
| 34 | |||
| 35 | @@ -360,6 +362,8 @@ main (int argc, char * argv []) | ||
| 36 | || (infileminor == SF_FORMAT_MPEG_LAYER_III) || (outfileminor == SF_FORMAT_MPEG_LAYER_III)) | ||
| 37 | { if (sfe_copy_data_fp (outfile, infile, sfinfo.channels, normalize) != 0) | ||
| 38 | { printf ("Error : Not able to decode input file %s.\n", infilename) ; | ||
| 39 | + sf_close (infile) ; | ||
| 40 | + sf_close (outfile) ; | ||
| 41 | return 1 ; | ||
| 42 | } ; | ||
| 43 | } | ||
diff --git a/meta/recipes-multimedia/libsndfile/libsndfile1_1.2.2.bb b/meta/recipes-multimedia/libsndfile/libsndfile1_1.2.2.bb index 2a1b96d5e7..4cf4237573 100644 --- a/meta/recipes-multimedia/libsndfile/libsndfile1_1.2.2.bb +++ b/meta/recipes-multimedia/libsndfile/libsndfile1_1.2.2.bb | |||
| @@ -11,6 +11,8 @@ SRC_URI = "${GITHUB_BASE_URI}/download/${PV}/libsndfile-${PV}.tar.xz \ | |||
| 11 | file://noopus.patch \ | 11 | file://noopus.patch \ |
| 12 | file://cve-2022-33065.patch \ | 12 | file://cve-2022-33065.patch \ |
| 13 | file://CVE-2024-50612.patch \ | 13 | file://CVE-2024-50612.patch \ |
| 14 | file://CVE-2025-56226-01.patch \ | ||
| 15 | file://CVE-2025-56226-02.patch \ | ||
| 14 | " | 16 | " |
| 15 | GITHUB_BASE_URI = "https://github.com/libsndfile/libsndfile/releases/" | 17 | GITHUB_BASE_URI = "https://github.com/libsndfile/libsndfile/releases/" |
| 16 | 18 | ||
