new file mode 100644
@@ -0,0 +1,52 @@
+From 04955e8b148fa3e7ab022cbb9f5e35c49165ae21 Mon Sep 17 00:00:00 2001
+From: Michael Niedermayer <michael@niedermayer.cc>
+Date: Sat, 14 Nov 2026 01:58:22 +0100
+Subject: [PATCH] avfilter/vf_signalstats: allocate the histograms for all 16
+ bit sample values
+
+Fixes: out of array write
+Fixes: 91956.4 is outside the range of representable values of type 'unsigned short'
+Fixes: 3DKcZFM0ZaFw
+Fixes: AISLE-2026-0166-00233
+
+Found-by: Joshua Rogers (AISLE)
+
+Out of array write Replicated through UnModified FFmpeg with ASAN
+Float to integer overflow Replicated through UnModified FFmpeg with UBSAN
+
+CVE: CVE-2026-135738
+Upstream-Status: Backport [https://github.com/FFmpeg/FFmpeg/commit/04955e8b148fa3e7ab022cbb9f5e35c49165ae21]
+
+Signed-off-by: Dickson Wu <dickson.wu@certik.com>
+---
+ libavfilter/vf_signalstats.c | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/libavfilter/vf_signalstats.c b/libavfilter/vf_signalstats.c
+index 5859b46478c16..a69773c20831b 100644
+--- a/libavfilter/vf_signalstats.c
++++ b/libavfilter/vf_signalstats.c
+@@ -161,10 +161,10 @@ static int config_output(AVFilterLink *outlink)
+ s->vsub = desc->log2_chroma_h;
+ s->depth = desc->comp[0].depth;
+ s->maxsize = 1 << s->depth;
+- s->histy = av_malloc_array(s->maxsize, sizeof(*s->histy));
+- s->histu = av_malloc_array(s->maxsize, sizeof(*s->histu));
+- s->histv = av_malloc_array(s->maxsize, sizeof(*s->histv));
+- s->histsat = av_malloc_array(s->maxsize, sizeof(*s->histsat));
++ s->histy = av_calloc(1 << (s->depth > 8 ? 16 : 8), sizeof(*s->histy));
++ s->histu = av_calloc(1 << (s->depth > 8 ? 16 : 8), sizeof(*s->histu));
++ s->histv = av_calloc(1 << (s->depth > 8 ? 16 : 8), sizeof(*s->histv));
++ s->histsat = av_calloc(1 << (s->depth > 8 ? 16 : 8), sizeof(*s->histsat));
+
+ if (!s->histy || !s->histu || !s->histv || !s->histsat)
+ return AVERROR(ENOMEM);
+@@ -520,7 +520,7 @@ static int compute_sat_hue_metrics16(AVFilterContext *ctx, void *arg, int jobnr,
+ for (i = 0; i < s->chromaw; i++) {
+ const int yuvu = p_u[i];
+ const int yuvv = p_v[i];
+- p_sat[i] = hypotf(yuvu - mid, yuvv - mid); // int or round?
++ p_sat[i] = (int)hypotf(yuvu - mid, yuvv - mid); // int or round?
+ ((int16_t*)p_hue)[i] = fmodf(floorf((180.f / M_PI) * atan2f(yuvu-mid, yuvv-mid) + 180.f), 360.f);
+ }
+ p_u += lsz_u;
@@ -37,6 +37,7 @@ SRC_URI = " \
file://CVE-2026-135722.patch \
file://CVE-2026-135725.patch \
file://CVE-2026-135734.patch \
+ file://CVE-2026-135738.patch \
"
SRC_URI[sha256sum] = "a231e3d5742c44b1cdaebfb98ad7b6200d12763e0b6db9e1e2c5891f2c083a18"