{
    "dataType": "CVE_RECORD",
    "cveMetadata": {
        "cveId": "CVE-2024-38621",
        "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "state": "PUBLISHED",
        "assignerShortName": "Linux",
        "dateReserved": "2024-06-18T19:36:34.945Z",
        "datePublished": "2024-06-21T10:18:14.955Z",
        "dateUpdated": "2024-09-11T17:34:45.084Z"
    },
    "containers": {
        "cna": {
            "providerMetadata": {
                "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
                "shortName": "Linux",
                "dateUpdated": "2024-07-15T06:49:14.722Z"
            },
            "descriptions": [
                {
                    "lang": "en",
                    "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nmedia: stk1160: fix bounds checking in stk1160_copy_video()\n\nThe subtract in this condition is reversed.  The ->length is the length\nof the buffer.  The ->bytesused is how many bytes we have copied thus\nfar.  When the condition is reversed that means the result of the\nsubtraction is always negative but since it's unsigned then the result\nis a very high positive value.  That means the overflow check is never\ntrue.\n\nAdditionally, the ->bytesused doesn't actually work for this purpose\nbecause we're not writing to \"buf->mem + buf->bytesused\".  Instead, the\nmath to calculate the destination where we are writing is a bit\ninvolved.  You calculate the number of full lines already written,\nmultiply by two, skip a line if necessary so that we start on an odd\nnumbered line, and add the offset into the line.\n\nTo fix this buffer overflow, just take the actual destination where we\nare writing, if the offset is already out of bounds print an error and\nreturn.  Otherwise, write up to buf->length bytes."
                }
            ],
            "affected": [
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "unaffected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "drivers/media/usb/stk1160/stk1160-video.c"
                    ],
                    "versions": [
                        {
                            "version": "9cb2173e6ea8",
                            "lessThan": "f6a392266276",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "9cb2173e6ea8",
                            "lessThan": "ecf4ddc3aee8",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "9cb2173e6ea8",
                            "lessThan": "a16775828aae",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "9cb2173e6ea8",
                            "lessThan": "7532bcec0797",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "9cb2173e6ea8",
                            "lessThan": "b504518a3970",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "9cb2173e6ea8",
                            "lessThan": "d410017a7181",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "9cb2173e6ea8",
                            "lessThan": "a08492832cc4",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "9cb2173e6ea8",
                            "lessThan": "faa4364bef2e",
                            "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/usb/stk1160/stk1160-video.c"
                    ],
                    "versions": [
                        {
                            "version": "3.7",
                            "status": "affected"
                        },
                        {
                            "version": "0",
                            "lessThan": "3.7",
                            "status": "unaffected",
                            "versionType": "custom"
                        },
                        {
                            "version": "4.19.316",
                            "lessThanOrEqual": "4.19.*",
                            "status": "unaffected",
                            "versionType": "custom"
                        },
                        {
                            "version": "5.4.278",
                            "lessThanOrEqual": "5.4.*",
                            "status": "unaffected",
                            "versionType": "custom"
                        },
                        {
                            "version": "5.10.219",
                            "lessThanOrEqual": "5.10.*",
                            "status": "unaffected",
                            "versionType": "custom"
                        },
                        {
                            "version": "5.15.161",
                            "lessThanOrEqual": "5.15.*",
                            "status": "unaffected",
                            "versionType": "custom"
                        },
                        {
                            "version": "6.1.93",
                            "lessThanOrEqual": "6.1.*",
                            "status": "unaffected",
                            "versionType": "custom"
                        },
                        {
                            "version": "6.6.33",
                            "lessThanOrEqual": "6.6.*",
                            "status": "unaffected",
                            "versionType": "custom"
                        },
                        {
                            "version": "6.9.4",
                            "lessThanOrEqual": "6.9.*",
                            "status": "unaffected",
                            "versionType": "custom"
                        },
                        {
                            "version": "6.10",
                            "lessThanOrEqual": "*",
                            "status": "unaffected",
                            "versionType": "original_commit_for_fix"
                        }
                    ]
                }
            ],
            "references": [
                {
                    "url": "https://git.kernel.org/stable/c/f6a392266276730bea893b55d12940e32a25f56a"
                },
                {
                    "url": "https://git.kernel.org/stable/c/ecf4ddc3aee8ade504c4d36b7b4053ce6093e200"
                },
                {
                    "url": "https://git.kernel.org/stable/c/a16775828aaed1c54ff4e6fe83e8e4d5c6a50cb7"
                },
                {
                    "url": "https://git.kernel.org/stable/c/7532bcec0797adfa08791301c3bcae14141db3bd"
                },
                {
                    "url": "https://git.kernel.org/stable/c/b504518a397059e1d55c521ba0ea2b545a6c4b52"
                },
                {
                    "url": "https://git.kernel.org/stable/c/d410017a7181cb55e4a5c810b32b75e4416c6808"
                },
                {
                    "url": "https://git.kernel.org/stable/c/a08492832cc4cacc24e0612f483c86ca899b9261"
                },
                {
                    "url": "https://git.kernel.org/stable/c/faa4364bef2ec0060de381ff028d1d836600a381"
                }
            ],
            "title": "media: stk1160: fix bounds checking in stk1160_copy_video()",
            "x_generator": {
                "engine": "bippy-c9c4e1df01b2"
            }
        },
        "adp": [
            {
                "providerMetadata": {
                    "orgId": "af854a3a-2127-422b-91ae-364da2661108",
                    "shortName": "CVE",
                    "dateUpdated": "2024-08-02T04:12:25.991Z"
                },
                "title": "CVE Program Container",
                "references": [
                    {
                        "url": "https://git.kernel.org/stable/c/f6a392266276730bea893b55d12940e32a25f56a",
                        "tags": [
                            "x_transferred"
                        ]
                    },
                    {
                        "url": "https://git.kernel.org/stable/c/ecf4ddc3aee8ade504c4d36b7b4053ce6093e200",
                        "tags": [
                            "x_transferred"
                        ]
                    },
                    {
                        "url": "https://git.kernel.org/stable/c/a16775828aaed1c54ff4e6fe83e8e4d5c6a50cb7",
                        "tags": [
                            "x_transferred"
                        ]
                    },
                    {
                        "url": "https://git.kernel.org/stable/c/7532bcec0797adfa08791301c3bcae14141db3bd",
                        "tags": [
                            "x_transferred"
                        ]
                    },
                    {
                        "url": "https://git.kernel.org/stable/c/b504518a397059e1d55c521ba0ea2b545a6c4b52",
                        "tags": [
                            "x_transferred"
                        ]
                    },
                    {
                        "url": "https://git.kernel.org/stable/c/d410017a7181cb55e4a5c810b32b75e4416c6808",
                        "tags": [
                            "x_transferred"
                        ]
                    },
                    {
                        "url": "https://git.kernel.org/stable/c/a08492832cc4cacc24e0612f483c86ca899b9261",
                        "tags": [
                            "x_transferred"
                        ]
                    },
                    {
                        "url": "https://git.kernel.org/stable/c/faa4364bef2ec0060de381ff028d1d836600a381",
                        "tags": [
                            "x_transferred"
                        ]
                    }
                ]
            },
            {
                "metrics": [
                    {
                        "other": {
                            "type": "ssvc",
                            "content": {
                                "id": "CVE-2024-38621",
                                "role": "CISA Coordinator",
                                "options": [
                                    {
                                        "Exploitation": "none"
                                    },
                                    {
                                        "Automatable": "no"
                                    },
                                    {
                                        "Technical Impact": "partial"
                                    }
                                ],
                                "version": "2.0.3",
                                "timestamp": "2024-09-10T17:09:18.748299Z"
                            }
                        }
                    }
                ],
                "title": "CISA ADP Vulnrichment",
                "providerMetadata": {
                    "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
                    "shortName": "CISA-ADP",
                    "dateUpdated": "2024-09-11T17:34:45.084Z"
                }
            }
        ]
    },
    "dataVersion": "5.1"
}