CVE-2025-21835 (GCVE-0-2025-21835)
Vulnerability from cvelistv5
Published
2025-03-07 09:09
Modified
2025-05-04 07:22
Severity ?
Summary
In the Linux kernel, the following vulnerability has been resolved: usb: gadget: f_midi: fix MIDI Streaming descriptor lengths While the MIDI jacks are configured correctly, and the MIDIStreaming endpoint descriptors are filled with the correct information, bNumEmbMIDIJack and bLength are set incorrectly in these descriptors. This does not matter when the numbers of in and out ports are equal, but when they differ the host will receive broken descriptors with uninitialized stack memory leaking into the descriptor for whichever value is smaller. The precise meaning of "in" and "out" in the port counts is not clearly defined and can be confusing. But elsewhere the driver consistently uses this to match the USB meaning of IN and OUT viewed from the host, so that "in" ports send data to the host and "out" ports receive data from it.
Impacted products
Vendor Product Version
Linux Linux Version: c8933c3f79568263c90a46f06cf80419e6c63c97
Version: c8933c3f79568263c90a46f06cf80419e6c63c97
Version: c8933c3f79568263c90a46f06cf80419e6c63c97
Version: c8933c3f79568263c90a46f06cf80419e6c63c97
Version: c8933c3f79568263c90a46f06cf80419e6c63c97
Version: c8933c3f79568263c90a46f06cf80419e6c63c97
Version: c8933c3f79568263c90a46f06cf80419e6c63c97
Version: c8933c3f79568263c90a46f06cf80419e6c63c97
Create a notification for this product.
Show details on NVD website


{
  "containers": {
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "drivers/usb/gadget/function/f_midi.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "3a983390d14e8498f303fc5cb23ab7d696b815db",
              "status": "affected",
              "version": "c8933c3f79568263c90a46f06cf80419e6c63c97",
              "versionType": "git"
            },
            {
              "lessThan": "9f36a89dcb78cb7e37f487b04a16396ac18c0636",
              "status": "affected",
              "version": "c8933c3f79568263c90a46f06cf80419e6c63c97",
              "versionType": "git"
            },
            {
              "lessThan": "d8e86700c8a8cf415e300a0921acd6a8f9b494f8",
              "status": "affected",
              "version": "c8933c3f79568263c90a46f06cf80419e6c63c97",
              "versionType": "git"
            },
            {
              "lessThan": "9f6860a9c11301b052225ca8825f8d2b1a5825bf",
              "status": "affected",
              "version": "c8933c3f79568263c90a46f06cf80419e6c63c97",
              "versionType": "git"
            },
            {
              "lessThan": "6ae6dee9f005a2f3b739b85abb6f14a0935699e0",
              "status": "affected",
              "version": "c8933c3f79568263c90a46f06cf80419e6c63c97",
              "versionType": "git"
            },
            {
              "lessThan": "6b16761a928796e4b49e89a0b1ac284155172726",
              "status": "affected",
              "version": "c8933c3f79568263c90a46f06cf80419e6c63c97",
              "versionType": "git"
            },
            {
              "lessThan": "a2d0694e1f111379c1efdf439dadd3cfd959fe9d",
              "status": "affected",
              "version": "c8933c3f79568263c90a46f06cf80419e6c63c97",
              "versionType": "git"
            },
            {
              "lessThan": "da1668997052ed1cb00322e1f3b63702615c9429",
              "status": "affected",
              "version": "c8933c3f79568263c90a46f06cf80419e6c63c97",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "drivers/usb/gadget/function/f_midi.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "3.2"
            },
            {
              "lessThan": "3.2",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.4.*",
              "status": "unaffected",
              "version": "5.4.291",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.10.*",
              "status": "unaffected",
              "version": "5.10.235",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.15.*",
              "status": "unaffected",
              "version": "5.15.179",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.1.*",
              "status": "unaffected",
              "version": "6.1.129",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.6.*",
              "status": "unaffected",
              "version": "6.6.79",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.12.*",
              "status": "unaffected",
              "version": "6.12.16",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.13.*",
              "status": "unaffected",
              "version": "6.13.4",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.14",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.4.291",
                  "versionStartIncluding": "3.2",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.10.235",
                  "versionStartIncluding": "3.2",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.15.179",
                  "versionStartIncluding": "3.2",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.1.129",
                  "versionStartIncluding": "3.2",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.6.79",
                  "versionStartIncluding": "3.2",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.12.16",
                  "versionStartIncluding": "3.2",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.13.4",
                  "versionStartIncluding": "3.2",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.14",
                  "versionStartIncluding": "3.2",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nusb: gadget: f_midi: fix MIDI Streaming descriptor lengths\n\nWhile the MIDI jacks are configured correctly, and the MIDIStreaming\nendpoint descriptors are filled with the correct information,\nbNumEmbMIDIJack and bLength are set incorrectly in these descriptors.\n\nThis does not matter when the numbers of in and out ports are equal, but\nwhen they differ the host will receive broken descriptors with\nuninitialized stack memory leaking into the descriptor for whichever\nvalue is smaller.\n\nThe precise meaning of \"in\" and \"out\" in the port counts is not clearly\ndefined and can be confusing.  But elsewhere the driver consistently\nuses this to match the USB meaning of IN and OUT viewed from the host,\nso that \"in\" ports send data to the host and \"out\" ports receive data\nfrom it."
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2025-05-04T07:22:08.504Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/3a983390d14e8498f303fc5cb23ab7d696b815db"
        },
        {
          "url": "https://git.kernel.org/stable/c/9f36a89dcb78cb7e37f487b04a16396ac18c0636"
        },
        {
          "url": "https://git.kernel.org/stable/c/d8e86700c8a8cf415e300a0921acd6a8f9b494f8"
        },
        {
          "url": "https://git.kernel.org/stable/c/9f6860a9c11301b052225ca8825f8d2b1a5825bf"
        },
        {
          "url": "https://git.kernel.org/stable/c/6ae6dee9f005a2f3b739b85abb6f14a0935699e0"
        },
        {
          "url": "https://git.kernel.org/stable/c/6b16761a928796e4b49e89a0b1ac284155172726"
        },
        {
          "url": "https://git.kernel.org/stable/c/a2d0694e1f111379c1efdf439dadd3cfd959fe9d"
        },
        {
          "url": "https://git.kernel.org/stable/c/da1668997052ed1cb00322e1f3b63702615c9429"
        }
      ],
      "title": "usb: gadget: f_midi: fix MIDI Streaming descriptor lengths",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2025-21835",
    "datePublished": "2025-03-07T09:09:55.320Z",
    "dateReserved": "2024-12-29T08:45:45.777Z",
    "dateUpdated": "2025-05-04T07:22:08.504Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.1",
  "vulnerability-lookup:meta": {
    "nvd": "{\"cve\":{\"id\":\"CVE-2025-21835\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2025-03-07T09:15:16.473\",\"lastModified\":\"2025-03-13T13:15:56.920\",\"vulnStatus\":\"Awaiting Analysis\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\nusb: gadget: f_midi: fix MIDI Streaming descriptor lengths\\n\\nWhile the MIDI jacks are configured correctly, and the MIDIStreaming\\nendpoint descriptors are filled with the correct information,\\nbNumEmbMIDIJack and bLength are set incorrectly in these descriptors.\\n\\nThis does not matter when the numbers of in and out ports are equal, but\\nwhen they differ the host will receive broken descriptors with\\nuninitialized stack memory leaking into the descriptor for whichever\\nvalue is smaller.\\n\\nThe precise meaning of \\\"in\\\" and \\\"out\\\" in the port counts is not clearly\\ndefined and can be confusing.  But elsewhere the driver consistently\\nuses this to match the USB meaning of IN and OUT viewed from the host,\\nso that \\\"in\\\" ports send data to the host and \\\"out\\\" ports receive data\\nfrom it.\"},{\"lang\":\"es\",\"value\":\"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: usb: gadget: f_midi: fix MIDI Streaming descriptor lengths Mientras que los conectores MIDI est\u00e1n configurados correctamente, y los descriptores de endpoint MIDIStreaming est\u00e1n llenos con la informaci\u00f3n correcta, bNumEmbMIDIJack y bLength est\u00e1n configurados incorrectamente en estos descriptores. Esto no importa cuando los n\u00fameros de puertos de entrada y salida son iguales, pero cuando difieren, el host recibir\u00e1 descriptores rotos con memoria de pila no inicializada que se filtra en el descriptor para el valor que sea menor. El significado preciso de \\\"entrada\\\" y \\\"salida\\\" en los recuentos de puertos no est\u00e1 claramente definido y puede ser confuso. Pero en otros lugares, el controlador usa esto constantemente para que coincida con el significado USB de IN y OUT visto desde el host, de modo que los puertos \\\"de entrada\\\" env\u00edan datos al host y los puertos \\\"de salida\\\" reciben datos de \u00e9l.\"}],\"metrics\":{},\"references\":[{\"url\":\"https://git.kernel.org/stable/c/3a983390d14e8498f303fc5cb23ab7d696b815db\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/6ae6dee9f005a2f3b739b85abb6f14a0935699e0\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/6b16761a928796e4b49e89a0b1ac284155172726\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/9f36a89dcb78cb7e37f487b04a16396ac18c0636\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/9f6860a9c11301b052225ca8825f8d2b1a5825bf\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/a2d0694e1f111379c1efdf439dadd3cfd959fe9d\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/d8e86700c8a8cf415e300a0921acd6a8f9b494f8\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/da1668997052ed1cb00322e1f3b63702615c9429\",\"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.


Loading…

Loading…