{
    "dataType": "CVE_RECORD",
    "dataVersion": "5.2",
    "cveMetadata": {
        "cveId": "CVE-2025-23157",
        "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "state": "PUBLISHED",
        "assignerShortName": "Linux",
        "dateReserved": "2025-01-11T14:28:41.514Z",
        "datePublished": "2025-05-01T12:55:43.193Z",
        "dateUpdated": "2026-08-05T11:57:08.273Z"
    },
    "containers": {
        "cna": {
            "providerMetadata": {
                "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
                "shortName": "Linux",
                "dateUpdated": "2026-08-05T11:57:08.273Z"
            },
            "descriptions": [
                {
                    "lang": "en",
                    "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nmedia: venus: hfi_parser: add check to avoid out of bound access\n\nThere is a possibility that init_codecs is invoked multiple times during\nmanipulated payload from video firmware. In such case, if codecs_count\ncan get incremented to value more than MAX_CODEC_NUM, there can be OOB\naccess. Reset the count so that it always starts from beginning."
                }
            ],
            "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 parser is reached through the local V4L2 device nodes (/dev/video*) — session-init parsing on V1 hardware and core-init parsing after a driver-triggered firmware re-init — plus the HFI shared-memory queue from the on-die video co-processor; there is no network or physical-bus reachability.\nAC:L - No race and no dependence on uncontrolled memory layout: the attacker either supplies a payload with repeated CODEC_SUPPORTED properties (fully attacker-chosen index and value) or, on HFI_VERSION_1XX where codecs_count is never reset, simply loops session init/deinit until the counter exceeds MAX_CODEC_NUM; the driver is enabled in standard arm64/Android/embedded Qualcomm configurations.\nPR:L - Triggering the session-init parse path only requires opening the venus decoder/encoder node and issuing REQBUFS/STREAMON, which any local user in the video group (desktop uaccess ACL) or any Android app with normal mediacodec access can do — no root or capability is needed.\nUI:N - The attacker's own process drives the ioctl sequence and the firmware message handling runs asynchronously in the driver's IRQ/worker context; no victim action is involved.\nS:U - The out-of-bounds accesses corrupt and disclose kernel heap memory within the same kernel security authority; no VM, IOMMU, or sandbox boundary is crossed.\nC:H - Overflowing into codecs_count makes venus_caps_by_codec() iterate far past core->caps[], and the out-of-bounds hfi_plat_caps contents (formats, profile/levels, capability min/max) are handed back to userspace via V4L2 format and control enumeration, giving a broad kernel memory disclosure; the write primitive further enables leveraged reads.\nI:H - This is an out-of-bounds write with an attacker-controlled index (up to megabytes past a ~30 KB allocation) and attacker-selected power-of-two values, corrupting kernel pointers (core->root, core->ocs) and adjacent heap objects — a classic primitive for control-flow hijack.\nA:H - Corrupting codecs_count to a huge value causes an immediate unbounded scan of kernel memory, and clobbering the adjacent dentry/of_changeset pointers leads to an oops or panic on next use."
                        }
                    ]
                }
            ],
            "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_parser.c"
                    ],
                    "versions": [
                        {
                            "version": "1a73374a04e555103e5369429a30999114001dda",
                            "lessThan": "e5133a0b25463674903fdc0528e0a29b7267130e",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "1a73374a04e555103e5369429a30999114001dda",
                            "lessThan": "2b8b9ea4e26a501eb220ea189e42b4527e65bdfa",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "1a73374a04e555103e5369429a30999114001dda",
                            "lessThan": "1ad6aa1464b8a5ce5c194458315021e8d216108e",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "1a73374a04e555103e5369429a30999114001dda",
                            "lessThan": "26bbedd06d85770581fda5d78e78539bb088fad1",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "1a73374a04e555103e5369429a30999114001dda",
                            "lessThan": "d4d88ece4ba91df5b02f1d3f599650f9e9fc0f45",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "1a73374a04e555103e5369429a30999114001dda",
                            "lessThan": "53e376178ceacca3ef1795038b22fc9ef45ff1d3",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "1a73374a04e555103e5369429a30999114001dda",
                            "lessThan": "b2541e29d82da8a0df728aadec3e0a8db55d517b",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "1a73374a04e555103e5369429a30999114001dda",
                            "lessThan": "cb5be9039f91979f8a2fac29f529f746d7848f3e",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "1a73374a04e555103e5369429a30999114001dda",
                            "lessThan": "172bf5a9ef70a399bb227809db78442dc01d9e48",
                            "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_parser.c"
                    ],
                    "versions": [
                        {
                            "version": "4.19",
                            "status": "affected"
                        },
                        {
                            "version": "0",
                            "lessThan": "4.19",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.4.293",
                            "lessThanOrEqual": "5.4.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.10.237",
                            "lessThanOrEqual": "5.10.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.15.181",
                            "lessThanOrEqual": "5.15.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.1.135",
                            "lessThanOrEqual": "6.1.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.6.88",
                            "lessThanOrEqual": "6.6.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.12.24",
                            "lessThanOrEqual": "6.12.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.13.12",
                            "lessThanOrEqual": "6.13.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.14.3",
                            "lessThanOrEqual": "6.14.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.15",
                            "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.19",
                                    "versionEndExcluding": "5.4.293"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "4.19",
                                    "versionEndExcluding": "5.10.237"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "4.19",
                                    "versionEndExcluding": "5.15.181"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "4.19",
                                    "versionEndExcluding": "6.1.135"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "4.19",
                                    "versionEndExcluding": "6.6.88"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "4.19",
                                    "versionEndExcluding": "6.12.24"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "4.19",
                                    "versionEndExcluding": "6.13.12"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "4.19",
                                    "versionEndExcluding": "6.14.3"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "4.19",
                                    "versionEndExcluding": "6.15"
                                }
                            ]
                        }
                    ]
                }
            ],
            "references": [
                {
                    "url": "https://git.kernel.org/stable/c/e5133a0b25463674903fdc0528e0a29b7267130e"
                },
                {
                    "url": "https://git.kernel.org/stable/c/2b8b9ea4e26a501eb220ea189e42b4527e65bdfa"
                },
                {
                    "url": "https://git.kernel.org/stable/c/1ad6aa1464b8a5ce5c194458315021e8d216108e"
                },
                {
                    "url": "https://git.kernel.org/stable/c/26bbedd06d85770581fda5d78e78539bb088fad1"
                },
                {
                    "url": "https://git.kernel.org/stable/c/d4d88ece4ba91df5b02f1d3f599650f9e9fc0f45"
                },
                {
                    "url": "https://git.kernel.org/stable/c/53e376178ceacca3ef1795038b22fc9ef45ff1d3"
                },
                {
                    "url": "https://git.kernel.org/stable/c/b2541e29d82da8a0df728aadec3e0a8db55d517b"
                },
                {
                    "url": "https://git.kernel.org/stable/c/cb5be9039f91979f8a2fac29f529f746d7848f3e"
                },
                {
                    "url": "https://git.kernel.org/stable/c/172bf5a9ef70a399bb227809db78442dc01d9e48"
                }
            ],
            "title": "media: venus: hfi_parser: add check to avoid out of bound access",
            "x_generator": {
                "engine": "bippy-1.2.0"
            }
        },
        "adp": [
            {
                "title": "CVE Program Container",
                "references": [
                    {
                        "url": "https://lists.debian.org/debian-lts-announce/2025/05/msg00045.html"
                    },
                    {
                        "url": "https://lists.debian.org/debian-lts-announce/2025/05/msg00030.html"
                    }
                ],
                "providerMetadata": {
                    "orgId": "af854a3a-2127-422b-91ae-364da2661108",
                    "shortName": "CVE",
                    "dateUpdated": "2025-11-03T19:42:53.952Z"
                }
            }
        ]
    }
}