CVE-2024-26954 (GCVE-0-2024-26954)
Vulnerability from cvelistv5
Published
2024-05-01 05:18
Modified
2026-08-05 11:28
Summary
In the Linux kernel, the following vulnerability has been resolved: ksmbd: fix slab-out-of-bounds in smb_strndup_from_utf16() If ->NameOffset of smb2_create_req is smaller than Buffer offset of smb2_create_req, slab-out-of-bounds read can happen from smb2_open. This patch set the minimum value of the name offset to the buffer offset to validate name length of smb2_create_req().
Impacted products
Vendor Product Version
Linux Linux Version: 0626e6641f6b467447c81dd7678a69c66f7746cf
Version: 0626e6641f6b467447c81dd7678a69c66f7746cf
Version: 0626e6641f6b467447c81dd7678a69c66f7746cf
Version: 0626e6641f6b467447c81dd7678a69c66f7746cf
Version: 0626e6641f6b467447c81dd7678a69c66f7746cf
Create a notification for this product.
Show details on NVD website


{
  "containers": {
    "adp": [
      {
        "providerMetadata": {
          "dateUpdated": "2025-11-03T21:54:08.613Z",
          "orgId": "af854a3a-2127-422b-91ae-364da2661108",
          "shortName": "CVE"
        },
        "references": [
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/3b8da67191e938a63d2736dabb4ac5d337e5de57"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/4f97e6a9d62cb1fce82fbf4baff44b83221bc178"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/a80a486d72e20bd12c335bcd38b6e6f19356b0aa"
          },
          {
            "url": "https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html"
          }
        ],
        "title": "CVE Program Container"
      },
      {
        "metrics": [
          {
            "other": {
              "content": {
                "id": "CVE-2024-26954",
                "options": [
                  {
                    "Exploitation": "none"
                  },
                  {
                    "Automatable": "no"
                  },
                  {
                    "Technical Impact": "partial"
                  }
                ],
                "role": "CISA Coordinator",
                "timestamp": "2024-09-10T15:45:29.977526Z",
                "version": "2.0.3"
              },
              "type": "ssvc"
            }
          }
        ],
        "providerMetadata": {
          "dateUpdated": "2024-09-11T17:33:48.598Z",
          "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
          "shortName": "CISA-ADP"
        },
        "title": "CISA ADP Vulnrichment"
      }
    ],
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "fs/smb/server/smb2misc.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "d70c2e0904ab3715c5673fd45788a464a246d1db",
              "status": "affected",
              "version": "0626e6641f6b467447c81dd7678a69c66f7746cf",
              "versionType": "git"
            },
            {
              "lessThan": "9e4937cbc150f9d5a9b5576e1922ef0b5ed2eb72",
              "status": "affected",
              "version": "0626e6641f6b467447c81dd7678a69c66f7746cf",
              "versionType": "git"
            },
            {
              "lessThan": "3b8da67191e938a63d2736dabb4ac5d337e5de57",
              "status": "affected",
              "version": "0626e6641f6b467447c81dd7678a69c66f7746cf",
              "versionType": "git"
            },
            {
              "lessThan": "4f97e6a9d62cb1fce82fbf4baff44b83221bc178",
              "status": "affected",
              "version": "0626e6641f6b467447c81dd7678a69c66f7746cf",
              "versionType": "git"
            },
            {
              "lessThan": "a80a486d72e20bd12c335bcd38b6e6f19356b0aa",
              "status": "affected",
              "version": "0626e6641f6b467447c81dd7678a69c66f7746cf",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "fs/smb/server/smb2misc.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "5.15"
            },
            {
              "lessThan": "5.15",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.1.*",
              "status": "unaffected",
              "version": "6.1.119",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.6.*",
              "status": "unaffected",
              "version": "6.6.32",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.7.*",
              "status": "unaffected",
              "version": "6.7.12",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.8.*",
              "status": "unaffected",
              "version": "6.8.3",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.9",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.1.119",
                  "versionStartIncluding": "5.15",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.6.32",
                  "versionStartIncluding": "5.15",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.7.12",
                  "versionStartIncluding": "5.15",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.8.3",
                  "versionStartIncluding": "5.15",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.9",
                  "versionStartIncluding": "5.15",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nksmbd: fix slab-out-of-bounds in smb_strndup_from_utf16()\n\nIf -\u003eNameOffset of smb2_create_req is smaller than Buffer offset of\nsmb2_create_req, slab-out-of-bounds read can happen from smb2_open.\nThis patch set the minimum value of the name offset to the buffer offset\nto validate name length of smb2_create_req()."
        }
      ],
      "metrics": [
        {
          "cvssV3_1": {
            "baseScore": 8.1,
            "baseSeverity": "HIGH",
            "vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H",
            "version": "3.1"
          },
          "scenarios": [
            {
              "lang": "en",
              "value": "AV:N - ksmbd is the in-kernel SMB server listening on TCP/445, and the malformed SMB2_CREATE PDU with the bogus NameOffset arrives directly from a remote peer over the network. No local access to the target is needed.\nAC:L - A single hand-crafted CREATE request deterministically triggers it \u2014 set NameOffset=0, a large NameLength, and CreateContextsOffset/Length such that name_off+name_len \u003c ctx_off+ctx_len; there is no race, no memory-layout luck, and the attacker even chooses the kvmalloc size (pdu_size) that selects the adjacent slab or forces a page-aligned allocation next to a guard page.\nPR:L - SMB2_CREATE is dispatched only after smb2_check_user_session() finds a valid SessionId and smb2_get_ksmbd_tcon() resolves a live tree connect, so the attacker needs an established SMB session \u2014 which on the common NAS/embedded ksmbd deployment is satisfied by any ordinary user account or a guest-enabled share.\nUI:N - The attacker\u0027s own authenticated SMB connection drives the entire sequence; no administrator or local user on the target has to take any action.\nS:U - The out-of-bounds slab read and any resulting fault occur entirely within the kernel\u0027s own security authority, crossing no VM, IOMMU, or sandbox boundary.\nC:H - Up to ~120 bytes of adjacent kernel slab memory are read past conn-\u003erequest_buf, in a slab cache the attacker selects by choosing the RFC1002 pdu_size, and the leaked bytes are converted into the filename used by smb2_open() \u2014 so with FILE_CREATE the attacker can create a file named with kernel heap contents and read it back via SMB2_QUERY_DIRECTORY, yielding repeatable remote kernel memory disclosure well beyond a few bounded bytes.\nI:N - The defect is strictly an over-read in smb_utf16_bytes()/smb_from_utf16(); nothing is written out of bounds and no kernel state is corrupted on this path.\nA:H - The read crosses the end of the kvmalloc\u0027d request buffer, and because the attacker controls the allocation size exactly it can be made to land on a vmalloc guard page for an unrecoverable kernel page fault, while KASAN/KFENCE/MTE kernels report and panic under panic_on_warn=1 or kasan.fault=panic; the request can be replayed at will from new connections."
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-08-05T11:28:35.439Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/d70c2e0904ab3715c5673fd45788a464a246d1db"
        },
        {
          "url": "https://git.kernel.org/stable/c/9e4937cbc150f9d5a9b5576e1922ef0b5ed2eb72"
        },
        {
          "url": "https://git.kernel.org/stable/c/3b8da67191e938a63d2736dabb4ac5d337e5de57"
        },
        {
          "url": "https://git.kernel.org/stable/c/4f97e6a9d62cb1fce82fbf4baff44b83221bc178"
        },
        {
          "url": "https://git.kernel.org/stable/c/a80a486d72e20bd12c335bcd38b6e6f19356b0aa"
        }
      ],
      "title": "ksmbd: fix slab-out-of-bounds in smb_strndup_from_utf16()",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2024-26954",
    "datePublished": "2024-05-01T05:18:47.428Z",
    "dateReserved": "2024-02-19T14:20:24.200Z",
    "dateUpdated": "2026-08-05T11:28:35.439Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2",
  "vulnerability-lookup:meta": {
    "vulnrichment": {
      "containers": "{\"adp\": [{\"title\": \"CVE Program Container\", \"references\": [{\"url\": \"https://git.kernel.org/stable/c/3b8da67191e938a63d2736dabb4ac5d337e5de57\", \"tags\": [\"x_transferred\"]}, {\"url\": \"https://git.kernel.org/stable/c/4f97e6a9d62cb1fce82fbf4baff44b83221bc178\", \"tags\": [\"x_transferred\"]}, {\"url\": \"https://git.kernel.org/stable/c/a80a486d72e20bd12c335bcd38b6e6f19356b0aa\", \"tags\": [\"x_transferred\"]}, {\"url\": \"https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html\"}], \"providerMetadata\": {\"orgId\": \"af854a3a-2127-422b-91ae-364da2661108\", \"shortName\": \"CVE\", \"dateUpdated\": \"2025-11-03T21:54:08.613Z\"}}, {\"title\": \"CISA ADP Vulnrichment\", \"metrics\": [{\"other\": {\"type\": \"ssvc\", \"content\": {\"id\": \"CVE-2024-26954\", \"role\": \"CISA Coordinator\", \"options\": [{\"Exploitation\": \"none\"}, {\"Automatable\": \"no\"}, {\"Technical Impact\": \"partial\"}], \"version\": \"2.0.3\", \"timestamp\": \"2024-09-10T15:45:29.977526Z\"}}}], \"providerMetadata\": {\"orgId\": \"134c704f-9b21-4f2e-91b3-4a467353bcc0\", \"shortName\": \"CISA-ADP\", \"dateUpdated\": \"2024-09-11T12:42:18.863Z\"}}], \"cna\": {\"title\": \"ksmbd: fix slab-out-of-bounds in smb_strndup_from_utf16()\", \"metrics\": [{\"cvssV3_1\": {\"version\": \"3.1\", \"baseScore\": 8.1, \"baseSeverity\": \"HIGH\", \"vectorString\": \"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H\"}, \"scenarios\": [{\"lang\": \"en\", \"value\": \"AV:N - ksmbd is the in-kernel SMB server listening on TCP/445, and the malformed SMB2_CREATE PDU with the bogus NameOffset arrives directly from a remote peer over the network. No local access to the target is needed.\\nAC:L - A single hand-crafted CREATE request deterministically triggers it \\u2014 set NameOffset=0, a large NameLength, and CreateContextsOffset/Length such that name_off+name_len \u003c ctx_off+ctx_len; there is no race, no memory-layout luck, and the attacker even chooses the kvmalloc size (pdu_size) that selects the adjacent slab or forces a page-aligned allocation next to a guard page.\\nPR:L - SMB2_CREATE is dispatched only after smb2_check_user_session() finds a valid SessionId and smb2_get_ksmbd_tcon() resolves a live tree connect, so the attacker needs an established SMB session \\u2014 which on the common NAS/embedded ksmbd deployment is satisfied by any ordinary user account or a guest-enabled share.\\nUI:N - The attacker\u0027s own authenticated SMB connection drives the entire sequence; no administrator or local user on the target has to take any action.\\nS:U - The out-of-bounds slab read and any resulting fault occur entirely within the kernel\u0027s own security authority, crossing no VM, IOMMU, or sandbox boundary.\\nC:H - Up to ~120 bytes of adjacent kernel slab memory are read past conn-\u003erequest_buf, in a slab cache the attacker selects by choosing the RFC1002 pdu_size, and the leaked bytes are converted into the filename used by smb2_open() \\u2014 so with FILE_CREATE the attacker can create a file named with kernel heap contents and read it back via SMB2_QUERY_DIRECTORY, yielding repeatable remote kernel memory disclosure well beyond a few bounded bytes.\\nI:N - The defect is strictly an over-read in smb_utf16_bytes()/smb_from_utf16(); nothing is written out of bounds and no kernel state is corrupted on this path.\\nA:H - The read crosses the end of the kvmalloc\u0027d request buffer, and because the attacker controls the allocation size exactly it can be made to land on a vmalloc guard page for an unrecoverable kernel page fault, while KASAN/KFENCE/MTE kernels report and panic under panic_on_warn=1 or kasan.fault=panic; the request can be replayed at will from new connections.\"}]}], \"affected\": [{\"repo\": \"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\", \"vendor\": \"Linux\", \"product\": \"Linux\", \"versions\": [{\"status\": \"affected\", \"version\": \"0626e6641f6b467447c81dd7678a69c66f7746cf\", \"lessThan\": \"d70c2e0904ab3715c5673fd45788a464a246d1db\", \"versionType\": \"git\"}, {\"status\": \"affected\", \"version\": \"0626e6641f6b467447c81dd7678a69c66f7746cf\", \"lessThan\": \"9e4937cbc150f9d5a9b5576e1922ef0b5ed2eb72\", \"versionType\": \"git\"}, {\"status\": \"affected\", \"version\": \"0626e6641f6b467447c81dd7678a69c66f7746cf\", \"lessThan\": \"3b8da67191e938a63d2736dabb4ac5d337e5de57\", \"versionType\": \"git\"}, {\"status\": \"affected\", \"version\": \"0626e6641f6b467447c81dd7678a69c66f7746cf\", \"lessThan\": \"4f97e6a9d62cb1fce82fbf4baff44b83221bc178\", \"versionType\": \"git\"}, {\"status\": \"affected\", \"version\": \"0626e6641f6b467447c81dd7678a69c66f7746cf\", \"lessThan\": \"a80a486d72e20bd12c335bcd38b6e6f19356b0aa\", \"versionType\": \"git\"}], \"programFiles\": [\"fs/smb/server/smb2misc.c\"], \"defaultStatus\": \"unaffected\"}, {\"repo\": \"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\", \"vendor\": \"Linux\", \"product\": \"Linux\", \"versions\": [{\"status\": \"affected\", \"version\": \"5.15\"}, {\"status\": \"unaffected\", \"version\": \"0\", \"lessThan\": \"5.15\", \"versionType\": \"semver\"}, {\"status\": \"unaffected\", \"version\": \"6.1.119\", \"versionType\": \"semver\", \"lessThanOrEqual\": \"6.1.*\"}, {\"status\": \"unaffected\", \"version\": \"6.6.32\", \"versionType\": \"semver\", \"lessThanOrEqual\": \"6.6.*\"}, {\"status\": \"unaffected\", \"version\": \"6.7.12\", \"versionType\": \"semver\", \"lessThanOrEqual\": \"6.7.*\"}, {\"status\": \"unaffected\", \"version\": \"6.8.3\", \"versionType\": \"semver\", \"lessThanOrEqual\": \"6.8.*\"}, {\"status\": \"unaffected\", \"version\": \"6.9\", \"versionType\": \"original_commit_for_fix\", \"lessThanOrEqual\": \"*\"}], \"programFiles\": [\"fs/smb/server/smb2misc.c\"], \"defaultStatus\": \"affected\"}], \"references\": [{\"url\": \"https://git.kernel.org/stable/c/d70c2e0904ab3715c5673fd45788a464a246d1db\"}, {\"url\": \"https://git.kernel.org/stable/c/9e4937cbc150f9d5a9b5576e1922ef0b5ed2eb72\"}, {\"url\": \"https://git.kernel.org/stable/c/3b8da67191e938a63d2736dabb4ac5d337e5de57\"}, {\"url\": \"https://git.kernel.org/stable/c/4f97e6a9d62cb1fce82fbf4baff44b83221bc178\"}, {\"url\": \"https://git.kernel.org/stable/c/a80a486d72e20bd12c335bcd38b6e6f19356b0aa\"}], \"x_generator\": {\"engine\": \"bippy-1.2.0\"}, \"descriptions\": [{\"lang\": \"en\", \"value\": \"In the Linux kernel, the following vulnerability has been resolved:\\n\\nksmbd: fix slab-out-of-bounds in smb_strndup_from_utf16()\\n\\nIf -\u003eNameOffset of smb2_create_req is smaller than Buffer offset of\\nsmb2_create_req, slab-out-of-bounds read can happen from smb2_open.\\nThis patch set the minimum value of the name offset to the buffer offset\\nto validate name length of smb2_create_req().\"}], \"cpeApplicability\": [{\"nodes\": [{\"negate\": false, \"cpeMatch\": [{\"criteria\": \"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\", \"vulnerable\": true, \"versionEndExcluding\": \"6.1.119\", \"versionStartIncluding\": \"5.15\"}, {\"criteria\": \"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\", \"vulnerable\": true, \"versionEndExcluding\": \"6.6.32\", \"versionStartIncluding\": \"5.15\"}, {\"criteria\": \"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\", \"vulnerable\": true, \"versionEndExcluding\": \"6.7.12\", \"versionStartIncluding\": \"5.15\"}, {\"criteria\": \"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\", \"vulnerable\": true, \"versionEndExcluding\": \"6.8.3\", \"versionStartIncluding\": \"5.15\"}, {\"criteria\": \"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\", \"vulnerable\": true, \"versionEndExcluding\": \"6.9\", \"versionStartIncluding\": \"5.15\"}], \"operator\": \"OR\"}]}], \"providerMetadata\": {\"orgId\": \"416baaa9-dc9f-4396-8d5f-8c081fb06d67\", \"shortName\": \"Linux\", \"dateUpdated\": \"2026-08-05T11:28:35.439Z\"}}}",
      "cveMetadata": "{\"cveId\": \"CVE-2024-26954\", \"state\": \"PUBLISHED\", \"dateUpdated\": \"2026-08-05T11:28:35.439Z\", \"dateReserved\": \"2024-02-19T14:20:24.200Z\", \"assignerOrgId\": \"416baaa9-dc9f-4396-8d5f-8c081fb06d67\", \"datePublished\": \"2024-05-01T05:18:47.428Z\", \"assignerShortName\": \"Linux\"}",
      "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…