{
  "id": "CVE-2026-31613",
  "url": "https://poc.griffinguard.io/cve/CVE-2026-31613",
  "published_at": "2026-04-24T14:42:33.453Z",
  "title": "smb: client: fix OOB reads parsing symlink error response",
  "vendor": "Linux",
  "product": "Linux",
  "cvss": {
    "score": 8.1,
    "source": "cna",
    "vector": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:H"
  },
  "kev": {
    "in_kev": false,
    "added_at": null,
    "days_after_publication": null
  },
  "first_poc": null,
  "poc_repo_count": 0,
  "exploit_count": 0,
  "suspicious_repo_count": 0,
  "edge_device": null,
  "description": "In the Linux kernel, the following vulnerability has been resolved:\n\nsmb: client: fix OOB reads parsing symlink error response\n\nWhen a CREATE returns STATUS_STOPPED_ON_SYMLINK, smb2_check_message()\nreturns success without any length validation, leaving the symlink\nparsers as the only defense against an untrusted server.\n\nsymlink_data() walks SMB 3.1.1 error contexts with the loop test \"p \u003c\nend\", but reads p-\u003eErrorId at offset 4 and p-\u003eErrorDataLength at offset\n0.  When the server-controlled ErrorDataLength advances p to within 1-7\nbytes of end, the next iteration will read past it.  When the matching\ncontext is found, sym-\u003eSymLinkErrorTag is read at offset 4 from\np-\u003eErrorContextData with no check that the symlink header itself fits.\n\nsmb2_parse_symlink_response() then bounds-checks the substitute name\nusing SMB2_SYMLINK_STRUCT_SIZE as the offset of PathBuffer from\niov_base.  That value is computed as sizeof(smb2_err_rsp) +\nsizeof(smb2_symlink_err_rsp), which is correct only when\nErrorContextCount == 0.\n\nWith at least one error context the symlink data sits 8 bytes deeper,\nand each skipped non-matching context shifts it further by 8 +\nALIGN(ErrorDataLength, 8).  The check is too short, allowing the\nsubstitute name read to run past iov_len.  The out-of-bound heap bytes\nare UTF-16-decoded into the symlink target and returned to userspace via\nreadlink(2).\n\nFix this all up by making the loops test require the full context header\nto fit, rejecting sym if its header runs past end, and bound the\nsubstitute name against the actual position of sym-\u003ePathBuffer rather\nthan a fixed offset.\n\nBecause sub_offs and sub_len are 16bits, the pointer math will not\noverflow here with the new greater-than.",
  "cwe": "CWE-125",
  "cpes": [
    "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*"
  ],
  "cvss_by_source": {
    "cna": 8.1
  },
  "repos": [],
  "remediation": {
    "affected": [
      {
        "vendor": "Linux",
        "product": "Linux",
        "ranges": [
          "\u003e= 76894f3e2f71177747b8b4763fb180e800279585, \u003c 043834e72337ee7b4e9685859888623ba1504ac7",
          "\u003e= 76894f3e2f71177747b8b4763fb180e800279585, \u003c d65a64755a3df68a2fd19d2a81395e9f723aca23",
          "\u003e= 76894f3e2f71177747b8b4763fb180e800279585, \u003c 20ac98f0eb6047edb73c9a27af782bdde08b3757",
          "\u003e= 76894f3e2f71177747b8b4763fb180e800279585, \u003c e0dd90d14cbbf318157ea8e3fb62ee68a28655ed",
          "\u003e= 76894f3e2f71177747b8b4763fb180e800279585, \u003c 781902e069f4ecb6c3b83502f181972c1446110a",
          "\u003e= 76894f3e2f71177747b8b4763fb180e800279585, \u003c a66ef2e7ed837325c5600f8617d5ee0a0a149fdd",
          "\u003e= 76894f3e2f71177747b8b4763fb180e800279585, \u003c 3df690bba28edec865cf7190be10708ad0ddd67e",
          "2d046892a493d9760c35fdaefc3017f27f91b621",
          "\u003e= 6.0.16, \u003c 6.1"
        ],
        "fixed_in": [
          "043834e72337ee7b4e9685859888623ba1504ac7",
          "d65a64755a3df68a2fd19d2a81395e9f723aca23",
          "20ac98f0eb6047edb73c9a27af782bdde08b3757",
          "e0dd90d14cbbf318157ea8e3fb62ee68a28655ed",
          "781902e069f4ecb6c3b83502f181972c1446110a",
          "a66ef2e7ed837325c5600f8617d5ee0a0a149fdd",
          "3df690bba28edec865cf7190be10708ad0ddd67e",
          "6.1"
        ]
      },
      {
        "vendor": "Linux",
        "product": "Linux",
        "ranges": [
          "6.1"
        ],
        "fixed_in": [
          "0",
          "6.1.175",
          "6.6.141",
          "6.12.91",
          "6.18.24",
          "6.19.14",
          "7.0.1",
          "7.1"
        ]
      }
    ],
    "upgrade": [
      "Upgrade Linux to 043834e72337ee7b4e9685859888623ba1504ac7 or d65a64755a3df68a2fd19d2a81395e9f723aca23 or 20ac98f0eb6047edb73c9a27af782bdde08b3757 or e0dd90d14cbbf318157ea8e3fb62ee68a28655ed or 781902e069f4ecb6c3b83502f181972c1446110a or a66ef2e7ed837325c5600f8617d5ee0a0a149fdd or 3df690bba28edec865cf7190be10708ad0ddd67e or 6.1 or later.",
      "Upgrade Linux to 0 or 6.1.175 or 6.6.141 or 6.12.91 or 6.18.24 or 6.19.14 or 7.0.1 or 7.1 or later."
    ]
  },
  "exploit_refs": [],
  "hunt_profile": [],
  "rules": []
}
