In the Linux kernel, the following vulnerability has been resolved:
media: rkvdec: bound HEVC tile loops and PPS id to the array capacity
compute_tiles_uniform() and compute_tiles_non_uniform() loop over
num_tile_columns_minus1 + 1 / num_tile_rows_minus1 + 1 entries, and
assemble_hw_pps() writes one COLUMN_WIDTH / ROW_HEIGHT register per tile
and indexes priv_tbl->param_set[] by pic_parameter_set_id, all taken from
the untrusted PPS. Use the bounded v4l2_hevc_pps_num_tile_columns() /
v4l2_hevc_pps_num_tile_rows() helpers for the tile loops, and bail out of
assemble_hw_pps() before indexing priv_tbl->param_set[] with an
out-of-range pic_parameter_set_id, so the writes stay within the hardware
tables.
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 bad values are fields of the V4L2_CID_STATELESS_HEVC_PPS control, which a local process sets with VIDIOC_S_EXT_CTRLS on the rkvdec /dev/videoN node. rkvdec_hevc_run() then passes them to assemble_hw_pps() and compute_tiles_*(). No network protocol delivers these fields to the kernel; a userspace bitstream parser sits in between.
AC:L - std_validate_compound() never range-checks num_tile_columns_minus1, num_tile_rows_minus1 or pic_parameter_set_id, all u8 values up to 255. The attacker sets TILES_ENABLED with a value above 19, or pic_parameter_set_id of 64 or more, queues a decode request, and the out-of-bounds write happens every time.
PR:L - rkvdec_open() and the stateless control and request ioctls have no capability checks. The attacker needs only ordinary access to the decoder device node, such as video group membership or a media service context.
UI:N - The attacker supplies the malicious PPS control and triggers the decode job alone. No other user has to do anything.
S:U - This is memory corruption inside the kernel, reached from a local process. The impact stays within the kernel's own security authority; no VM or IOMMU boundary is crossed.
C:H - In rkvdec-vdpu381-hevc.c, assemble_hw_pps() lets compute_tiles_uniform()/compute_tiles_non_uniform() write up to 256 u16 entries into the 20- and 22-entry arrays column_width[] and row_height[] on the kernel stack. The non-uniform path also reads past pps->column_width_minus1[]. Stack corruption like this can be used to leak kernel memory.
I:H - The loops overwrite the stack past column_width[20]/row_height[22] with values derived from attacker-set PPS and SPS fields. Separately, param_set[pic_parameter_set_id] with an id of 64 or more, and the COLUMN_WIDTH(i)/ROW_HEIGHT(i) WRITE_PPS loop, write outside the intended hardware tables. Both are out-of-bounds kernel writes.
A:H - Overflowing the column_width/row_height arrays on the stack trips the stack protector or corrupts saved state, which causes a kernel panic or oops. The attacker can trigger it again with every queued decode request.
| 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 bad values are fields of the V4L2_CID_STATELESS_HEVC_PPS control, which a local process sets with VIDIOC_S_EXT_CTRLS on the rkvdec /dev/videoN node. rkvdec_hevc_run() then passes them to assemble_hw_pps() and compute_tiles_*(). No network protocol delivers these fields to the kernel; a userspace bitstream parser sits in between.
AC:L - std_validate_compound() never range-checks num_tile_columns_minus1, num_tile_rows_minus1 or pic_parameter_set_id, all u8 values up to 255. The attacker sets TILES_ENABLED with a value above 19, or pic_parameter_set_id of 64 or more, queues a decode request, and the out-of-bounds write happens every time.
PR:L - rkvdec_open() and the stateless control and request ioctls have no capability checks. The attacker needs only ordinary access to the decoder device node, such as video group membership or a media service context.
UI:N - The attacker supplies the malicious PPS control and triggers the decode job alone. No other user has to do anything.
S:U - This is memory corruption inside the kernel, reached from a local process. The impact stays within the kernel's own security authority; no VM or IOMMU boundary is crossed.
C:H - In rkvdec-vdpu381-hevc.c, assemble_hw_pps() lets compute_tiles_uniform()/compute_tiles_non_uniform() write up to 256 u16 entries into the 20- and 22-entry arrays column_width[] and row_height[] on the kernel stack. The non-uniform path also reads past pps->column_width_minus1[]. Stack corruption like this can be used to leak kernel memory.
I:H - The loops overwrite the stack past column_width[20]/row_height[22] with values derived from attacker-set PPS and SPS fields. Separately, param_set[pic_parameter_set_id] with an id of 64 or more, and the COLUMN_WIDTH(i)/ROW_HEIGHT(i) WRITE_PPS loop, write outside the intended hardware tables. Both are out-of-bounds kernel writes.
A:H - Overflowing the column_width/row_height arrays on the stack trips the stack protector or corrupts saved state, which causes a kernel panic or oops. The attacker can trigger it again with every queued decode request.
CVSS 3.1