cve-2024-38621
Vulnerability from cvelistv5
Published
2024-06-21 10:18
Modified
2024-11-05 09:31
Severity ?
Summary
media: stk1160: fix bounds checking in stk1160_copy_video()
Impacted products
LinuxLinux
LinuxLinux
Show details on NVD website


{
  "containers": {
    "adp": [
      {
        "providerMetadata": {
          "dateUpdated": "2024-08-02T04:12:25.991Z",
          "orgId": "af854a3a-2127-422b-91ae-364da2661108",
          "shortName": "CVE"
        },
        "references": [
          {
            "tags": [
              "x_transferred"
            ],
            "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"
          }
        ],
        "title": "CVE Program Container"
      },
      {
        "metrics": [
          {
            "other": {
              "content": {
                "id": "CVE-2024-38621",
                "options": [
                  {
                    "Exploitation": "none"
                  },
                  {
                    "Automatable": "no"
                  },
                  {
                    "Technical Impact": "partial"
                  }
                ],
                "role": "CISA Coordinator",
                "timestamp": "2024-09-10T17:09:18.748299Z",
                "version": "2.0.3"
              },
              "type": "ssvc"
            }
          }
        ],
        "providerMetadata": {
          "dateUpdated": "2024-09-11T17:34:45.084Z",
          "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
          "shortName": "CISA-ADP"
        },
        "title": "CISA ADP Vulnrichment"
      }
    ],
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "drivers/media/usb/stk1160/stk1160-video.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "f6a392266276",
              "status": "affected",
              "version": "9cb2173e6ea8",
              "versionType": "git"
            },
            {
              "lessThan": "ecf4ddc3aee8",
              "status": "affected",
              "version": "9cb2173e6ea8",
              "versionType": "git"
            },
            {
              "lessThan": "a16775828aae",
              "status": "affected",
              "version": "9cb2173e6ea8",
              "versionType": "git"
            },
            {
              "lessThan": "7532bcec0797",
              "status": "affected",
              "version": "9cb2173e6ea8",
              "versionType": "git"
            },
            {
              "lessThan": "b504518a3970",
              "status": "affected",
              "version": "9cb2173e6ea8",
              "versionType": "git"
            },
            {
              "lessThan": "d410017a7181",
              "status": "affected",
              "version": "9cb2173e6ea8",
              "versionType": "git"
            },
            {
              "lessThan": "a08492832cc4",
              "status": "affected",
              "version": "9cb2173e6ea8",
              "versionType": "git"
            },
            {
              "lessThan": "faa4364bef2e",
              "status": "affected",
              "version": "9cb2173e6ea8",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "drivers/media/usb/stk1160/stk1160-video.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "3.7"
            },
            {
              "lessThan": "3.7",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "4.19.*",
              "status": "unaffected",
              "version": "4.19.316",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.4.*",
              "status": "unaffected",
              "version": "5.4.278",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.10.*",
              "status": "unaffected",
              "version": "5.10.219",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.15.*",
              "status": "unaffected",
              "version": "5.15.161",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.1.*",
              "status": "unaffected",
              "version": "6.1.93",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.6.*",
              "status": "unaffected",
              "version": "6.6.33",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.9.*",
              "status": "unaffected",
              "version": "6.9.4",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.10",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "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 -\u003elength is the length\nof the buffer.  The -\u003ebytesused 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\u0027s unsigned then the result\nis a very high positive value.  That means the overflow check is never\ntrue.\n\nAdditionally, the -\u003ebytesused doesn\u0027t actually work for this purpose\nbecause we\u0027re not writing to \"buf-\u003emem + buf-\u003ebytesused\".  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-\u003elength bytes."
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2024-11-05T09:31:07.041Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "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-9e1c9544281a"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2024-38621",
    "datePublished": "2024-06-21T10:18:14.955Z",
    "dateReserved": "2024-06-18T19:36:34.945Z",
    "dateUpdated": "2024-11-05T09:31:07.041Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.1",
  "meta": {
    "nvd": "{\"cve\":{\"id\":\"CVE-2024-38621\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2024-06-21T11:15:11.103\",\"lastModified\":\"2024-07-15T07:15:13.207\",\"vulnStatus\":\"Awaiting Analysis\",\"cveTags\":[],\"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 -\u003elength is the length\\nof the buffer.  The -\u003ebytesused 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\u0027s unsigned then the result\\nis a very high positive value.  That means the overflow check is never\\ntrue.\\n\\nAdditionally, the -\u003ebytesused doesn\u0027t actually work for this purpose\\nbecause we\u0027re not writing to \\\"buf-\u003emem + buf-\u003ebytesused\\\".  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-\u003elength bytes.\"},{\"lang\":\"es\",\"value\":\"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: medios: stk1160: revisi\u00f3n de los l\u00edmites fijos en stk1160_copy_video() La resta en esta condici\u00f3n se invierte. La -\u0026gt;longitud es la longitud del b\u00fafer. El -\u0026gt;byteused es cu\u00e1ntos bytes hemos copiado hasta ahora. Cuando la condici\u00f3n se invierte, eso significa que el resultado de la resta siempre es negativo, pero como no tiene signo, el resultado es un valor positivo muy alto. Eso significa que la verificaci\u00f3n de desbordamiento nunca es cierta. Adem\u00e1s, -\u0026gt;bytesused en realidad no funciona para este prop\u00f3sito porque no estamos escribiendo en \\\"buf-\u0026gt;mem + buf-\u0026gt;bytesused\\\". En cambio, las matem\u00e1ticas para calcular el destino donde estamos escribiendo son un poco complicadas. Calcula el n\u00famero de l\u00edneas completas ya escritas, multiplica por dos, omite una l\u00ednea si es necesario para comenzar en una l\u00ednea impar y agrega el desplazamiento a la l\u00ednea. Para solucionar este desbordamiento del b\u00fafer, simplemente tome el destino real donde estamos escribiendo, si el desplazamiento ya est\u00e1 fuera de los l\u00edmites imprima un error y regrese. De lo contrario, escriba hasta buf-\u0026gt;bytes de longitud.\"}],\"metrics\":{},\"references\":[{\"url\":\"https://git.kernel.org/stable/c/7532bcec0797adfa08791301c3bcae14141db3bd\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/a08492832cc4cacc24e0612f483c86ca899b9261\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/a16775828aaed1c54ff4e6fe83e8e4d5c6a50cb7\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/b504518a397059e1d55c521ba0ea2b545a6c4b52\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/d410017a7181cb55e4a5c810b32b75e4416c6808\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/ecf4ddc3aee8ade504c4d36b7b4053ce6093e200\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/f6a392266276730bea893b55d12940e32a25f56a\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/faa4364bef2ec0060de381ff028d1d836600a381\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"}]}}"
  }
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading...

Loading...

Loading...

Sightings

Author Source Type Date

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
  • Confirmed: The vulnerability is confirmed from an analyst perspective.
  • Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
  • Patched: This vulnerability was successfully patched by the user reporting the sighting.
  • Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
  • Not confirmed: The user expresses doubt about the veracity of the vulnerability.
  • Not patched: This vulnerability was not successfully patched by the user reporting the sighting.