{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2025-39710","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","state":"PUBLISHED","assignerShortName":"Linux","dateReserved":"2025-04-16T07:20:57.116Z","datePublished":"2025-09-05T17:21:17.243Z","dateUpdated":"2026-08-05T12:04:45.237Z"},"containers":{"cna":{"providerMetadata":{"orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux","dateUpdated":"2026-08-05T12:04:45.237Z"},"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nmedia: venus: Add a check for packet size after reading from shared memory\n\nAdd a check to ensure that the packet size does not exceed the number of\navailable words after reading the packet header from shared memory. This\nensures that the size provided by the firmware is safe to process and\nprevent potential out-of-bounds memory access."}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":7.8,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - The vulnerable path is reached through the Venus V4L2 device node (`/dev/videoN`) — a local process opens the codec, drives a session with ioctls, and the resulting firmware HFI responses are parsed in the ISR thread. The driver is not bound to any network stack, so exploitation requires local access to the media device.\nAC:L - The condition is simply an HFI message whose header `size` field disagrees with the queue-derived word count, which the message producer fully controls (compromised/misbehaving Venus firmware, the `rd_idx == qsize` wrap edge case, or a shared-memory TOCTOU with the co-processor); no unpredictable memory layout or victim state is required, and the message queue can be pumped repeatedly.\nPR:L - An unprivileged local user needs only access to the venus video device node (video group on Qualcomm Linux boards/Chromebooks, the mediacodec sandbox on Android) to instantiate a session and cause `SESSION_INIT_DONE`/`SYS_INIT_DONE` messages to be parsed; no CAP_SYS_ADMIN or root is involved.\nUI:N - Once a codec session exists, the malformed packet is consumed automatically by `venus_isr_thread()` on the firmware interrupt. No action by any other user is needed.\nS:U - The out-of-bounds access occurs in kernel memory and the impacted component is the same kernel that contains the vulnerable driver; no VM, IOMMU, or sandbox authority boundary is crossed.\nC:H - `hfi_parser()` and `event_seq_changed()` walk up to `hdr->size` (a full u32, ~4 GB) past the 12 KB `pkt_buf` inside `struct venus_hfi_device`, reading adjacent kernel heap; the harvested bytes are stored into `core->caps` (formats, profile/level, capability ranges) and event data that userspace can read back via `VIDIOC_ENUM_FMT`, `QUERY_EXT_CTRL`, and V4L2 events, giving a practical kernel-memory disclosure primitive.\nI:H - The unbounded parse writes attacker-influenced out-of-bounds data into persistent driver state — codec capability arrays, profile/level tables, and `hfi_buffer_requirements` — which later drive buffer sizing and control ranges, corrupting kernel state in a way that can cascade into further memory corruption.\nA:H - An oversized `hdr->size` makes the parser walk far beyond the slab-allocated `venus_hfi_device` into unmapped memory, producing a kernel oops/panic in the interrupt thread; it can be triggered repeatedly by any process able to open the codec device."}]}],"affected":[{"product":"Linux","vendor":"Linux","defaultStatus":"unaffected","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/media/platform/qcom/venus/hfi_venus.c"],"versions":[{"version":"d96d3f30c0f2f564f6922bf4ccdf4464992e31fb","lessThan":"0520c89f6280d2b60ab537d5743601185ee7d8ab","status":"affected","versionType":"git"},{"version":"d96d3f30c0f2f564f6922bf4ccdf4464992e31fb","lessThan":"f5b7a943055a4a106d40a03bacd940e28cc1955f","status":"affected","versionType":"git"},{"version":"d96d3f30c0f2f564f6922bf4ccdf4464992e31fb","lessThan":"ef09b96665f16f3f0bac4e111160e6f24f1f8791","status":"affected","versionType":"git"},{"version":"d96d3f30c0f2f564f6922bf4ccdf4464992e31fb","lessThan":"7638bae4539dcebc3f68fda74ac35d73618ec440","status":"affected","versionType":"git"},{"version":"d96d3f30c0f2f564f6922bf4ccdf4464992e31fb","lessThan":"ba567c2e52fbcf0e20502746bdaa79e911c2e8cf","status":"affected","versionType":"git"},{"version":"d96d3f30c0f2f564f6922bf4ccdf4464992e31fb","lessThan":"2d8cea8310a245730816a1fd0c9fa4a5a3bdc68c","status":"affected","versionType":"git"},{"version":"d96d3f30c0f2f564f6922bf4ccdf4464992e31fb","lessThan":"f0cbd9386f974d310a0d20a02e4a1323e95ea654","status":"affected","versionType":"git"},{"version":"d96d3f30c0f2f564f6922bf4ccdf4464992e31fb","lessThan":"49befc830daa743e051a65468c05c2ff9e8580e6","status":"affected","versionType":"git"}]},{"product":"Linux","vendor":"Linux","defaultStatus":"affected","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/media/platform/qcom/venus/hfi_venus.c"],"versions":[{"version":"4.13","status":"affected"},{"version":"0","lessThan":"4.13","status":"unaffected","versionType":"semver"},{"version":"5.4.297","lessThanOrEqual":"5.4.*","status":"unaffected","versionType":"semver"},{"version":"5.10.241","lessThanOrEqual":"5.10.*","status":"unaffected","versionType":"semver"},{"version":"5.15.190","lessThanOrEqual":"5.15.*","status":"unaffected","versionType":"semver"},{"version":"6.1.149","lessThanOrEqual":"6.1.*","status":"unaffected","versionType":"semver"},{"version":"6.6.103","lessThanOrEqual":"6.6.*","status":"unaffected","versionType":"semver"},{"version":"6.12.44","lessThanOrEqual":"6.12.*","status":"unaffected","versionType":"semver"},{"version":"6.16.4","lessThanOrEqual":"6.16.*","status":"unaffected","versionType":"semver"},{"version":"6.17","lessThanOrEqual":"*","status":"unaffected","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.13","versionEndExcluding":"5.4.297"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.13","versionEndExcluding":"5.10.241"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.13","versionEndExcluding":"5.15.190"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.13","versionEndExcluding":"6.1.149"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.13","versionEndExcluding":"6.6.103"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.13","versionEndExcluding":"6.12.44"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.13","versionEndExcluding":"6.16.4"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.13","versionEndExcluding":"6.17"}]}]}],"references":[{"url":"https://git.kernel.org/stable/c/0520c89f6280d2b60ab537d5743601185ee7d8ab"},{"url":"https://git.kernel.org/stable/c/f5b7a943055a4a106d40a03bacd940e28cc1955f"},{"url":"https://git.kernel.org/stable/c/ef09b96665f16f3f0bac4e111160e6f24f1f8791"},{"url":"https://git.kernel.org/stable/c/7638bae4539dcebc3f68fda74ac35d73618ec440"},{"url":"https://git.kernel.org/stable/c/ba567c2e52fbcf0e20502746bdaa79e911c2e8cf"},{"url":"https://git.kernel.org/stable/c/2d8cea8310a245730816a1fd0c9fa4a5a3bdc68c"},{"url":"https://git.kernel.org/stable/c/f0cbd9386f974d310a0d20a02e4a1323e95ea654"},{"url":"https://git.kernel.org/stable/c/49befc830daa743e051a65468c05c2ff9e8580e6"}],"title":"media: venus: Add a check for packet size after reading from shared memory","x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CVE Program Container","references":[{"url":"https://lists.debian.org/debian-lts-announce/2025/10/msg00008.html"},{"url":"https://lists.debian.org/debian-lts-announce/2025/10/msg00007.html"}],"providerMetadata":{"orgId":"af854a3a-2127-422b-91ae-364da2661108","shortName":"CVE","dateUpdated":"2025-11-03T17:42:37.345Z"}},{"x_adpType":"supplier","providerMetadata":{"orgId":"0b142b55-0307-4c5a-b3c9-f314f3fb7c5e","shortName":"siemens-SADP","dateUpdated":"2026-05-12T12:06:29.037Z"},"affected":[{"vendor":"Siemens","product":"SIMATIC CN 4100","versions":[{"status":"affected","version":"0","lessThan":"V5.0","versionType":"custom"}],"defaultStatus":"unknown"}],"references":[{"url":"https://cert-portal.siemens.com/productcert/html/ssa-032379.html"}]}]}}