Skip to content

Commit

Permalink
libvpx7: patch CVE-2023-5217.
Browse files Browse the repository at this point in the history
  • Loading branch information
leahneukirchen committed Sep 28, 2023
1 parent 669cbaf commit e66f615
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
27 changes: 27 additions & 0 deletions srcpkgs/libvpx7/patches/CVE-2023-5217.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
From 3fbd1dca6a4d2dad332a2110d646e4ffef36d590 Mon Sep 17 00:00:00 2001
From: James Zern <jzern@google.com>
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

diff --git a/vp8/encoder/onyx_if.c b/vp8/encoder/onyx_if.c
index c65afc643bf..c5e9970c3cc 100644
--- a/vp8/encoder/onyx_if.c
+++ b/vp8/encoder/onyx_if.c
@@ -1447,6 +1447,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 changes: 1 addition & 1 deletion srcpkgs/libvpx7/template
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# have fun rebuilding everything
pkgname=libvpx7
version=1.11.0
revision=1
revision=2
hostmakedepends="perl yasm"
short_desc="VP8 and VP9 video codec"
maintainer="Orphaned <orphan@voidlinux.org>"
Expand Down

0 comments on commit e66f615

Please sign in to comment.