{
  "affected": [
    {
      "ranges": [
        {
          "events": [
            {
              "introduced": "f5778c398713692a16150ae96e5c8270bab8399f"
            },
            {
              "fixed": "e66bdc0704977ecee667a81d38255b579c2353d0"
            },
            {
              "fixed": "9e203dbb5402897c43130fb171a2617008a91f45"
            },
            {
              "fixed": "1dd757379997b71a328a4b591ffaf481acd0ead1"
            },
            {
              "fixed": "a34d456934fe42e4da5d2cc07787bf418bee99c6"
            },
            {
              "fixed": "ac2f14e4705d020f04e806efa0d49ab8dc2b145f"
            },
            {
              "fixed": "078fae8f50adebb903ccf2252b44391324571e78"
            },
            {
              "fixed": "85fd46ee26a11841c670449508025965f61ce131"
            },
            {
              "fixed": "a58c5af19ff0d6f44f6e9fe31e33a2c92223f77e"
            }
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "type": "GIT"
        }
      ]
    },
    {
      "package": {
        "ecosystem": "Linux",
        "name": "Kernel"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "5.1.0"
            },
            {
              "fixed": "5.10.259"
            }
          ],
          "type": "ECOSYSTEM"
        },
        {
          "events": [
            {
              "introduced": "5.11.0"
            },
            {
              "fixed": "5.15.210"
            }
          ],
          "type": "ECOSYSTEM"
        },
        {
          "events": [
            {
              "introduced": "5.16.0"
            },
            {
              "fixed": "6.1.175"
            }
          ],
          "type": "ECOSYSTEM"
        },
        {
          "events": [
            {
              "introduced": "6.2.0"
            },
            {
              "fixed": "6.6.136"
            }
          ],
          "type": "ECOSYSTEM"
        },
        {
          "events": [
            {
              "introduced": "6.7.0"
            },
            {
              "fixed": "6.12.84"
            }
          ],
          "type": "ECOSYSTEM"
        },
        {
          "events": [
            {
              "introduced": "6.13.0"
            },
            {
              "fixed": "6.18.25"
            }
          ],
          "type": "ECOSYSTEM"
        },
        {
          "events": [
            {
              "introduced": "6.19.0"
            },
            {
              "fixed": "7.0.2"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "database_specific": {
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/31xxx/CVE-2026-31708.json"
  },
  "details": "In the Linux kernel, the following vulnerability has been resolved:\n\nsmb: client: fix OOB read in smb2_ioctl_query_info QUERY_INFO path\n\nsmb2_ioctl_query_info() has two response-copy branches: PASSTHRU_FSCTL\nand the default QUERY_INFO path.  The QUERY_INFO branch clamps\nqi.input_buffer_length to the server-reported OutputBufferLength and then\ncopies qi.input_buffer_length bytes from qi_rsp-\u003eBuffer to userspace, but\nit never verifies that the flexible-array payload actually fits within\nrsp_iov[1].iov_len.\n\nA malicious server can return OutputBufferLength larger than the actual\nQUERY_INFO response, causing copy_to_user() to walk past the response\nbuffer and expose adjacent kernel heap to userspace.\n\nGuard the QUERY_INFO copy with a bounds check on the actual Buffer\npayload.  Use struct_size(qi_rsp, Buffer, qi.input_buffer_length)\nrather than an open-coded addition so the guard cannot overflow on\n32-bit builds.",
  "id": "CVE-2026-31708",
  "modified": "2026-07-08T05:38:05.699299333Z",
  "published": "2026-05-01T13:56:05.880Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/078fae8f50adebb903ccf2252b44391324571e78"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/1dd757379997b71a328a4b591ffaf481acd0ead1"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/85fd46ee26a11841c670449508025965f61ce131"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/9e203dbb5402897c43130fb171a2617008a91f45"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/a34d456934fe42e4da5d2cc07787bf418bee99c6"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/a58c5af19ff0d6f44f6e9fe31e33a2c92223f77e"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/ac2f14e4705d020f04e806efa0d49ab8dc2b145f"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/e66bdc0704977ecee667a81d38255b579c2353d0"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/31xxx/CVE-2026-31708.json"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-31708"
    },
    {
      "type": "PACKAGE",
      "url": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
    }
  ],
  "schema_version": "1.7.5",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:H",
      "type": "CVSS_V3"
    }
  ],
  "summary": "smb: client: fix OOB read in smb2_ioctl_query_info QUERY_INFO path"
}