From 8ec2a2c630610fe1cf48061af350cfe0e684d55fb8855086f3112f91d6e08704 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Wed, 3 Jul 2024 07:45:28 +0000 Subject: [PATCH] Replace duplicate metadata; use form from git-format-patch OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/ffmpeg-7?expand=0&rev=4 --- ffmpeg-7-CVE-2024-32228.patch | 37 ++++++++++++++++------------------- ffmpeg-7-CVE-2024-32230.patch | 20 ++++++++----------- ffmpeg-7.spec | 2 -- 3 files changed, 25 insertions(+), 34 deletions(-) diff --git a/ffmpeg-7-CVE-2024-32228.patch b/ffmpeg-7-CVE-2024-32228.patch index 1394ae9..65ba077 100644 --- a/ffmpeg-7-CVE-2024-32228.patch +++ b/ffmpeg-7-CVE-2024-32228.patch @@ -1,27 +1,24 @@ -From: Cliff Zhao -Date: 2024-07-02 21:28:32 +0100 +From 459648761f5412acdc3317d5bac982ceaa257584 Mon Sep 17 00:00:00 2001 +From: Niklas Haas +Date: Sat Apr 6 13:11:09 2024 +0200 Subject: avcodec/hevcdec: fix segfault on invalid film grain metadata -References: CVE-2024-32228 bsc#1227277 +References: CVE-2024-32228 +References: https://bugzilla.opensuse.org/1227277 Upstream: Backport from upstream -commit 459648761f5412acdc3317d5bac982ceaa257584 -Author: Niklas Haas -Date: Sat Apr 6 13:11:09 2024 +0200 - avcodec/hevcdec: fix segfault on invalid film grain metadata - - Invalid input files may contain film grain metadata which survives - ff_h274_film_grain_params_supported() but does not pass - av_film_grain_params_select(), leading to a SIGSEGV on hevc_frame_end(). - - Fix this by duplicating the av_film_grain_params_select() check at frame - init time. - - An alternative solution here would be to defer the incompatibility check - to hevc_frame_end(), but this has the downside of allocating a film - grain buffer even when we already know we can't apply film grain. - - Fixes: https://trac.ffmpeg.org/ticket/10951 +Invalid input files may contain film grain metadata which survives +ff_h274_film_grain_params_supported() but does not pass +av_film_grain_params_select(), leading to a SIGSEGV on hevc_frame_end(). + +Fix this by duplicating the av_film_grain_params_select() check at frame +init time. + +An alternative solution here would be to defer the incompatibility check +to hevc_frame_end(), but this has the downside of allocating a film +grain buffer even when we already know we can't apply film grain. + +Fixes: https://trac.ffmpeg.org/ticket/10951 --- ffmpeg-7.0/libavcodec/hevcdec.c 2024-04-05 07:22:59.000000000 +0800 +++ ffmpeg-7.0_new/libavcodec/hevcdec.c 2024-07-02 22:48:49.293996651 +0800 diff --git a/ffmpeg-7-CVE-2024-32230.patch b/ffmpeg-7-CVE-2024-32230.patch index f6b0b22..abe1c31 100644 --- a/ffmpeg-7-CVE-2024-32230.patch +++ b/ffmpeg-7-CVE-2024-32230.patch @@ -1,18 +1,14 @@ -From: Cliff Zhao -Date: 2024-07-02 21:52:18 +0100 -Subject: avcodec/mpegvideo_enc: Fix 1 line and one column images -References: CVE-2024-32230 bsc#1227296 -Upstream: Backport from upstream - -commit 96449cfeaeb95fcfd7a2b8d9ccf7719e97471ed1 +From 96449cfeaeb95fcfd7a2b8d9ccf7719e97471ed1 Mon Sep 17 00:00:00 2001 Author: Michael Niedermayer Date: Mon Apr 8 18:38:42 2024 +0200 +Subject: avcodec/mpegvideo_enc: Fix 1 line and one column images +References: CVE-2024-32230 +References: https://bugzilla.opensuse.org/1227296 +Upstream: Backport from upstream - avcodec/mpegvideo_enc: Fix 1 line and one column images - - Fixes: Ticket10952 - Fixes: poc21ffmpeg - Signed-off-by: Michael Niedermayer +Fixes: Ticket10952 +Fixes: poc21ffmpeg +Signed-off-by: Michael Niedermayer --- ffmpeg-7.0/libavcodec/mpegvideo_enc.c 2024-04-05 07:22:59.000000000 +0800 +++ ffmpeg-7.0_new/libavcodec/mpegvideo_enc.c 2024-07-02 23:24:47.410634866 +0800 diff --git a/ffmpeg-7.spec b/ffmpeg-7.spec index f868b26..1035401 100644 --- a/ffmpeg-7.spec +++ b/ffmpeg-7.spec @@ -111,9 +111,7 @@ Patch4: ffmpeg-4.2-dlopen-fdk_aac.patch Patch5: work-around-abi-break.patch Patch10: ffmpeg-chromium.patch Patch91: ffmpeg-dlopen-openh264.patch -# PATCH-FIX-UPSTREAM ffmpeg-7-CVE-2024-32228.patch CVE-2024-32228 bsc#1227277 qzhao@suse.com -- Fix segfault on invalid film grain metadata. Patch92: ffmpeg-7-CVE-2024-32228.patch -# PATCH-FIX-UPSTREAM ffmpeg-7-CVE-2024-32230.patch CVE-2024-32230 bsc#1227296 qzhao@suse.com -- Fix 1 line and one column images. Patch93: ffmpeg-7-CVE-2024-32230.patch BuildRequires: ladspa-devel BuildRequires: libgsm-devel