CVE-2025-23158
media: venus: hfi: add check to handle incorrect queue size
Mitigation
- Upgrade Linux to 69baf245b23e20efda0079238b27fc63ecf13de1 or later.
Who should check
- Anyone running Linux >= d96d3f30c0f2f564f6922bf4ccdf4464992e31fb, < 1b86c1917e16bafbbb08ab90baaff533aa36c62d; >= d96d3f30c0f2f564f6922bf4ccdf4464992e31fb, < a45957bcde529169188929816775a575de77d84f; >= d96d3f30c0f2f564f6922bf4ccdf4464992e31fb, < 32af5c1fdb9bc274f52ee0472d3b060b18e4aab4; >= d96d3f30c0f2f564f6922bf4ccdf4464992e31fb, < cf5f7bb4e0d786f4d9d50ae6b5963935eab71d75; >= d96d3f30c0f2f564f6922bf4ccdf4464992e31fb, < 40084302f639b3fe954398c5ba5ee556b7242b54; >= d96d3f30c0f2f564f6922bf4ccdf4464992e31fb, < 679424f8b31446f90080befd0300ea915485b096; >= d96d3f30c0f2f564f6922bf4ccdf4464992e31fb, < edb89d69b1438681daaf5ca90aed3242df94cc96; >= d96d3f30c0f2f564f6922bf4ccdf4464992e31fb, < 101a86619aab42bb61f2253bbf720121022eab86; >= d96d3f30c0f2f564f6922bf4ccdf4464992e31fb, < 69baf245b23e20efda0079238b27fc63ecf13de1
- Anyone running Linux 4.13
Vulnerability facts
- Affected
- Linux >= d96d3f30c0f2f564f6922bf4ccdf4464992e31fb, < 1b86c1917e16bafbbb08ab90baaff533aa36c62d; >= d96d3f30c0f2f564f6922bf4ccdf4464992e31fb, < a45957bcde529169188929816775a575de77d84f; >= d96d3f30c0f2f564f6922bf4ccdf4464992e31fb, < 32af5c1fdb9bc274f52ee0472d3b060b18e4aab4; >= d96d3f30c0f2f564f6922bf4ccdf4464992e31fb, < cf5f7bb4e0d786f4d9d50ae6b5963935eab71d75; >= d96d3f30c0f2f564f6922bf4ccdf4464992e31fb, < 40084302f639b3fe954398c5ba5ee556b7242b54; >= d96d3f30c0f2f564f6922bf4ccdf4464992e31fb, < 679424f8b31446f90080befd0300ea915485b096; >= d96d3f30c0f2f564f6922bf4ccdf4464992e31fb, < edb89d69b1438681daaf5ca90aed3242df94cc96; >= d96d3f30c0f2f564f6922bf4ccdf4464992e31fb, < 101a86619aab42bb61f2253bbf720121022eab86; >= d96d3f30c0f2f564f6922bf4ccdf4464992e31fb, < 69baf245b23e20efda0079238b27fc63ecf13de1; Linux 4.13
- Fixed in
- Linux 1b86c1917e16bafbbb08ab90baaff533aa36c62d, Linux 32af5c1fdb9bc274f52ee0472d3b060b18e4aab4, Linux 40084302f639b3fe954398c5ba5ee556b7242b54, Linux 679424f8b31446f90080befd0300ea915485b096, Linux 101a86619aab42bb61f2253bbf720121022eab86, Linux 69baf245b23e20efda0079238b27fc63ecf13de1
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Not remotely exploitable (local or adjacent access needed)
- CVSS
- 7.8 (v3.1, CNA)CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:HOpen in CVSS calculator
Show all 8 CVSS metrics
- Attack vector: Local
- Attack complexity: Low
- Privileges required: Low
- User interaction: None
- Scope: Unchanged
- Confidentiality impact: High
- Integrity impact: High
- Availability impact: High
- EPSS
- 0.32% chance of exploitation in 30 days (percentile 18, 2026-11-26)
- CWE
- CWE-787
- Modified
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 and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| Linux | >= d96d3f30c0f2f564f6922bf4ccdf4464992e31fb, < 1b86c1917e16bafbbb08ab90baaff533aa36c62d; >= d96d3f30c0f2f564f6922bf4ccdf4464992e31fb, < a45957bcde529169188929816775a575de77d84f; >= d96d3f30c0f2f564f6922bf4ccdf4464992e31fb, < 32af5c1fdb9bc274f52ee0472d3b060b18e4aab4; >= d96d3f30c0f2f564f6922bf4ccdf4464992e31fb, < cf5f7bb4e0d786f4d9d50ae6b5963935eab71d75; >= d96d3f30c0f2f564f6922bf4ccdf4464992e31fb, < 40084302f639b3fe954398c5ba5ee556b7242b54; >= d96d3f30c0f2f564f6922bf4ccdf4464992e31fb, < 679424f8b31446f90080befd0300ea915485b096; >= d96d3f30c0f2f564f6922bf4ccdf4464992e31fb, < edb89d69b1438681daaf5ca90aed3242df94cc96; >= d96d3f30c0f2f564f6922bf4ccdf4464992e31fb, < 101a86619aab42bb61f2253bbf720121022eab86; >= d96d3f30c0f2f564f6922bf4ccdf4464992e31fb, < 69baf245b23e20efda0079238b27fc63ecf13de1 | — | cvelist |
| Linux | 4.13 | — | cvelist |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2025-23158. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2025-23158.md Affected: Linux >= d96d3f30c0f2f564f6922bf4ccdf4464992e31fb, < 1b86c1917e16bafbbb08ab90baaff533aa36c62d; >= d96d3f30c0f2f564f6922bf4ccdf4464992e31fb, < a45957bcde529169188929816775a575de77d84f; >= d96d3f30c0f2f564f6922bf4ccdf4464992e31fb, < 32af5c1fdb9bc274f52ee0472d3b060b18e4aab4; >= d96d3f30c0f2f564f6922bf… Fixed in: Linux 1b86c1917e16bafbbb08ab90baaff533aa36c62d, Linux 32af5c1fdb9bc274f52ee0472d3b060b18e4aab4, Linux 40084302f639b3fe954398c5ba5ee556b7242b54, Linux 679424f8b31446f90080befd0300ea915485b096, Linux 101a86619aab42bb61f2253bbf720121022eab86, Linux 69baf245b23e20efda0079238b27fc63ecf13de1 Steps: 1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
Patches
- https://git.kernel.org/stable/c/1b86c1917e16bafbbb08ab90baaff533aa36c62d
- https://git.kernel.org/stable/c/a45957bcde529169188929816775a575de77d84f
- https://git.kernel.org/stable/c/32af5c1fdb9bc274f52ee0472d3b060b18e4aab4
- https://git.kernel.org/stable/c/cf5f7bb4e0d786f4d9d50ae6b5963935eab71d75
- https://git.kernel.org/stable/c/40084302f639b3fe954398c5ba5ee556b7242b54
- https://git.kernel.org/stable/c/679424f8b31446f90080befd0300ea915485b096
- https://git.kernel.org/stable/c/edb89d69b1438681daaf5ca90aed3242df94cc96
- https://git.kernel.org/stable/c/101a86619aab42bb61f2253bbf720121022eab86
- https://git.kernel.org/stable/c/69baf245b23e20efda0079238b27fc63ecf13de1
FAQ
Is CVE-2025-23158 being exploited?
There is no confirmed exploitation: CVE-2025-23158 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.32% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2025-23158?
High: CVSS 7.8 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).
Which versions are affected by CVE-2025-23158?
Linux >= d96d3f30c0f2f564f6922bf4ccdf4464992e31fb, < 1b86c1917e16bafbbb08ab90baaff533aa36c62d; >= d96d3f30c0f2f564f6922bf4ccdf4464992e31fb, < a45957bcde529169188929816775a575de77d84f; >= d96d3f30c0f2f564f6922bf4ccdf4464992e31fb, < 32af5c1fdb9bc274f52ee0472d3b060b18e4aab4; >= d96d3f30c0f2f564f6922bf4ccdf4464992e31fb, < cf5f7bb4e0d786f4d9d50ae6b5963935eab71d75; >= d96d3f30c0f2f564f6922bf4ccdf4464992e31fb, < 40084302f639b3fe954398c5ba5ee556b7242b54; >= d96d3f30c0f2f564f6922bf4ccdf4464992e31fb, < 679424f8b31446f90080befd0300ea915485b096; >= d96d3f30c0f2f564f6922bf4ccdf4464992e31fb, < edb89d69b1438681daaf5ca90aed3242df94cc96; >= d96d3f30c0f2f564f6922bf4ccdf4464992e31fb, < 101a86619aab42bb61f2253bbf720121022eab86; >= d96d3f30c0f2f564f6922bf4ccdf4464992e31fb, < 69baf245b23e20efda0079238b27fc63ecf13de1; Linux 4.13.
Is there a fix for CVE-2025-23158?
Yes. Fixed in Linux 1b86c1917e16bafbbb08ab90baaff533aa36c62d, Linux 32af5c1fdb9bc274f52ee0472d3b060b18e4aab4, Linux 40084302f639b3fe954398c5ba5ee556b7242b54, Linux 679424f8b31446f90080befd0300ea915485b096, Linux 101a86619aab42bb61f2253bbf720121022eab86, Linux 69baf245b23e20efda0079238b27fc63ecf13de1. Upgrade Linux to 69baf245b23e20efda0079238b27fc63ecf13de1 or later.
How do I check if I'm affected by CVE-2025-23158?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.