CVE-2026-89873 PUBLISHED

media: v4l2-ctrls: validate HEVC EXT SPS RPS counts

Assigner: Linux
Reserved: 11.09.2026 Published: 16.09.2026 Updated: 16.09.2026

In the Linux kernel, the following vulnerability has been resolved:

media: v4l2-ctrls: validate HEVC EXT SPS RPS counts

The HEVC SPS control carries the short-term and long-term RPS counts that decoder drivers use to walk the matching EXT SPS dynamic arrays. Reject SPS values that exceed the HEVC limits of 64 short-term sets and 32 long-term references so drivers cannot later index beyond those controls.

Also reject EXT SPS ST RPS entries whose negative or positive picture counts exceed the 16-entry arrays, or whose combined delta-POC count exceeds the HEVC DPB maximum.

Metrics

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 bug is reached only through the local V4L2 interface on a stateless HEVC decoder node (/dev/videoN) via VIDIOC_S_EXT_CTRLS plus request-API QBUF/STREAMON. There is no remote or network-facing path into the HEVC SPS or EXT SPS RPS controls. AC:L - The attacker supplies num_short_term_ref_pic_sets, num_long_term_ref_pics_sps, num_negative_pics, and num_positive_pics as unconstrained u8 values; any out-of-range count deterministically drives rkvdec HEVC RPS assembly out of bounds on the next decode run. No race, timing window, or uncontrollable memory layout is involved. PR:L - Only an unprivileged local account with access to the video device node is required (typically the video group, or the media/codec service on Android and embedded Rockchip devices). rkvdec_open() and rkvdec_hevc_validate_sps() check neither capabilities nor the RPS counts. UI:N - The attacking process performs the entire sequence itself: open the decoder, set the crafted HEVC SPS and EXT SPS RPS controls, queue buffers, and start streaming. No victim action, media file, or mount is needed. S:U - The out-of-bounds accesses stay inside the kernel's own slab and coherent DMA memory within the same security authority. No VM, IOMMU, or sandbox boundary is crossed. C:H - rkvdec_hevc_prepare_hw_st_rps() indexes ext_sps_st_rps[] with an attacker-chosen u8 count up to 255 against a 64-entry (or smaller dynamic) array, and st_ref_pic_set_calculate() reads delta_poc_s0_minus1[] past its 16-entry field, leaking adjacent kernel heap into the decode path. I:H - st_ref_pic_set_calculate() writes used_by_curr_pic_s0[]/delta_poc_s0[] with a u8 loop bound up to 255 into 16-entry arrays on a kzalloc object, and rkvdec_set_bw_field() writes RPS bitfields for set index i>63 past the end of the rps DMA object into adjacent priv_tbl memory. A:H - The heap overflow of calculated_rps_st_sets and the DMA-table bitfield writes can walk into unmapped or poisoned memory and trip KASAN/hardening checks, producing a kernel oops, and can wedge the decoder hardware; the trigger is repeatable at will.

Product Status

Vendor Linux
Product Linux
Versions Default: unaffected
  • affected from c9a59dc2acc72789d5c778af080d1e65af84862c to 30f85a7c59113a8844b276efc010085a34f912e9 (excl.)
  • affected from c9a59dc2acc72789d5c778af080d1e65af84862c to 796b5c6d4f1615d59d5d8fe5a38fae6bfdfe878e (excl.)
Vendor Linux
Product Linux
Versions Default: affected
  • Version 7.0 is affected
  • unaffected from 0 to 7.0 (excl.)
  • unaffected from 7.2.5 to 7.2.* (incl.)
  • unaffected from 7.3-rc1 to * (incl.)

References