CVE-2022-50514 (GCVE-0-2022-50514)
Vulnerability from cvelistv5
Published
2025-10-07 15:19
Modified
2025-10-07 15:19
Severity ?
Summary
In the Linux kernel, the following vulnerability has been resolved: usb: gadget: f_hid: fix refcount leak on error path When failing to allocate report_desc, opts->refcnt has already been incremented so it needs to be decremented to avoid leaving the options structure permanently locked.
Impacted products
Vendor Product Version
Linux Linux Version: 21a9476a7ba847e413bf1c144d7c614532aed6dd
Version: 21a9476a7ba847e413bf1c144d7c614532aed6dd
Version: 21a9476a7ba847e413bf1c144d7c614532aed6dd
Version: 21a9476a7ba847e413bf1c144d7c614532aed6dd
Version: 21a9476a7ba847e413bf1c144d7c614532aed6dd
Version: 21a9476a7ba847e413bf1c144d7c614532aed6dd
Version: 21a9476a7ba847e413bf1c144d7c614532aed6dd
Create a notification for this product.
Show details on NVD website


{
  "containers": {
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "drivers/usb/gadget/function/f_hid.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "95412c932b3c9e8cc4431dac4fac8fcd80d54982",
              "status": "affected",
              "version": "21a9476a7ba847e413bf1c144d7c614532aed6dd",
              "versionType": "git"
            },
            {
              "lessThan": "80dc47e751a837106c09bec73964ff8f7ea280b4",
              "status": "affected",
              "version": "21a9476a7ba847e413bf1c144d7c614532aed6dd",
              "versionType": "git"
            },
            {
              "lessThan": "e88b89a096af0001bcff6bf7ad2feb1486487173",
              "status": "affected",
              "version": "21a9476a7ba847e413bf1c144d7c614532aed6dd",
              "versionType": "git"
            },
            {
              "lessThan": "9d4a0aca8a75550d3456c8de339a341dc4536ec5",
              "status": "affected",
              "version": "21a9476a7ba847e413bf1c144d7c614532aed6dd",
              "versionType": "git"
            },
            {
              "lessThan": "ba78f7c10606719f702c04a15fb0471507b32d7b",
              "status": "affected",
              "version": "21a9476a7ba847e413bf1c144d7c614532aed6dd",
              "versionType": "git"
            },
            {
              "lessThan": "216437dd64fce36791a3b6cc8f8013df36856958",
              "status": "affected",
              "version": "21a9476a7ba847e413bf1c144d7c614532aed6dd",
              "versionType": "git"
            },
            {
              "lessThan": "70a3288a7586526315105c699b687d78cd32559a",
              "status": "affected",
              "version": "21a9476a7ba847e413bf1c144d7c614532aed6dd",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "drivers/usb/gadget/function/f_hid.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "3.19"
            },
            {
              "lessThan": "3.19",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "4.19.*",
              "status": "unaffected",
              "version": "4.19.270",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.4.*",
              "status": "unaffected",
              "version": "5.4.229",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.10.*",
              "status": "unaffected",
              "version": "5.10.163",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.15.*",
              "status": "unaffected",
              "version": "5.15.86",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.0.*",
              "status": "unaffected",
              "version": "6.0.16",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.1.*",
              "status": "unaffected",
              "version": "6.1.2",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.2",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "4.19.270",
                  "versionStartIncluding": "3.19",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.4.229",
                  "versionStartIncluding": "3.19",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.10.163",
                  "versionStartIncluding": "3.19",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.15.86",
                  "versionStartIncluding": "3.19",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.0.16",
                  "versionStartIncluding": "3.19",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.1.2",
                  "versionStartIncluding": "3.19",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.2",
                  "versionStartIncluding": "3.19",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nusb: gadget: f_hid: fix refcount leak on error path\n\nWhen failing to allocate report_desc, opts-\u003erefcnt has already been\nincremented so it needs to be decremented to avoid leaving the options\nstructure permanently locked."
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2025-10-07T15:19:10.253Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/95412c932b3c9e8cc4431dac4fac8fcd80d54982"
        },
        {
          "url": "https://git.kernel.org/stable/c/80dc47e751a837106c09bec73964ff8f7ea280b4"
        },
        {
          "url": "https://git.kernel.org/stable/c/e88b89a096af0001bcff6bf7ad2feb1486487173"
        },
        {
          "url": "https://git.kernel.org/stable/c/9d4a0aca8a75550d3456c8de339a341dc4536ec5"
        },
        {
          "url": "https://git.kernel.org/stable/c/ba78f7c10606719f702c04a15fb0471507b32d7b"
        },
        {
          "url": "https://git.kernel.org/stable/c/216437dd64fce36791a3b6cc8f8013df36856958"
        },
        {
          "url": "https://git.kernel.org/stable/c/70a3288a7586526315105c699b687d78cd32559a"
        }
      ],
      "title": "usb: gadget: f_hid: fix refcount leak on error path",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2022-50514",
    "datePublished": "2025-10-07T15:19:10.253Z",
    "dateReserved": "2025-10-07T15:15:38.661Z",
    "dateUpdated": "2025-10-07T15:19:10.253Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.1",
  "vulnerability-lookup:meta": {
    "nvd": "{\"cve\":{\"id\":\"CVE-2022-50514\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2025-10-07T16:15:34.983\",\"lastModified\":\"2025-10-08T19:38:32.610\",\"vulnStatus\":\"Awaiting Analysis\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\nusb: gadget: f_hid: fix refcount leak on error path\\n\\nWhen failing to allocate report_desc, opts-\u003erefcnt has already been\\nincremented so it needs to be decremented to avoid leaving the options\\nstructure permanently locked.\"}],\"metrics\":{},\"references\":[{\"url\":\"https://git.kernel.org/stable/c/216437dd64fce36791a3b6cc8f8013df36856958\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/70a3288a7586526315105c699b687d78cd32559a\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/80dc47e751a837106c09bec73964ff8f7ea280b4\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/95412c932b3c9e8cc4431dac4fac8fcd80d54982\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/9d4a0aca8a75550d3456c8de339a341dc4536ec5\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/ba78f7c10606719f702c04a15fb0471507b32d7b\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/e88b89a096af0001bcff6bf7ad2feb1486487173\",\"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.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • 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…