← Back to CVE Explorer

CVE-2026-64233

Full vulnerability record from the local CVENow database.

Description

In the Linux kernel, the following vulnerability has been resolved: usb: gadget: uvc: hold opts->lock across XU walks in uvc_function_bind uvc_function_bind() walks &opts->extension_units twice without holding opts->lock: - directly, for the iExtension string-descriptor fixup loop; - indirectly, four times via uvc_copy_descriptors() (once per speed), where the helper iterates uvc->desc.extension_units (which aliases &opts->extension_units) to size and emit XU descriptors. The configfs side (uvcg_extension_make / uvcg_extension_drop, in drivers/usb/gadget/function/uvc_configfs.c) takes opts->lock around its list_add_tail / list_del operations. A privileged userspace process that holds the configfs subtree open and writes the gadget UDC name to bind the function while concurrently rmdir()'ing an extensions subdir can race uvcg_extension_drop() against the bind-time list walks and dereference a freed struct uvcg_extension. Hold opts->lock from the start of the XU string-descriptor fixup through the last uvc_copy_descriptors() call, releasing on the descriptor-error path via a new error_unlock label that drops the lock before falling through to the existing error label. This matches the locking discipline of the configfs callbacks and removes the only remaining unsynchronised reader of the XU list during bind. Reachability: only privileged processes that can mount configfs and write to gadget UDC files can trigger the race, so this is a correctness fix rather than a security boundary.

Severity
MEDIUM
CVSS score
5.5 (v3.1)
Vulnerability status
Analyzed
Source identifier
416baaa9-dc9f-4396-8d5f-8c081fb06d67
Published
2026-07-24 16:16:52.490000
Last modified
2026-11-08 16:10:00.183000
View original CVE JSON
{
  "id": "CVE-2026-64233",
  "sourceIdentifier": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
  "published": "2026-07-24T16:16:52.490",
  "lastModified": "2026-11-08T16:10:00.183",
  "vulnStatus": "Analyzed",
  "cveTags": [],
  "descriptions": [
    {
      "lang": "en",
      "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nusb: gadget: uvc: hold opts->lock across XU walks in uvc_function_bind\n\nuvc_function_bind() walks &opts->extension_units twice without holding\nopts->lock:\n\n  - directly, for the iExtension string-descriptor fixup loop;\n  - indirectly, four times via uvc_copy_descriptors() (once per speed),\n    where the helper iterates uvc->desc.extension_units (which aliases\n    &opts->extension_units) to size and emit XU descriptors.\n\nThe configfs side (uvcg_extension_make / uvcg_extension_drop, in\ndrivers/usb/gadget/function/uvc_configfs.c) takes opts->lock around its\nlist_add_tail / list_del operations.  A privileged userspace process\nthat holds the configfs subtree open and writes the gadget UDC name\nto bind the function while concurrently rmdir()'ing an extensions\nsubdir can race uvcg_extension_drop() against the bind-time list walks\nand dereference a freed struct uvcg_extension.\n\nHold opts->lock from the start of the XU string-descriptor fixup\nthrough the last uvc_copy_descriptors() call, releasing on the\ndescriptor-error path via a new error_unlock label that drops the\nlock before falling through to the existing error label.  This\nmatches the locking discipline of the configfs callbacks and removes\nthe only remaining unsynchronised reader of the XU list during bind.\n\nReachability: only privileged processes that can mount configfs and\nwrite to gadget UDC files can trigger the race, so this is a\ncorrectness fix rather than a security boundary."
    },
    {
      "lang": "es",
      "value": "En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta:\n\nusb: gadget: uvc: mantener opts -> lock durante los recorridos XU en uvc_function_bind\n\nuvc_function_bind() recorre &opts -> extension_units dos veces sin mantener opts -> lock:\n\n  - directamente, para el bucle de corrección del descriptor de cadena iExtension;\n  - indirectamente, cuatro veces a través de uvc_copy_descriptors() (una vez por velocidad), donde la función auxiliar itera uvc -> desc.extension_units (que es un alias de &opts -> extension_units) para dimensionar y emitir descriptores XU.\n\nEl lado de configfs (uvcg_extension_make / uvcg_extension_drop, en drivers/usb/gadget/function/uvc_configfs.c) toma opts -> lock alrededor de sus operaciones list_add_tail / list_del. Un proceso privilegiado de espacio de usuario que mantiene abierto el subárbol de configfs y escribe el nombre UDC del gadget para enlazar la función mientras simultáneamente ejecuta rmdir() en un subdirectorio de extensiones puede competir con uvcg_extension_drop() contra los recorridos de lista en tiempo de enlace y desreferenciar una struct uvcg_extension liberada.\n\nMantener opts -> lock desde el inicio de la corrección del descriptor de cadena XU hasta la última llamada a uvc_copy_descriptors(), liberando en la ruta de error del descriptor a través de una nueva etiqueta error_unlock que suelta el bloqueo antes de pasar a la etiqueta de error existente. Esto coincide con la disciplina de bloqueo de las retrollamadas de configfs y elimina el único lector no sincronizado restante de la lista XU durante el enlace.\n\nAlcance: solo procesos privilegiados que pueden montar configfs y escribir en archivos UDC de gadget pueden desencadenar la condición de carrera, por lo que esta es una corrección de exactitud en lugar de un límite de seguridad."
    }
  ],
  "affected": [
    {
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
      "affectedData": [
        {
          "vendor": "Linux",
          "product": "Linux",
          "defaultStatus": "unaffected",
          "programFiles": [
            "drivers/usb/gadget/function/f_uvc.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "versions": [
            {
              "version": "0525210c9840229e42c6b68e886c72a75a67cf8e",
              "lessThan": "e15c414092b3c24610cc771e481a723b0f645eca",
              "versionType": "git",
              "status": "affected"
            },
            {
              "version": "0525210c9840229e42c6b68e886c72a75a67cf8e",
              "lessThan": "2c9e0905ef7e69f7b814cd709613f6b3b5b98805",
              "versionType": "git",
              "status": "affected"
            },
            {
              "version": "0525210c9840229e42c6b68e886c72a75a67cf8e",
              "lessThan": "caec0145e5974e85fe5192fc6a6f5aa1a98f82a6",
              "versionType": "git",
              "status": "affected"
            },
            {
              "version": "0525210c9840229e42c6b68e886c72a75a67cf8e",
              "lessThan": "5f1b9cff88982e2a2053d8b1fd983f7ccb9f03cc",
              "versionType": "git",
              "status": "affected"
            },
            {
              "version": "0525210c9840229e42c6b68e886c72a75a67cf8e",
              "lessThan": "68aa70648b625fa684bc0b71bbfd905f4943ca20",
              "versionType": "git",
              "status": "affected"
            }
          ]
        },
        {
          "vendor": "Linux",
          "product": "Linux",
          "defaultStatus": "affected",
          "programFiles": [
            "drivers/usb/gadget/function/f_uvc.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "versions": [
            {
              "version": "6.3",
              "status": "affected"
            },
            {
              "version": "0",
              "lessThan": "6.3",
              "versionType": "semver",
              "status": "unaffected"
            },
            {
              "version": "6.6.143",
              "lessThanOrEqual": "6.6.*",
              "versionType": "semver",
              "status": "unaffected"
            },
            {
              "version": "6.12.93",
              "lessThanOrEqual": "6.12.*",
              "versionType": "semver",
              "status": "unaffected"
            },
            {
              "version": "6.18.35",
              "lessThanOrEqual": "6.18.*",
              "versionType": "semver",
              "status": "unaffected"
            },
            {
              "version": "7.0.12",
              "lessThanOrEqual": "7.0.*",
              "versionType": "semver",
              "status": "unaffected"
            },
            {
              "version": "7.1",
              "lessThanOrEqual": "*",
              "versionType": "original_commit_for_fix",
              "status": "unaffected"
            }
          ]
        }
      ]
    }
  ],
  "metrics": {
    "cvssMetricV31": [
      {
        "source": "[email protected]",
        "type": "Primary",
        "cvssData": {
          "version": "3.1",
          "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H",
          "baseScore": 5.5,
          "baseSeverity": "MEDIUM",
          "attackVector": "LOCAL",
          "attackComplexity": "LOW",
          "privilegesRequired": "LOW",
          "userInteraction": "NONE",
          "scope": "UNCHANGED",
          "confidentialityImpact": "NONE",
          "integrityImpact": "NONE",
          "availabilityImpact": "HIGH"
        },
        "exploitabilityScore": 1.8,
        "impactScore": 3.6
      }
    ]
  },
  "weaknesses": [
    {
      "source": "[email protected]",
      "type": "Primary",
      "description": [
        {
          "lang": "en",
          "value": "NVD-CWE-noinfo"
        }
      ]
    }
  ],
  "configurations": [
    {
      "nodes": [
        {
          "operator": "OR",
          "negate": false,
          "cpeMatch": [
            {
              "vulnerable": true,
              "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
              "versionStartIncluding": "6.3",
              "versionEndExcluding": "6.6.143",
              "matchCriteriaId": "40AC3123-FD85-4602-A174-1E62052982CC"
            },
            {
              "vulnerable": true,
              "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
              "versionStartIncluding": "6.7",
              "versionEndExcluding": "6.12.93",
              "matchCriteriaId": "1E73413E-0629-41AA-A4D3-5A3D10A0BD63"
            },
            {
              "vulnerable": true,
              "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
              "versionStartIncluding": "6.13",
              "versionEndExcluding": "6.18.35",
              "matchCriteriaId": "0FCCB23A-7629-4386-93B6-B119237C4382"
            },
            {
              "vulnerable": true,
              "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
              "versionStartIncluding": "6.19",
              "versionEndExcluding": "7.0.12",
              "matchCriteriaId": "9161A938-0FA8-44BC-95FE-C5A271601AB3"
            },
            {
              "vulnerable": true,
              "criteria": "cpe:2.3:o:linux:linux_kernel:7.1:rc1:*:*:*:*:*:*",
              "matchCriteriaId": "B1EF7059-E670-45F4-B422-54C40FA86390"
            },
            {
              "vulnerable": true,
              "criteria": "cpe:2.3:o:linux:linux_kernel:7.1:rc2:*:*:*:*:*:*",
              "matchCriteriaId": "0D38F0BF-A728-4133-A358-D44A2F7EE6D6"
            },
            {
              "vulnerable": true,
              "criteria": "cpe:2.3:o:linux:linux_kernel:7.1:rc3:*:*:*:*:*:*",
              "matchCriteriaId": "EC732D08-5F7B-46D9-B154-E60C7F4F0A97"
            },
            {
              "vulnerable": true,
              "criteria": "cpe:2.3:o:linux:linux_kernel:7.1:rc4:*:*:*:*:*:*",
              "matchCriteriaId": "E5910A9D-F60A-409A-B486-FE66BFEBA9B9"
            },
            {
              "vulnerable": true,
              "criteria": "cpe:2.3:o:linux:linux_kernel:7.1:rc5:*:*:*:*:*:*",
              "matchCriteriaId": "81DFF19E-9CF8-49C6-8C36-1E4038622933"
            }
          ]
        }
      ]
    }
  ],
  "references": [
    {
      "url": "https://git.kernel.org/stable/c/2c9e0905ef7e69f7b814cd709613f6b3b5b98805",
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
      "tags": [
        "Patch"
      ]
    },
    {
      "url": "https://git.kernel.org/stable/c/5f1b9cff88982e2a2053d8b1fd983f7ccb9f03cc",
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
      "tags": [
        "Patch"
      ]
    },
    {
      "url": "https://git.kernel.org/stable/c/68aa70648b625fa684bc0b71bbfd905f4943ca20",
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
      "tags": [
        "Patch"
      ]
    },
    {
      "url": "https://git.kernel.org/stable/c/caec0145e5974e85fe5192fc6a6f5aa1a98f82a6",
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
      "tags": [
        "Patch"
      ]
    },
    {
      "url": "https://git.kernel.org/stable/c/e15c414092b3c24610cc771e481a723b0f645eca",
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
      "tags": [
        "Patch"
      ]
    }
  ]
}