This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch release/9.1 in repository ffmpeg.
commit 76f5a0e5d67577bbc968b4778e76ae57c47cc2b4 Author: Michael Niedermayer <[email protected]> AuthorDate: Fri Nov 6 23:58:54 2026 +0100 Commit: Michael Niedermayer <[email protected]> CommitDate: Sun Nov 15 06:17:20 2026 +0100 avfilter/vf_owdenoise: copy planes with the correct dimensions Fixes: heap-buffer-overflow Fixes: GGSK9ga7taB4 Fixes: RHcGTqZzYSqy Found-by: SecBuddyF, Tencent KeenLab (CodeBuddy Security) The report covers both errors in the chroma plane copies; the width in samples of the luma plane was found during triage of the report. Heap out of array read Replicated through UnModified FFmpeg with ASAN (cherry picked from commit c25546c2d35b647a8afa434eb92af9120d8ec049) Signed-off-by: Michael Niedermayer <[email protected]> --- libavfilter/vf_owdenoise.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/libavfilter/vf_owdenoise.c b/libavfilter/vf_owdenoise.c index 746c55a6e5..e50fe71f55 100644 --- a/libavfilter/vf_owdenoise.c +++ b/libavfilter/vf_owdenoise.c @@ -258,6 +258,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in) AVFrame *out; const int cw = AV_CEIL_RSHIFT(inlink->w, s->hsub); const int ch = AV_CEIL_RSHIFT(inlink->h, s->vsub); + const int bytes_per_sample = (s->pixel_depth + 7) / 8; if (av_frame_is_writable(in)) { out = in; @@ -279,14 +280,14 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in) if (s->luma_strength > 0) { filter(s, out->data[0], out->linesize[0], in->data[0], in->linesize[0], inlink->w, inlink->h, s->luma_strength); } else { - av_image_copy_plane(out->data[0], out->linesize[0], in ->data[0], in ->linesize[0], inlink->w, inlink->h); + av_image_copy_plane(out->data[0], out->linesize[0], in ->data[0], in ->linesize[0], inlink->w * bytes_per_sample, inlink->h); } if (s->chroma_strength > 0) { filter(s, out->data[1], out->linesize[1], in->data[1], in->linesize[1], cw, ch, s->chroma_strength); filter(s, out->data[2], out->linesize[2], in->data[2], in->linesize[2], cw, ch, s->chroma_strength); } else { - av_image_copy_plane(out->data[1], out->linesize[1], in ->data[1], in ->linesize[1], inlink->w, inlink->h); - av_image_copy_plane(out->data[2], out->linesize[2], in ->data[2], in ->linesize[2], inlink->w, inlink->h); + av_image_copy_plane(out->data[1], out->linesize[1], in ->data[1], in ->linesize[1], cw * bytes_per_sample, ch); + av_image_copy_plane(out->data[2], out->linesize[2], in ->data[2], in ->linesize[2], cw * bytes_per_sample, ch); } if (in->data[3]) -- To stop receiving notification emails like this one, please contact [email protected]. _______________________________________________ ffmpeg-cvslog mailing list -- [email protected] To unsubscribe send an email to [email protected]
