From 24d21cdce469c0a5e617a90f18d1df1bed9e6f68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Wed, 7 Aug 2024 19:14:26 +0100 Subject: [PATCH] aom: av1enc: restrict allowed input width and height Restrict allowed input resolution to something sensible in light of libaom CVE-2024-5171. Part-of: --- .../gst-plugins-bad/docs/plugins/gst_plugins_cache.json | 2 +- subprojects/gst-plugins-bad/ext/aom/gstav1enc.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/subprojects/gst-plugins-bad/docs/plugins/gst_plugins_cache.json b/subprojects/gst-plugins-bad/docs/plugins/gst_plugins_cache.json index faf668ec20..80f490147d 100644 --- a/subprojects/gst-plugins-bad/docs/plugins/gst_plugins_cache.json +++ b/subprojects/gst-plugins-bad/docs/plugins/gst_plugins_cache.json @@ -3613,7 +3613,7 @@ "long-name": "AV1 Encoder", "pad-templates": { "sink": { - "caps": "video/x-raw:\n format: { I420, Y42B, Y444, YV12 }\n framerate: [ 0/1, 2147483647/1 ]\n width: [ 4, 2147483647 ]\n height: [ 4, 2147483647 ]\n", + "caps": "video/x-raw:\n format: { I420, Y42B, Y444, YV12 }\n framerate: [ 0/1, 2147483647/1 ]\n width: [ 4, 65536 ]\n height: [ 4, 65536 ]\n", "direction": "sink", "presence": "always" }, diff --git a/subprojects/gst-plugins-bad/ext/aom/gstav1enc.c b/subprojects/gst-plugins-bad/ext/aom/gstav1enc.c index 986697f6fe..29834a9e41 100644 --- a/subprojects/gst-plugins-bad/ext/aom/gstav1enc.c +++ b/subprojects/gst-plugins-bad/ext/aom/gstav1enc.c @@ -277,8 +277,8 @@ GST_STATIC_PAD_TEMPLATE ("sink", GST_STATIC_CAPS ("video/x-raw, " "format = (string) { I420, Y42B, Y444, YV12 }, " "framerate = (fraction) [0, MAX], " - "width = (int) [ 4, MAX ], " - "height = (int) [ 4, MAX ]") + "width = (int) [ 4, 65536 ], " + "height = (int) [ 4, 65536 ]") ); /* *INDENT-ON* */