From 532214785a0d5ab55bce74eac000a44720bc9993 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 7ede158aff..84d2773ee9 100644 --- a/subprojects/gst-plugins-bad/docs/plugins/gst_plugins_cache.json +++ b/subprojects/gst-plugins-bad/docs/plugins/gst_plugins_cache.json @@ -1144,7 +1144,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 33bb62eece..77bd36846d 100644 --- a/subprojects/gst-plugins-bad/ext/aom/gstav1enc.c +++ b/subprojects/gst-plugins-bad/ext/aom/gstav1enc.c @@ -276,8 +276,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* */