diff --git a/0005-CVE-2023-5217-VP8-disallow-thread-count-changes.patch b/0005-CVE-2023-5217-VP8-disallow-thread-count-changes.patch new file mode 100644 index 0000000000000000000000000000000000000000..01908e1fac08d547dc2f8b3e438b12cd62e2a8fb --- /dev/null +++ b/0005-CVE-2023-5217-VP8-disallow-thread-count-changes.patch @@ -0,0 +1,34 @@ +From 1b60c0d0f7a4176a0be5339ff8132db3e297f5e8 Mon Sep 17 00:00:00 2001 +From: James Zern +Date: Mon, 25 Sep 2023 18:55:59 -0700 +Subject: [PATCH] VP8: disallow thread count changes + +Currently allocations are done at encoder creation time. Going from +threaded to non-threaded would cause a crash. + +Bug: chromium:1486441 +Change-Id: Ie301c2a70847dff2f0daae408fbef1e4d42e73d4 +(cherry picked from commit 3fbd1dca6a4d2dad332a2110d646e4ffef36d590) +--- + vp8/encoder/onyx_if.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/vp8/encoder/onyx_if.c b/vp8/encoder/onyx_if.c +index 2243182..e0c2207 100644 +--- a/vp8/encoder/onyx_if.c ++++ b/vp8/encoder/onyx_if.c +@@ -1449,6 +1449,11 @@ void vp8_change_config(VP8_COMP *cpi, VP8_CONFIG *oxcf) { + last_h = cpi->oxcf.Height; + prev_number_of_layers = cpi->oxcf.number_of_layers; + ++ if (cpi->initial_width) { ++ // TODO(https://crbug.com/1486441): Allow changing thread counts; the ++ // allocation is done once in vp8_create_compressor(). ++ oxcf->multi_threaded = cpi->oxcf.multi_threaded; ++ } + cpi->oxcf = *oxcf; + + switch (cpi->oxcf.Mode) { +-- +2.31.1 + diff --git a/libvpx.spec b/libvpx.spec index 4cf36fc22b3a0f46c3ff8474fdbe99444285fa72..5fbf612e6cb4f2a359d8203a7354dbdf5f9d25af 100644 --- a/libvpx.spec +++ b/libvpx.spec @@ -7,7 +7,7 @@ Name: libvpx Summary: VP8/VP9 Video Codec SDK Version: 1.7.0 -Release: 8%{anolis_release}%{?dist} +Release: 9%{anolis_release}%{?dist} License: BSD Group: System Environment/Libraries #Source0: http://downloads.webmproject.org/releases/webm/%{name}-%{version}.tar.bz2 @@ -26,6 +26,7 @@ Patch1: 0001-CVE-2019-9232-Fix-OOB-memory-access-on-fuzzed-data.patch Patch2: 0002-CVE-2019-9433-VP8-Fix-use-after-free-in-postproc.patch Patch3: 0003-CVE-2019-9371-update-libwebm.patch Patch4: 0004-CVE-2019-2126-update-libwebm-to-libwebm-1.0.0.27-361.patch +Patch5: 0005-CVE-2023-5217-VP8-disallow-thread-count-changes.patch %description libvpx provides the VP8/VP9 SDK, which allows you to integrate your applications @@ -65,6 +66,7 @@ Doc pages for %{name}. %patch2 -p1 -b .0002 %patch3 -p1 -b .0003 %patch4 -p1 -b .0004 +%patch5 -p1 -b .0005 %build %ifarch %{ix86} @@ -256,6 +258,9 @@ rm -rf %{buildroot}%{_prefix}/src %doc AUTHORS CHANGELOG README %changelog +* Wed Oct 11 2023 Kaiqiang Wang - 1.7.0-9.0.1 +- VP8: disallow thread count changes (CVE-2023-5217) + * Wed Jul 20 2022 Xiaoping Liu - 1.7.0-8.0.1 - Add doc sub package