linux/drivers/media/platform/verisilicon
Michael Bommarito 367db8b23c media: verisilicon: rockchip: reject AV1 frames exceeding the tile capacity
rockchip_vpu981_av1_dec_set_tile_info() indexes the tile group entry
array by tile1 * tile_cols + tile0, reading up to tile_cols * tile_rows
entries, lays out one descriptor per tile in the AV1_MAX_TILES tile_info
buffer, and programs the real tile_cols / tile_rows into the hardware.

The tile group entry control is a dynamic array sized to the number of
entries userspace submitted, independent of tile_cols / tile_rows, so a
frame that claims more tiles than entries reads past the array. A frame
that claims more than AV1_MAX_TILES tiles also leaves the hardware
programmed for more tiles than the descriptor buffer holds.

Reject both in prepare_run(): tile_cols * tile_rows must not exceed the
submitted entry count or AV1_MAX_TILES. The entry count is read via
v4l2_ctrl_find() (ctrl->elems). This mirrors the bound the mediatek AV1
decoder already enforces.

Fixes: 727a400686 ("media: verisilicon: Add Rockchip AV1 decoder")
Assisted-by: Claude:claude-opus-4-8
Cc: stable@vger.kernel.org
Signed-off-by: Michael Bommarito <michael.bommarito@gmail.com>
Reviewed-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2026-09-07 09:01:05 +02:00
..
hantro_drv.c media: platform: hantro_drv: Add missing media_entity_cleanup() 2026-07-17 12:36:48 +02:00
hantro_g1_h264_dec.c
hantro_g1_mpeg2_dec.c
hantro_g1_regs.h media: verisilicon: postproc: 4K support 2025-07-12 08:34:48 +02:00
hantro_g1_vp8_dec.c
hantro_g1.c
hantro_g2_hevc_dec.c media: verisilicon: hantro: bound G2 HEVC tile loop to the buffer capacity 2026-09-07 09:01:05 +02:00
hantro_g2_regs.h media: verisilicon: Fix CPU stalls on G2 bus error 2025-10-20 09:23:17 +02:00
hantro_g2_vp9_dec.c media: verisilicon: Fix CPU stalls on G2 bus error 2025-10-20 09:23:17 +02:00
hantro_g2.c media: verisilicon: Fix CPU stalls on G2 bus error 2025-10-20 09:23:17 +02:00
hantro_h1_jpeg_enc.c
hantro_h1_regs.h
hantro_h264.c media: verisilicon: Use __set_bit() with local bitmaps 2025-06-20 13:20:17 +02:00
hantro_hevc.c
hantro_hw.h media: verisilicon: remove hantro_run declaration 2026-05-04 09:31:04 +02:00
hantro_jpeg.c
hantro_jpeg.h
hantro_mpeg2.c
hantro_postproc.c media: verisilicon: postproc: 4K support 2025-07-12 08:34:48 +02:00
hantro_v4l2.c media: verisilicon: Export only needed pixels formats 2026-05-04 09:31:04 +02:00
hantro_v4l2.h
hantro_vp8.c
hantro_vp9.c
hantro_vp9.h
hantro.h media: verisilicon: Avoid G2 bus error while decoding H.264 and HEVC 2026-01-05 15:56:31 +01:00
imx8m_vpu_hw.c media: verisilicon: Fix kernel panic due to __initconst misuse 2026-03-18 13:17:25 +01:00
Kconfig
Makefile
rockchip_av1_entropymode.c
rockchip_av1_entropymode.h
rockchip_av1_filmgrain.c
rockchip_av1_filmgrain.h
rockchip_vpu_hw.c media: verisilicon: Fix AV1 decoder clock frequency 2025-06-20 13:20:17 +02:00
rockchip_vpu2_hw_h264_dec.c
rockchip_vpu2_hw_jpeg_enc.c
rockchip_vpu2_hw_mpeg2_dec.c
rockchip_vpu2_hw_vp8_dec.c
rockchip_vpu2_regs.h
rockchip_vpu981_hw_av1_dec.c media: verisilicon: rockchip: reject AV1 frames exceeding the tile capacity 2026-09-07 09:01:05 +02:00
rockchip_vpu981_regs.h
sama5d4_vdec_hw.c
stm32mp25_vpu_hw.c
sunxi_vpu_hw.c