CVE-2025-23158

media: venus: hfi: add check to handle incorrect queue size

HIGH
7.8
CVSS Score
Published: May 1, 2025 at 12:55 PM UTC
Updated: August 5, 2026 at 12:44 PM UTC
2 products affected across 2 vendorsLinux KernelDebian Linux

Using Linux by Linux?

Get instant alerts when new vulnerabilities affect Linux - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
HIGH7.8
Exploit prediction
EPSS 0.2%

Description

In the Linux kernel, the following vulnerability has been resolved: media: venus: hfi: add check to handle incorrect queue size qsize represents size of shared queued between driver and video firmware. Firmware can modify this value to an invalid large value. In such situation, empty_space will be bigger than the space actually available. Since new_wr_idx is not checked, so the following code will result in an OOB write. ... qsize = qhdr->q_size if (wr_idx >= rd_idx) empty_space = qsize - (wr_idx - rd_idx) .... if (new_wr_idx < qsize) { memcpy(wr_ptr, packet, dwords << 2) --> OOB write Add check to ensure qsize is within the allocated size while reading and writing packets into the queue.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

4.13 ≤ v < 5.10.2374.13 ≤ v < 5.15.1814.13 ≤ v < 5.4.2934.13 ≤ v < 6.1.1354.13 ≤ v < 6.12.244.13 ≤ v < 6.13.124.13 ≤ v < 6.14.34.13 ≤ v < 6.154.13 ≤ v < 6.6.885.11 ≤ v < 5.15.1815.16 ≤ v < 6.1.1355.5 ≤ v < 5.10.2376.13 ≤ v < 6.13.126.14 ≤ v < 6.14.36.2 ≤ v < 6.6.886.7 ≤ v < 6.12.244.13d96d3f30c0f2f564f6922bf4ccdf4464992e31fb
Vendor states this is fixed in 101a86619aab42bb61f2253bbf720121022eab86 (fixed)
Vendor states this is fixed in 1b86c1917e16bafbbb08ab90baaff533aa36c62d (fixed)
Vendor states this is fixed in 32af5c1fdb9bc274f52ee0472d3b060b18e4aab4 (fixed)
Vendor states this is fixed in 40084302f639b3fe954398c5ba5ee556b7242b54 (fixed)
Vendor states this is fixed in 679424f8b31446f90080befd0300ea915485b096 (fixed)
Vendor states this is fixed in 69baf245b23e20efda0079238b27fc63ecf13de1 (fixed)
Vendor states this is fixed in a45957bcde529169188929816775a575de77d84f (fixed)
Vendor states this is fixed in cf5f7bb4e0d786f4d9d50ae6b5963935eab71d75 (fixed)
Vendor states this is fixed in edb89d69b1438681daaf5ca90aed3242df94cc96 (fixed)
Vendor states this is fixed in 4.13 (unaffected)
Vendor states this is fixed in 5.10.237 (unaffected)
Vendor states this is fixed in 5.15.181 (unaffected)
Vendor states this is fixed in 5.4.293 (unaffected)
Vendor states this is fixed in 6.1.135 (unaffected)
Vendor states this is fixed in 6.12.24 (unaffected)
Vendor states this is fixed in 6.13.12 (unaffected)
Vendor states this is fixed in 6.14.3 (unaffected)
Vendor states this is fixed in 6.15 (unaffected)
Vendor states this is fixed in 6.6.88 (unaffected)

References (11)

Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/101a86619aab42bb61f2253bbf720121022eab86
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/1b86c1917e16bafbbb08ab90baaff533aa36c62d
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/32af5c1fdb9bc274f52ee0472d3b060b18e4aab4
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/40084302f639b3fe954398c5ba5ee556b7242b54
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/679424f8b31446f90080befd0300ea915485b096
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/69baf245b23e20efda0079238b27fc63ecf13de1
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/a45957bcde529169188929816775a575de77d84f
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/cf5f7bb4e0d786f4d9d50ae6b5963935eab71d75

CVSS

7.8HIGHLinux
Vector?

Quick Info

StatusMODIFIED
CWE
CWE-787

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card