Skip to main content
EPSS 0.5%top 61%

In the Linux kernel, the following vulnerability has been resolved: smb: client: fix potential UAF in smb2_close_cached_fid()… (CVE-2025-40328)

0
High
Published: 12/09/2025 (12/09/2025, 18:30:35 UTC)
Source: GCVE Database

Description

A use-after-free vulnerability was identified and resolved in the Linux kernel SMB client code, specifically in the smb2_close_cached_fid() function. The issue involved a race condition where a new reference could be acquired after the reference count dropped to zero but before a lock was obtained, leading to potential use-after-free. The fix involved changing to kref_put_lock() to ensure the release function is called with the appropriate lock held, preventing this race condition.

CVSS v3.1

Score 8.8high

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 07/30/2026, 17:54:07 UTC

Technical Analysis

CVE-2025-40328 is a use-after-free vulnerability in the Linux kernel's SMB client implementation. The function smb2_close_cached_fid() could encounter a race condition where find_or_create_cached_dir() acquires a new reference after kref_put() observed the reference count drop to zero but before the cfid_list_lock was acquired. This timing gap could lead to use-after-free scenarios. The vulnerability was addressed by switching to kref_put_lock(), ensuring that cfid_release() is called while holding cfid_list_lock, thus closing the race window.

Potential Impact

Successful exploitation of this vulnerability could lead to use-after-free conditions, potentially allowing an attacker to execute arbitrary code or cause denial of service by crashing the kernel. The CVSS v3.1 vector indicates network attack vector, low attack complexity, no privileges required, user interaction required, unchanged scope, and high impact on confidentiality, integrity, and availability.

Mitigation Recommendations

A fix for this vulnerability has been implemented in the Linux kernel by modifying the reference counting mechanism to use kref_put_lock() with the appropriate locking. Users and administrators should apply the official Linux kernel updates that include this fix. Patch status is not explicitly confirmed in the provided data; therefore, check the vendor or Linux kernel mailing list advisories for the specific patch and update guidance.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Gcve Source
db.gcve.eu
Osv Id
GHSA-f255-x52r-mjq5
Osv Schema Version
1.4.0
Aliases
["CVE-2025-40328"]
Database Specific Severity
HIGH
Cvss Version
3.1

Threat ID: 6a6b72d49c2644c7f8478f02

Added to database: 07/30/2026, 15:50:44 UTC

Last enriched: 07/30/2026, 17:54:07 UTC

Last updated: 09/10/2026, 19:26:55 UTC

Views: 10

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses