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 ca16f199cdf01659706d8dd3f969eb90b202ebad Author: Michael Niedermayer <[email protected]> AuthorDate: Fri Oct 16 23:19:10 2026 +0200 Commit: Michael Niedermayer <[email protected]> CommitDate: Sun Nov 15 21:19:57 2026 +0100 avcodec/vulkan_hevc: reject tile counts the Vulkan PPS cannot hold Fixes: sG5Hl4tXqkD5 Fixes: out of array write Out of array write Replicated through UnModified FFmpeg with UBSAN Found during triage/review of the security report AISLE-2026-R0043 (cherry picked from commit ef7534ee38cd792d093ba2ab126a5f4954b46358) Signed-off-by: Michael Niedermayer <[email protected]> --- libavcodec/vulkan_hevc.c | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/libavcodec/vulkan_hevc.c b/libavcodec/vulkan_hevc.c index 6c0cd56363..c8badf692f 100644 --- a/libavcodec/vulkan_hevc.c +++ b/libavcodec/vulkan_hevc.c @@ -450,11 +450,15 @@ static void set_sps(const HEVCSPS *sps, int sps_idx, }; } -static void set_pps(const HEVCPPS *pps, const HEVCSPS *sps, - StdVideoH265ScalingLists *vkpps_scaling, - StdVideoH265PictureParameterSet *vkpps, - StdVideoH265PredictorPaletteEntries *pal) +static int set_pps(const HEVCPPS *pps, const HEVCSPS *sps, + StdVideoH265ScalingLists *vkpps_scaling, + StdVideoH265PictureParameterSet *vkpps, + StdVideoH265PredictorPaletteEntries *pal) { + if (pps->num_tile_columns > FF_ARRAY_ELEMS(vkpps->column_width_minus1) + 1 || + pps->num_tile_rows > FF_ARRAY_ELEMS(vkpps->row_height_minus1) + 1) + return AVERROR(ENOSYS); + copy_scaling_list(&pps->scaling_list, vkpps_scaling); *vkpps = (StdVideoH265PictureParameterSet) { @@ -536,6 +540,8 @@ static void set_pps(const HEVCPPS *pps, const HEVCSPS *sps, vkpps->cb_qp_offset_list[i] = pps->cb_qp_offset_list[i]; vkpps->cr_qp_offset_list[i] = pps->cr_qp_offset_list[i]; } + + return 0; } static void set_vps(const HEVCVPS *vps, @@ -680,8 +686,10 @@ static int vk_hevc_create_params(AVCodecContext *avctx, VkVideoSessionParameters const HEVCPPS *pps_l = h->ps.pps_list[i]; const HEVCSPS *sps_l = h->ps.sps_list[pps_l->sps_id]; int idx = h265_params_info.stdPPSCount++; - set_pps(pps_l, sps_l, &hdr->hpps[idx].scaling, - &hdr->pps[idx], &hdr->hpps[idx].pal); + err = set_pps(pps_l, sps_l, &hdr->hpps[idx].scaling, + &hdr->pps[idx], &hdr->hpps[idx].pal); + if (err < 0) + return err; } } @@ -887,7 +895,9 @@ static int vk_hevc_end_frame(AVCodecContext *avctx) return err; hdr = dec->hevc_headers; - set_pps(pps, sps, &hdr->hpps[0].scaling, &hdr->pps[0], &hdr->hpps[0].pal); + err = set_pps(pps, sps, &hdr->hpps[0].scaling, &hdr->pps[0], &hdr->hpps[0].pal); + if (err < 0) + return err; set_sps(sps, pps->sps_id, &hdr->hsps[0].scaling, &hdr->hsps[0].vui_header, &hdr->hsps[0].vui, &hdr->sps[0], hdr->hsps[0].nal_hdr, hdr->hsps[0].vcl_hdr, &hdr->hsps[0].ptl, &hdr->hsps[0].dpbm, -- 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]
