{
  "schemaVersion": 1,
  "attribution": [
    {
      "source": "CISA Known Exploited Vulnerabilities",
      "url": "https://www.cisa.gov/known-exploited-vulnerabilities-catalog",
      "licence": "US government work"
    },
    {
      "source": "GitHub Advisory Database",
      "url": "https://github.com/advisories",
      "licence": "CC BY 4.0"
    },
    {
      "source": "Have I Been Pwned",
      "url": "https://haveibeenpwned.com/",
      "licence": "CC BY 4.0"
    },
    {
      "source": "CVE Program (CVE records)",
      "url": "https://www.cve.org/Legal/TermsOfUse",
      "licence": "CVE Terms of Use",
      "notice": "Copyright © 1999-2026, The MITRE Corporation. CVE is a trademark and the CVE logo is a registered trademark of The MITRE Corporation.",
      "terms": "CVE Usage: MITRE hereby grants you a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, sublicense, and distribute Common Vulnerabilities and Exposures (CVE™). Any copy you make for such purposes is authorized provided that you reproduce MITRE's copyright designation and this license in any such copy."
    },
    {
      "source": "FIRST EPSS",
      "url": "https://www.first.org/epss/",
      "licence": "free to use; FIRST requests attribution"
    }
  ],
  "record": {
    "id": "CVE-2026-31412",
    "sourceURL": "https://www.cve.org/CVERecord?id=CVE-2026-31412",
    "idYear": 2026,
    "status": "PUBLISHED",
    "publishedAt": "2026-04-10T10:35:05.796Z",
    "updatedAt": "2026-05-11T22:08:12.685Z",
    "importedAt": "2026-10-24T01:58:02.025Z",
    "snapshot": {
      "id": "cve_2026-10-24_midnight_baseline",
      "at": "2026-10-24T00:00:00.000Z",
      "source": "https://github.com/CVEProject/cvelistV5/releases/tag/cve_2026-10-24_0100Z"
    },
    "facts": {
      "title": "usb: gadget: f_mass_storage: Fix potential integer overflow in check_command_size_in_blocks()",
      "summary": "In the Linux kernel, the following vulnerability has been resolved:\n\nusb: gadget: f_mass_storage: Fix potential integer overflow in check_command_size_in_blocks()\n\nThe `check_command_size_in_blocks()` function calculates the data size\nin bytes by left shifting `common->data_size_from_cmnd` by the block\nsize (`common->curlun->blkbits`). However, it does not validate whether\nthis shift operation will cause an integer overflow.\n\nInitially, the block size is set up in `fsg_lun_open()` , and the\n`common->data_size_from_cmnd` is set up in `do_scsi_command()`. During\ninitialization, there is no integer overflow check for the interaction\nbetween two variables.\n\nSo if a malicious USB host sends a SCSI READ or WRITE command\nrequesting a large amount of data (`common->data_size_from_cmnd`), the\nleft shift operation can wrap around. This results in a truncated data\nsize, which can bypass boundary checks and potentially lead to memory\ncorruption or out-of-bounds accesses.\n\nFix this by using the check_shl_overflow() macro to safely perform the\nshift and catch any overflows.",
      "affected": [
        {
          "vendor": "Linux",
          "product": "Linux",
          "defaultStatus": "unaffected",
          "versions": [
            {
              "version": "144974e7f9e32b53b02f6c8632be45d8f43d6ab5",
              "status": "affected",
              "versionType": "git",
              "lessThan": "91817ad5452defe69bc7bc0e355f0ed5d01125cc"
            },
            {
              "version": "144974e7f9e32b53b02f6c8632be45d8f43d6ab5",
              "status": "affected",
              "versionType": "git",
              "lessThan": "ce0caaed5940162780c5c223b8ae54968a5f059b"
            },
            {
              "version": "144974e7f9e32b53b02f6c8632be45d8f43d6ab5",
              "status": "affected",
              "versionType": "git",
              "lessThan": "228b37936376143f4b60cc6828663f6eaceb81b5"
            },
            {
              "version": "144974e7f9e32b53b02f6c8632be45d8f43d6ab5",
              "status": "affected",
              "versionType": "git",
              "lessThan": "3428dc5520c811e66622b2f5fa43341bf9a1f8b3"
            },
            {
              "version": "144974e7f9e32b53b02f6c8632be45d8f43d6ab5",
              "status": "affected",
              "versionType": "git",
              "lessThan": "387ebb0453b99d71491419a5dc4ab4bee0cacbac"
            },
            {
              "version": "144974e7f9e32b53b02f6c8632be45d8f43d6ab5",
              "status": "affected",
              "versionType": "git",
              "lessThan": "8479891d1f04a8ce55366fe4ca361ccdb96f02e1"
            }
          ]
        },
        {
          "vendor": "Linux",
          "product": "Linux",
          "defaultStatus": "affected",
          "versions": [
            {
              "version": "3.3",
              "status": "affected"
            },
            {
              "version": "0",
              "status": "unaffected",
              "versionType": "semver",
              "lessThan": "3.3"
            },
            {
              "version": "6.1.167",
              "status": "unaffected",
              "versionType": "semver",
              "lessThanOrEqual": "6.1.*"
            },
            {
              "version": "6.6.130",
              "status": "unaffected",
              "versionType": "semver",
              "lessThanOrEqual": "6.6.*"
            },
            {
              "version": "6.12.78",
              "status": "unaffected",
              "versionType": "semver",
              "lessThanOrEqual": "6.12.*"
            },
            {
              "version": "6.18.19",
              "status": "unaffected",
              "versionType": "semver",
              "lessThanOrEqual": "6.18.*"
            },
            {
              "version": "6.19.9",
              "status": "unaffected",
              "versionType": "semver",
              "lessThanOrEqual": "6.19.*"
            },
            {
              "version": "7.0",
              "status": "unaffected",
              "versionType": "original_commit_for_fix",
              "lessThanOrEqual": "*"
            }
          ]
        }
      ]
    }
  }
}