]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
media: verisilicon: Protect G2 HEVC decoder against invalid DPB index
authorNicolas Dufresne <nicolas.dufresne@collabora.com>
Mon, 22 Sep 2025 18:43:39 +0000 (14:43 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 8 Jan 2026 09:17:04 +0000 (10:17 +0100)
commit3cbf9ef5ce849f5c99a936e8482176b70d223011
tree8b87facf6e19d5f21925f8402659278d10636151
parent49446f8e73e27c154f4423c768f6e230f00ab77e
media: verisilicon: Protect G2 HEVC decoder against invalid DPB index

commit 47825b1646a6a9eca0f90baa3d4f98947c2add96 upstream.

Fix the Hantro G2 HEVC decoder so that we use DPB index 0 whenever a
ninvalid index is received from user space. This protects the hardware
from doing faulty memory access which then leads to bus errors.

To be noted that when a reference is missing, userspace such as GStreamer
passes an invalid DPB index of 255. This issue was found by seeking to a
CRA picture using GStreamer. The framework is currently missing the code
to skip over RASL pictures placed after the CRA. This situation can also
occur while doing live streaming over lossy transport.

Fixes: cb5dd5a0fa518 ("media: hantro: Introduce G2/HEVC decoder")
Cc: stable@vger.kernel.org
Reviewed-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/media/platform/verisilicon/hantro_g2_hevc_dec.c