diff --git a/CVE-2025-7700.patch b/CVE-2025-7700.patch new file mode 100644 index 0000000000000000000000000000000000000000..0480d09f37a395aaa6c35439fc92a1da98d836a3 --- /dev/null +++ b/CVE-2025-7700.patch @@ -0,0 +1,38 @@ +From c6e2ccecff5482fbe7aed73a9638c7c70253c2d7 Mon Sep 17 00:00:00 2001 +From: fandeyuan +Date: Tue, 9 Sep 2025 17:11:50 +0800 +Subject: [PATCH] Add check for av_malloc_array() and av_calloc() + +--- + libavcodec/alsdec.c | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +diff --git a/libavcodec/alsdec.c b/libavcodec/alsdec.c +index c64d103..6459ae5 100644 +--- a/libavcodec/alsdec.c ++++ b/libavcodec/alsdec.c +@@ -2119,8 +2119,8 @@ static av_cold int decode_init(AVCodecContext *avctx) + ctx->nbits = av_malloc_array(ctx->cur_frame_length, sizeof(*ctx->nbits)); + ctx->mlz = av_mallocz(sizeof(*ctx->mlz)); + +- if (!ctx->mlz || !ctx->acf || !ctx->shift_value || !ctx->last_shift_value +- || !ctx->last_acf_mantissa || !ctx->raw_mantissa) { ++ if (!ctx->larray || !ctx->nbits || !ctx->mlz || !ctx->acf || !ctx->shift_value ++ || !ctx->last_shift_value || !ctx->last_acf_mantissa || !ctx->raw_mantissa) { + av_log(avctx, AV_LOG_ERROR, "Allocating buffer memory failed.\n"); + return AVERROR(ENOMEM); + } +@@ -2132,6 +2132,10 @@ static av_cold int decode_init(AVCodecContext *avctx) + + for (c = 0; c < channels; ++c) { + ctx->raw_mantissa[c] = av_calloc(ctx->cur_frame_length, sizeof(**ctx->raw_mantissa)); ++ if (!ctx->raw_mantissa[c]) { ++ av_log(avctx, AV_LOG_ERROR, "Allocating buffer memory failed.\n"); ++ return AVERROR(ENOMEM); ++ } + } + } + +-- +2.43.0 + diff --git a/ffmpeg.spec b/ffmpeg.spec index 56fd6fdad1cfde0859b2832a35a91985561bd085..01221a7d021d3508f32cc55e31cbff4a2c8076bd 100644 --- a/ffmpeg.spec +++ b/ffmpeg.spec @@ -62,7 +62,7 @@ Summary: Digital VCR and streaming server Name: ffmpeg%{?flavor} Version: 6.1.1 -Release: 23 +Release: 24 License: GPL-3.0-or-later URL: http://ffmpeg.org/ Source0: http://ffmpeg.org/releases/ffmpeg-%{version}.tar.xz @@ -90,6 +90,7 @@ Patch19: backport-CVE-2024-36613.patch Patch20: CVE-2025-25473.patch Patch21: backport-CVE-2024-35365.patch Patch22: fix-CVE-2025-22919-CVE-2025-22921.patch +Patch23: CVE-2025-7700.patch Requires: %{name}-libs%{?_isa} = %{version}-%{release} %{?_with_cuda:BuildRequires: cuda-minimal-build-%{_cuda_version_rpm} cuda-drivers-devel} @@ -422,6 +423,9 @@ install -pm755 tools/qt-faststart %{buildroot}%{_bindir} %changelog +* Tue Sep 09 2025 Deyuan Fan - 6.1.1-24 +- fix-CVE-2025-7700 + * Tue Jul 2025 happyworker <208suo@208suo.com> - 6.1.1-23 - fix CVE-2025-22919-CVE-2025-22921