In the Linux kernel, the following vulnerability has been resolved:
media: v4l2-ctrls: validate AV1 tile counts
The stateless AV1 decoders use tile_info.tile_cols and tile_rows as loop
bounds and as indices into the mi__starts[] and _in_sbs_minus_1[]
arrays, as the divisor for context_update_tile_id, and their product
bounds the per-tile descriptor buffers, but std_validate_compound() does
not bound these u8 fields. Reject a V4L2_CTRL_TYPE_AV1_FRAME whose
tile_cols or tile_rows exceeds V4L2_AV1_MAX_TILE_COLS / _ROWS, or whose
product exceeds V4L2_AV1_MAX_TILE_COUNT. A zero tile count is left to the
consuming driver so the zero-initialised control that existing userspace
submits is still accepted.
CVSS Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
CVSS Score: 7.8
AV:L - The attacker-controlled tile_info.tile_cols/tile_rows u8s enter the kernel in V4L2_CID_STATELESS_AV1_FRAME via VIDIOC_S_EXT_CTRLS (or the request-fd path through try_set_ext_ctrls_request) on a local /dev/videoN AV1 decoder; validate_av1_frame() in std_validate_compound() is that ioctl's check. No network protocol carries those fields.
AC:L - The attacker sets tile_cols and tile_rows to any u8 (e.g. 255) in that AV1_FRAME control and queues STREAMON/MEDIA_REQUEST_IOC_QUEUE; vdec_av1_slice_setup_tile() and rockchip_vpu981_av1_dec_set_tile_info() then loop and index on those values deterministically, with no race or victim-side state.
PR:L - hantro_open() and fops_vcodec_open() have no capable() check; v4l2_prio_check() only compares V4L2 file-handle priority among openers. An unprivileged local user who can open the decoder node (video group, udev uaccess, or Android media-codec UID) is sufficient.
UI:N - The attacking process itself opens the stateless AV1 decoder, submits the crafted AV1_FRAME control, queues buffers, and starts streaming. No victim action such as mounting media or opening a file is required.
S:U - The overflows stay inside the kernel's kzalloc'd vdec_av1_slice_pfc (lat_buf->private_data) and the hantro tile_info coherent DMA buffer in the same kernel security authority. No VM, IOMMU, or sandbox boundary is crossed.
C:H - rockchip_vpu981_av1_dec_set_tile_info() reads group_entry[tile1tile_cols+tile0] with a product up to 255255 past the V4L2_AV1_MAX_TILE_COUNT TILE_GROUP_ENTRY array, and indexes height_in_sbs_minus_1[tile1] past its 64-entry field, pulling adjacent kernel heap into the decode path.
I:H - vdec_av1_slice_setup_tile() writes tile_cols+1 entries into mi_col_starts[V4L2_AV1_MAX_TILE_COLS+1] on the kzalloc'd pfc before the later product check; rockchip_vpu981_av1_dec_set_tile_info() writes 16 bytes per tile into a 128-slot (AV1_TILE_INFO_SIZE) DMA buffer for up to 255*255 tiles, an attacker-controlled kernel write.
A:H - Those heap and DMA-buffer overruns walk into unmapped or poisoned memory and produce a kernel oops or KASAN report, and the attacker can repeat the AV1_FRAME request at will.
| Attack Vector |
Local |
Scope |
Unchanged |
| Attack Complexity |
Low |
Confidentiality Impact |
High |
| Privileges Required |
Low |
Integrity Impact |
High |
| User Interaction |
None |
Availability Impact |
High |
AV:L - The attacker-controlled tile_info.tile_cols/tile_rows u8s enter the kernel in V4L2_CID_STATELESS_AV1_FRAME via VIDIOC_S_EXT_CTRLS (or the request-fd path through try_set_ext_ctrls_request) on a local /dev/videoN AV1 decoder; validate_av1_frame() in std_validate_compound() is that ioctl's check. No network protocol carries those fields.
AC:L - The attacker sets tile_cols and tile_rows to any u8 (e.g. 255) in that AV1_FRAME control and queues STREAMON/MEDIA_REQUEST_IOC_QUEUE; vdec_av1_slice_setup_tile() and rockchip_vpu981_av1_dec_set_tile_info() then loop and index on those values deterministically, with no race or victim-side state.
PR:L - hantro_open() and fops_vcodec_open() have no capable() check; v4l2_prio_check() only compares V4L2 file-handle priority among openers. An unprivileged local user who can open the decoder node (video group, udev uaccess, or Android media-codec UID) is sufficient.
UI:N - The attacking process itself opens the stateless AV1 decoder, submits the crafted AV1_FRAME control, queues buffers, and starts streaming. No victim action such as mounting media or opening a file is required.
S:U - The overflows stay inside the kernel's kzalloc'd vdec_av1_slice_pfc (lat_buf->private_data) and the hantro tile_info coherent DMA buffer in the same kernel security authority. No VM, IOMMU, or sandbox boundary is crossed.
C:H - rockchip_vpu981_av1_dec_set_tile_info() reads group_entry[tile1tile_cols+tile0] with a product up to 255255 past the V4L2_AV1_MAX_TILE_COUNT TILE_GROUP_ENTRY array, and indexes height_in_sbs_minus_1[tile1] past its 64-entry field, pulling adjacent kernel heap into the decode path.
I:H - vdec_av1_slice_setup_tile() writes tile_cols+1 entries into mi_col_starts[V4L2_AV1_MAX_TILE_COLS+1] on the kzalloc'd pfc before the later product check; rockchip_vpu981_av1_dec_set_tile_info() writes 16 bytes per tile into a 128-slot (AV1_TILE_INFO_SIZE) DMA buffer for up to 255*255 tiles, an attacker-controlled kernel write.
A:H - Those heap and DMA-buffer overruns walk into unmapped or poisoned memory and produce a kernel oops or KASAN report, and the attacker can repeat the AV1_FRAME request at will.
CVSS 3.1