CVE-2022-50330 (GCVE-0-2022-50330)
Vulnerability from cvelistv5
Published
2025-09-15 14:49
Modified
2026-08-05 08:58
Summary
In the Linux kernel, the following vulnerability has been resolved: crypto: cavium - prevent integer overflow loading firmware The "code_length" value comes from the firmware file. If your firmware is untrusted realistically there is probably very little you can do to protect yourself. Still we try to limit the damage as much as possible. Also Smatch marks any data read from the filesystem as untrusted and prints warnings if it not capped correctly. The "ntohl(ucode->code_length) * 2" multiplication can have an integer overflow.
Impacted products
Vendor Product Version
Linux Linux Version: 9e2c7d99941d000a36f68a3594cec27a1bbea274
Version: 9e2c7d99941d000a36f68a3594cec27a1bbea274
Version: 9e2c7d99941d000a36f68a3594cec27a1bbea274
Version: 9e2c7d99941d000a36f68a3594cec27a1bbea274
Version: 9e2c7d99941d000a36f68a3594cec27a1bbea274
Version: 9e2c7d99941d000a36f68a3594cec27a1bbea274
Version: 9e2c7d99941d000a36f68a3594cec27a1bbea274
Version: 9e2c7d99941d000a36f68a3594cec27a1bbea274
Create a notification for this product.
Show details on NVD website


{
  "containers": {
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "drivers/crypto/cavium/cpt/cptpf_main.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "c4d4c2afd08dfb3cd1c880d1811ede2568e81a6d",
              "status": "affected",
              "version": "9e2c7d99941d000a36f68a3594cec27a1bbea274",
              "versionType": "git"
            },
            {
              "lessThan": "90e483e7f20c32287d2a9da967e122938f52737a",
              "status": "affected",
              "version": "9e2c7d99941d000a36f68a3594cec27a1bbea274",
              "versionType": "git"
            },
            {
              "lessThan": "584561e94260268abe1c83e00d9c205565cb7bc5",
              "status": "affected",
              "version": "9e2c7d99941d000a36f68a3594cec27a1bbea274",
              "versionType": "git"
            },
            {
              "lessThan": "3a720eb89026c5241b8c4abb33370dc6fb565eee",
              "status": "affected",
              "version": "9e2c7d99941d000a36f68a3594cec27a1bbea274",
              "versionType": "git"
            },
            {
              "lessThan": "172c8a24fc8312cf6b88d3c88469653fdcb1c127",
              "status": "affected",
              "version": "9e2c7d99941d000a36f68a3594cec27a1bbea274",
              "versionType": "git"
            },
            {
              "lessThan": "371fa5129af53a79f6dddc90fe5bb0825cbe72a4",
              "status": "affected",
              "version": "9e2c7d99941d000a36f68a3594cec27a1bbea274",
              "versionType": "git"
            },
            {
              "lessThan": "e29fd7a6852376d2cfb95ad5d6d3eeff93f815e9",
              "status": "affected",
              "version": "9e2c7d99941d000a36f68a3594cec27a1bbea274",
              "versionType": "git"
            },
            {
              "lessThan": "2526d6bf27d15054bb0778b2f7bc6625fd934905",
              "status": "affected",
              "version": "9e2c7d99941d000a36f68a3594cec27a1bbea274",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "drivers/crypto/cavium/cpt/cptpf_main.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "4.11"
            },
            {
              "lessThan": "4.11",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "4.14.*",
              "status": "unaffected",
              "version": "4.14.296",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "4.19.*",
              "status": "unaffected",
              "version": "4.19.262",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.4.*",
              "status": "unaffected",
              "version": "5.4.220",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.10.*",
              "status": "unaffected",
              "version": "5.10.150",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.15.*",
              "status": "unaffected",
              "version": "5.15.75",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.19.*",
              "status": "unaffected",
              "version": "5.19.17",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.0.*",
              "status": "unaffected",
              "version": "6.0.3",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.1",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "4.14.296",
                  "versionStartIncluding": "4.11",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "4.19.262",
                  "versionStartIncluding": "4.11",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.4.220",
                  "versionStartIncluding": "4.11",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.10.150",
                  "versionStartIncluding": "4.11",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.15.75",
                  "versionStartIncluding": "4.11",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.19.17",
                  "versionStartIncluding": "4.11",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.0.3",
                  "versionStartIncluding": "4.11",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.1",
                  "versionStartIncluding": "4.11",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\ncrypto: cavium - prevent integer overflow loading firmware\n\nThe \"code_length\" value comes from the firmware file.  If your firmware\nis untrusted realistically there is probably very little you can do to\nprotect yourself.  Still we try to limit the damage as much as possible.\nAlso Smatch marks any data read from the filesystem as untrusted and\nprints warnings if it not capped correctly.\n\nThe \"ntohl(ucode-\u003ecode_length) * 2\" multiplication can have an\ninteger overflow."
        }
      ],
      "metrics": [
        {
          "cvssV3_1": {
            "baseScore": 7.1,
            "baseSeverity": "HIGH",
            "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H",
            "version": "3.1"
          },
          "scenarios": [
            {
              "lang": "en",
              "value": "AV:L - The bug is reached only when cpt_probe loads fixed-name blobs (cpt8x-mc-ae.out / cpt8x-mc-se.out) via request_firmware() from the local firmware search path; no network, adjacent, or USB-packet input reaches cpt_ucode_load_fw().\nAC:L - A crafted firmware header with a code_length that makes ntohl(code_length)*2 wrap to a non-zero undersized value deterministically drives the overflow on every probe; the attacker fully controls the blob and no race or layout luck is required.\nPR:L - Consistent with other malformed-firmware probe bugs on embedded/appliance platforms, planting the blob under a firmware search path is treated as low privilege\u2014Octeon-TX networking appliances commonly give firmware/OTA service accounts write access without full init-namespace root.\nUI:N - Once the crafted file is present, cpt_ucode_load() runs automatically from PCI probe at boot or driver bind/re-probe with no victim interaction.\nS:U - Impact stays inside the host kernel CPT PF driver authority; SR-IOV VFs do not feed this firmware path, and there is no VM/IOMMU/sandbox boundary cross.\nC:H - After wrap, dma_alloc_coherent() and memcpy() both use the overflowed code_size with no check against fw_entry-\u003esize, so a small file with a wrapped medium size causes a large out-of-bounds read of kernel memory adjacent to the firmware buffer.\nI:N - Allocation and copy use the same overflowed size, so there is no heap out-of-bounds write or other integrity/write primitive\u2014only an OOB read of the firmware source buffer and possible loading of truncated microcode onto the engine.\nA:H - The unbounded source over-read can fault on unmapped pages and oops during probe, denying availability of the CPT device and potentially the system on affected ThunderX/Octeon-TX platforms."
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-08-05T08:58:14.226Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/c4d4c2afd08dfb3cd1c880d1811ede2568e81a6d"
        },
        {
          "url": "https://git.kernel.org/stable/c/90e483e7f20c32287d2a9da967e122938f52737a"
        },
        {
          "url": "https://git.kernel.org/stable/c/584561e94260268abe1c83e00d9c205565cb7bc5"
        },
        {
          "url": "https://git.kernel.org/stable/c/3a720eb89026c5241b8c4abb33370dc6fb565eee"
        },
        {
          "url": "https://git.kernel.org/stable/c/172c8a24fc8312cf6b88d3c88469653fdcb1c127"
        },
        {
          "url": "https://git.kernel.org/stable/c/371fa5129af53a79f6dddc90fe5bb0825cbe72a4"
        },
        {
          "url": "https://git.kernel.org/stable/c/e29fd7a6852376d2cfb95ad5d6d3eeff93f815e9"
        },
        {
          "url": "https://git.kernel.org/stable/c/2526d6bf27d15054bb0778b2f7bc6625fd934905"
        }
      ],
      "title": "crypto: cavium - prevent integer overflow loading firmware",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2022-50330",
    "datePublished": "2025-09-15T14:49:33.015Z",
    "dateReserved": "2025-09-15T14:18:36.815Z",
    "dateUpdated": "2026-08-05T08:58:14.226Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2"
}


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…