LiveActive security incident?Get immediate response
CVE Record

CVE-2025-21945: ksmbd: fix use-after-free in smb2_lock

In the Linux kernel, the following vulnerability has been resolved: ksmbd: fix use-after-free in smb2_lock If smb_lock->zero_len has value, ->llist of smb_lock is not delete and flock is old one. It will cause use-after-free on error handling routine.

HighCVSS 8.8Not KEV-listedUpdated
Glexia's TakeAutomated analysishigh

Security readout for executives and security teams

Plain-English summary

A flaw in the Linux kernel’s ksmbd SMB file server can access memory after it has been freed while handling file locks. A low-privileged network user may be able to trigger serious confidentiality, integrity, or availability impact. Systems not using ksmbd are unlikely to be exposed through this component.

Executive priority

Prioritize internet-facing, partner-accessible, or broadly reachable ksmbd servers. Patch promptly because triggering requires only low privileges and could affect all three security objectives. Treat systems without ksmbd as lower priority after confirming the service is genuinely inactive.

Technical view

In smb2_lock error handling, a lock with zero_len may retain its linked-list entry and an obsolete flock reference, causing a use-after-free. The supplied CVSS 3.1 score is 8.8: network-accessible, low complexity, low privileges required, no user interaction, and potentially high impact across confidentiality, integrity, and availability.

Likely exposure

Exposure is concentrated on Linux systems running ksmbd and accepting SMB connections from low-privileged users. The supplied affected-version data identifies several kernel branches but is insufficient for reliable distribution-package mapping. Confirm exposure against the running kernel and vendor backport status.

Exploitation context

The CVSS vector indicates network reachability and low privileges are required. The source bundle does not establish whether successful exploitation reliably enables code execution or another specific outcome. CVE-2025-21945 is not marked as KEV, and the supplied sources provide no evidence of active exploitation.

Researcher notes

The defect is CWE-416 in ksmbd’s smb2_lock path. The supplied version list is ambiguous and repeats commit identifiers, so commit or distribution-backport verification is safer than version-string assumptions. The sources establish a memory-safety defect and stable fixes, but not a demonstrated exploitation primitive or observed attacks.

Mitigation direction

  • Apply the distribution or kernel-vendor update containing the applicable cited stable fix.
  • Confirm the exact fixed package or backport for every deployed kernel branch.
  • Until patched, restrict ksmbd access to trusted networks and necessary accounts.
  • Disable ksmbd where it is not operationally required, following vendor guidance.

Validation and detection

  • Inventory systems where ksmbd is enabled and identify who can reach their SMB service.
  • Record each running kernel version and compare it with vendor security guidance and backport information.
  • Verify the installed kernel contains the applicable stable fix or documented downstream backport.
  • Ensure systems booted into the updated kernel after installation.
  • Review kernel telemetry for ksmbd-related memory faults; their absence does not establish remediation.
Prepared
Confidence
medium
Sources
8

Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.

Potential ATT&CK relevance

Conservative CVE-to-ATT&CK context

These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.

ATT&CK lookup starting points

Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.

cwe · low confidence lookup

CWE-416: Exact CWE lookup

Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.

Open ATT&CK lookup
cve · low confidence lookup

CVE-2025-21945 mapping review

Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.

Open ATT&CK lookup
Vulnerability profileCVE Program record
Severity
High
CVSS
8.8 (3.1)
Known Exploited
No
Published

Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Official CVE source material

CNA and ADP enrichment extracted from CVE v5

These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.

2CVSS vectors
3Timeline events
2ADP providers
7Source links

SSVC decision data

CISA-ADPCISA Coordinator
Timestamp
Version
2.0.3
Exploitation: noneAutomatable: noTechnical Impact: total

CVSS vector scores

2 official scores

We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.

ScoreVersionSeverityVectorExploitImpactSource
8.8CVSS 3.1HighCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H2.85.9Linux
7.8CVSS 3.1HighCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H1.85.9CISA-ADP

Vulnerability scoring details

Base CVSS 3.1 score

8.8High
CVSS 3.1 vector shape for CVE-2025-21945Attack VectorAttack ComplexityPrivileges RequiredUser InteractionScopeConfidentiality ImpactIntegrity ImpactAvailability Impact

Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Attack Vector
NetworkAdjacentLocalPhysical
Attack Complexity
LowHigh
Privileges Required
NoneLowHigh
User Interaction
NoneRequired
Scope
ChangedUnchanged
Confidentiality Impact
HighLowNone
Integrity Impact
HighLowNone
Availability Impact
HighLowNone

Vulnerability timeline

Timeline events are normalized from CVE metadata, CNA source timelines, ADP timelines, and KEV metadata when present.

  1. CVE reservedCVE Program

    The CVE ID was reserved by the assigning CNA.

  2. CVE publishedCVE Program

    The CVE record was published.

  3. CVE updatedCVE Program

    The CVE record metadata indicates this as the latest update time.

ADP provider summaries

CISA-ADPCISA ADP Vulnrichment
cvssV3_1other:ssvc
CVECVE Program Container
Affected products

Products and packages named in the record

VendorProductVersion / packageStatus
LinuxLinux0626e6641f6b467447c81dd7678a69c66f7746cf, 0626e6641f6b467447c81dd7678a69c66f7746cf, 0626e6641f6b467447c81dd7678a69c66f7746cf, 0626e6641f6b467447c81dd7678a69c66f7746cf, 0626e6641f6b467447c81dd7678a69c66f7746cfunaffected
LinuxLinux5.15, 0, 6.1.131, 6.6.83, 6.12.19, 6.13.7, 6.14affected
Weakness

CWE details

CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.

CWE-416 · source CWE mapping

Use After Free

Use After Free represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.