CVE-2025-21967 (GCVE-0-2025-21967)
Vulnerability from cvelistv5
Published
2025-04-01 15:47
Modified
2026-08-05 11:55
Summary
In the Linux kernel, the following vulnerability has been resolved: ksmbd: fix use-after-free in ksmbd_free_work_struct ->interim_entry of ksmbd_work could be deleted after oplock is freed. We don't need to manage it with linked list. The interim request could be immediately sent whenever a oplock break wait is needed.
Impacted products
Vendor Product Version
Linux Linux Version: 0626e6641f6b467447c81dd7678a69c66f7746cf
Version: 0626e6641f6b467447c81dd7678a69c66f7746cf
Version: 0626e6641f6b467447c81dd7678a69c66f7746cf
Version: 0626e6641f6b467447c81dd7678a69c66f7746cf
Create a notification for this product.
Show details on NVD website


{
  "containers": {
    "adp": [
      {
        "metrics": [
          {
            "cvssV3_1": {
              "attackComplexity": "LOW",
              "attackVector": "LOCAL",
              "availabilityImpact": "HIGH",
              "baseScore": 7.8,
              "baseSeverity": "HIGH",
              "confidentialityImpact": "HIGH",
              "integrityImpact": "HIGH",
              "privilegesRequired": "LOW",
              "scope": "UNCHANGED",
              "userInteraction": "NONE",
              "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
              "version": "3.1"
            }
          },
          {
            "other": {
              "content": {
                "id": "CVE-2025-21967",
                "options": [
                  {
                    "Exploitation": "none"
                  },
                  {
                    "Automatable": "no"
                  },
                  {
                    "Technical Impact": "total"
                  }
                ],
                "role": "CISA Coordinator",
                "timestamp": "2025-04-16T13:14:51.011092Z",
                "version": "2.0.3"
              },
              "type": "ssvc"
            }
          }
        ],
        "problemTypes": [
          {
            "descriptions": [
              {
                "cweId": "CWE-416",
                "description": "CWE-416 Use After Free",
                "lang": "en",
                "type": "CWE"
              }
            ]
          }
        ],
        "providerMetadata": {
          "dateUpdated": "2025-04-16T13:19:52.457Z",
          "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
          "shortName": "CISA-ADP"
        },
        "title": "CISA ADP Vulnrichment"
      }
    ],
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "fs/smb/server/ksmbd_work.c",
            "fs/smb/server/ksmbd_work.h",
            "fs/smb/server/oplock.c",
            "fs/smb/server/oplock.h"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "fb776765bfc21d5e4ed03bb3d4406c2b86ff1ac3",
              "status": "affected",
              "version": "0626e6641f6b467447c81dd7678a69c66f7746cf",
              "versionType": "git"
            },
            {
              "lessThan": "62746ae3f5414244a96293e3b017be637b641280",
              "status": "affected",
              "version": "0626e6641f6b467447c81dd7678a69c66f7746cf",
              "versionType": "git"
            },
            {
              "lessThan": "eb51f6f59d19b92f6fe84d3873f958495ab32f0a",
              "status": "affected",
              "version": "0626e6641f6b467447c81dd7678a69c66f7746cf",
              "versionType": "git"
            },
            {
              "lessThan": "bb39ed47065455604729404729d9116868638d31",
              "status": "affected",
              "version": "0626e6641f6b467447c81dd7678a69c66f7746cf",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "fs/smb/server/ksmbd_work.c",
            "fs/smb/server/ksmbd_work.h",
            "fs/smb/server/oplock.c",
            "fs/smb/server/oplock.h"
          ],
          "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.6.*",
              "status": "unaffected",
              "version": "6.6.84",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.12.*",
              "status": "unaffected",
              "version": "6.12.20",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.13.*",
              "status": "unaffected",
              "version": "6.13.8",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.14",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.6.84",
                  "versionStartIncluding": "5.15",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.12.20",
                  "versionStartIncluding": "5.15",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.13.8",
                  "versionStartIncluding": "5.15",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.14",
                  "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 use-after-free in ksmbd_free_work_struct\n\n-\u003einterim_entry of ksmbd_work could be deleted after oplock is freed.\nWe don\u0027t need to manage it with linked list. The interim request could be\nimmediately sent whenever a oplock break wait is needed."
        }
      ],
      "metrics": [
        {
          "cvssV3_1": {
            "baseScore": 8.8,
            "baseSeverity": "HIGH",
            "vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
            "version": "3.1"
          },
          "scenarios": [
            {
              "lang": "en",
              "value": "AV:N - ksmbd is the in-kernel SMB server listening on TCP/445, and the entire trigger sequence (a CREATE requesting a batch oplock/write lease on one connection, a conflicting overwrite CREATE plus a close/disconnect on a second) is driven purely by remote SMB2 protocol traffic. No local access to the target is required.\nAC:L - The double `list_add` of the same `work-\u003einterim_entry` in `smb2_open()` is deterministic, not racy, and the attacker owns both connections so it chooses exactly when the peer\u0027s `oplock_info` is released relative to `ksmbd_free_work_struct()`, and can loop the sequence indefinitely. Per guidance, an attacker-created ordering and a use-after-free are Low.\nPR:L - Reaching `smb_grant_oplock()`/`smb_break_all_oplock()` requires a completed SESSION_SETUP, TREE_CONNECT and SMB2 CREATE, so an authenticated but otherwise unprivileged share account (including a mapped guest) is needed. This matches the scoring of the sibling post-authentication ksmbd oplock UAFs.\nUI:N - The attacker drives every step from its own two SMB sessions \u2014 take the oplock, issue the conflicting overwrite CREATE, then close or drop the first connection. No administrator or other client has to do anything.\nS:U - The list corruption and its consequences stay entirely within the kernel\u0027s own security authority; no VM, IOMMU, or sandbox boundary is crossed.\nC:H - The stale `interim_list` head lets `smb2_lease_break_noti()` treat reclaimed heap memory as a `struct ksmbd_work`, dereferencing its `conn`, `sess`, and `request_buf` fields, and `smb2_send_interim_resp()` then transmits data derived from that object back to the attacker \u2014 an arbitrary kernel memory disclosure primitive after a heap spray.\nI:H - `list_del()` in `ksmbd_free_work_struct()` writes two attacker-influenced kernel heap pointers at a fixed offset into a freed kmalloc-256 slot that the attacker can reclaim with a chosen object, and the fake-`ksmbd_work` path yields further controlled pointer writes and indirect calls, giving control-flow hijack.\nA:H - Even unweaponized, the `list_del` on freed memory trips `CONFIG_DEBUG_LIST`/`BUG()` or silently corrupts the slab, and walking the dangling `interim_list` oopses the ksmbd worker; the attacker can repeat it at will to keep the file server down."
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-08-05T11:55:43.302Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/fb776765bfc21d5e4ed03bb3d4406c2b86ff1ac3"
        },
        {
          "url": "https://git.kernel.org/stable/c/62746ae3f5414244a96293e3b017be637b641280"
        },
        {
          "url": "https://git.kernel.org/stable/c/eb51f6f59d19b92f6fe84d3873f958495ab32f0a"
        },
        {
          "url": "https://git.kernel.org/stable/c/bb39ed47065455604729404729d9116868638d31"
        }
      ],
      "title": "ksmbd: fix use-after-free in ksmbd_free_work_struct",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2025-21967",
    "datePublished": "2025-04-01T15:47:02.364Z",
    "dateReserved": "2024-12-29T08:45:45.796Z",
    "dateUpdated": "2026-08-05T11:55:43.302Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2",
  "vulnerability-lookup:meta": {
    "vulnrichment": {
      "containers": "{\"adp\": [{\"title\": \"CISA ADP Vulnrichment\", \"metrics\": [{\"cvssV3_1\": {\"scope\": \"UNCHANGED\", \"version\": \"3.1\", \"baseScore\": 7.8, \"attackVector\": \"LOCAL\", \"baseSeverity\": \"HIGH\", \"vectorString\": \"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H\", \"integrityImpact\": \"HIGH\", \"userInteraction\": \"NONE\", \"attackComplexity\": \"LOW\", \"availabilityImpact\": \"HIGH\", \"privilegesRequired\": \"LOW\", \"confidentialityImpact\": \"HIGH\"}}, {\"other\": {\"type\": \"ssvc\", \"content\": {\"id\": \"CVE-2025-21967\", \"role\": \"CISA Coordinator\", \"options\": [{\"Exploitation\": \"none\"}, {\"Automatable\": \"no\"}, {\"Technical Impact\": \"total\"}], \"version\": \"2.0.3\", \"timestamp\": \"2025-04-16T13:14:51.011092Z\"}}}], \"problemTypes\": [{\"descriptions\": [{\"lang\": \"en\", \"type\": \"CWE\", \"cweId\": \"CWE-416\", \"description\": \"CWE-416 Use After Free\"}]}], \"providerMetadata\": {\"orgId\": \"134c704f-9b21-4f2e-91b3-4a467353bcc0\", \"shortName\": \"CISA-ADP\", \"dateUpdated\": \"2025-04-16T13:14:52.575Z\"}}], \"cna\": {\"title\": \"ksmbd: fix use-after-free in ksmbd_free_work_struct\", \"metrics\": [{\"cvssV3_1\": {\"version\": \"3.1\", \"baseScore\": 8.8, \"baseSeverity\": \"HIGH\", \"vectorString\": \"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H\"}, \"scenarios\": [{\"lang\": \"en\", \"value\": \"AV:N - ksmbd is the in-kernel SMB server listening on TCP/445, and the entire trigger sequence (a CREATE requesting a batch oplock/write lease on one connection, a conflicting overwrite CREATE plus a close/disconnect on a second) is driven purely by remote SMB2 protocol traffic. No local access to the target is required.\\nAC:L - The double `list_add` of the same `work-\u003einterim_entry` in `smb2_open()` is deterministic, not racy, and the attacker owns both connections so it chooses exactly when the peer\u0027s `oplock_info` is released relative to `ksmbd_free_work_struct()`, and can loop the sequence indefinitely. Per guidance, an attacker-created ordering and a use-after-free are Low.\\nPR:L - Reaching `smb_grant_oplock()`/`smb_break_all_oplock()` requires a completed SESSION_SETUP, TREE_CONNECT and SMB2 CREATE, so an authenticated but otherwise unprivileged share account (including a mapped guest) is needed. This matches the scoring of the sibling post-authentication ksmbd oplock UAFs.\\nUI:N - The attacker drives every step from its own two SMB sessions \\u2014 take the oplock, issue the conflicting overwrite CREATE, then close or drop the first connection. No administrator or other client has to do anything.\\nS:U - The list corruption and its consequences stay entirely within the kernel\u0027s own security authority; no VM, IOMMU, or sandbox boundary is crossed.\\nC:H - The stale `interim_list` head lets `smb2_lease_break_noti()` treat reclaimed heap memory as a `struct ksmbd_work`, dereferencing its `conn`, `sess`, and `request_buf` fields, and `smb2_send_interim_resp()` then transmits data derived from that object back to the attacker \\u2014 an arbitrary kernel memory disclosure primitive after a heap spray.\\nI:H - `list_del()` in `ksmbd_free_work_struct()` writes two attacker-influenced kernel heap pointers at a fixed offset into a freed kmalloc-256 slot that the attacker can reclaim with a chosen object, and the fake-`ksmbd_work` path yields further controlled pointer writes and indirect calls, giving control-flow hijack.\\nA:H - Even unweaponized, the `list_del` on freed memory trips `CONFIG_DEBUG_LIST`/`BUG()` or silently corrupts the slab, and walking the dangling `interim_list` oopses the ksmbd worker; the attacker can repeat it at will to keep the file server down.\"}]}], \"affected\": [{\"repo\": \"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\", \"vendor\": \"Linux\", \"product\": \"Linux\", \"versions\": [{\"status\": \"affected\", \"version\": \"0626e6641f6b467447c81dd7678a69c66f7746cf\", \"lessThan\": \"fb776765bfc21d5e4ed03bb3d4406c2b86ff1ac3\", \"versionType\": \"git\"}, {\"status\": \"affected\", \"version\": \"0626e6641f6b467447c81dd7678a69c66f7746cf\", \"lessThan\": \"62746ae3f5414244a96293e3b017be637b641280\", \"versionType\": \"git\"}, {\"status\": \"affected\", \"version\": \"0626e6641f6b467447c81dd7678a69c66f7746cf\", \"lessThan\": \"eb51f6f59d19b92f6fe84d3873f958495ab32f0a\", \"versionType\": \"git\"}, {\"status\": \"affected\", \"version\": \"0626e6641f6b467447c81dd7678a69c66f7746cf\", \"lessThan\": \"bb39ed47065455604729404729d9116868638d31\", \"versionType\": \"git\"}], \"programFiles\": [\"fs/smb/server/ksmbd_work.c\", \"fs/smb/server/ksmbd_work.h\", \"fs/smb/server/oplock.c\", \"fs/smb/server/oplock.h\"], \"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.6.84\", \"versionType\": \"semver\", \"lessThanOrEqual\": \"6.6.*\"}, {\"status\": \"unaffected\", \"version\": \"6.12.20\", \"versionType\": \"semver\", \"lessThanOrEqual\": \"6.12.*\"}, {\"status\": \"unaffected\", \"version\": \"6.13.8\", \"versionType\": \"semver\", \"lessThanOrEqual\": \"6.13.*\"}, {\"status\": \"unaffected\", \"version\": \"6.14\", \"versionType\": \"original_commit_for_fix\", \"lessThanOrEqual\": \"*\"}], \"programFiles\": [\"fs/smb/server/ksmbd_work.c\", \"fs/smb/server/ksmbd_work.h\", \"fs/smb/server/oplock.c\", \"fs/smb/server/oplock.h\"], \"defaultStatus\": \"affected\"}], \"references\": [{\"url\": \"https://git.kernel.org/stable/c/fb776765bfc21d5e4ed03bb3d4406c2b86ff1ac3\"}, {\"url\": \"https://git.kernel.org/stable/c/62746ae3f5414244a96293e3b017be637b641280\"}, {\"url\": \"https://git.kernel.org/stable/c/eb51f6f59d19b92f6fe84d3873f958495ab32f0a\"}, {\"url\": \"https://git.kernel.org/stable/c/bb39ed47065455604729404729d9116868638d31\"}], \"x_generator\": {\"engine\": \"bippy-1.2.0\"}, \"descriptions\": [{\"lang\": \"en\", \"value\": \"In the Linux kernel, the following vulnerability has been resolved:\\n\\nksmbd: fix use-after-free in ksmbd_free_work_struct\\n\\n-\u003einterim_entry of ksmbd_work could be deleted after oplock is freed.\\nWe don\u0027t need to manage it with linked list. The interim request could be\\nimmediately sent whenever a oplock break wait is needed.\"}], \"cpeApplicability\": [{\"nodes\": [{\"negate\": false, \"cpeMatch\": [{\"criteria\": \"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\", \"vulnerable\": true, \"versionEndExcluding\": \"6.6.84\", \"versionStartIncluding\": \"5.15\"}, {\"criteria\": \"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\", \"vulnerable\": true, \"versionEndExcluding\": \"6.12.20\", \"versionStartIncluding\": \"5.15\"}, {\"criteria\": \"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\", \"vulnerable\": true, \"versionEndExcluding\": \"6.13.8\", \"versionStartIncluding\": \"5.15\"}, {\"criteria\": \"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\", \"vulnerable\": true, \"versionEndExcluding\": \"6.14\", \"versionStartIncluding\": \"5.15\"}], \"operator\": \"OR\"}]}], \"providerMetadata\": {\"orgId\": \"416baaa9-dc9f-4396-8d5f-8c081fb06d67\", \"shortName\": \"Linux\", \"dateUpdated\": \"2026-08-05T11:55:43.302Z\"}}}",
      "cveMetadata": "{\"cveId\": \"CVE-2025-21967\", \"state\": \"PUBLISHED\", \"dateUpdated\": \"2026-08-05T11:55:43.302Z\", \"dateReserved\": \"2024-12-29T08:45:45.796Z\", \"assignerOrgId\": \"416baaa9-dc9f-4396-8d5f-8c081fb06d67\", \"datePublished\": \"2025-04-01T15:47:02.364Z\", \"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…