Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…
EPSS 0.4%top 70%

In the Linux kernel, the following vulnerability has been resolved: smb: client: fix potential cfid UAF in smb2_query_info_compound When… (CVE-2025-40320)

0
Critical
Published: 12/08/2025 (12/08/2025, 03:31:01 UTC)
Source: GCVE Database

Description

A critical use-after-free vulnerability (CVE-2025-40320) was identified and resolved in the Linux kernel's SMB client code. The issue occurs in the smb2_query_info_compound() function, where a previously allocated cfid pointer may be freed during a retry attempt but not reset, leading to potential use of a stale pointer. This can cause refcount underflow and memory corruption. The fix involves reinitializing the cfid pointer to NULL during replay to prevent use-after-free.

CVSS v3.1

Score 9.8critical

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

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 07/30/2026, 17:52:25 UTC

Technical Analysis

CVE-2025-40320 is a use-after-free vulnerability in the Linux kernel SMB client implementation, specifically in the smb2_query_info_compound() function. When this function retries, it may operate on a cfid pointer that was freed in a previous attempt because the pointer was not reset to NULL. This stale pointer usage can lead to refcount underflow and use-after-free conditions, potentially causing memory corruption or system instability. The vulnerability has been fixed by reinitializing the cfid pointer to NULL under the replay label to prevent cleanup operations on freed memory.

Potential Impact

Successful exploitation of this vulnerability could lead to memory corruption in the Linux kernel SMB client, potentially allowing an attacker to cause a denial of service or execute arbitrary code with kernel privileges. The CVSS 3.1 base score rates this vulnerability as critical with high impact on confidentiality, integrity, and availability.

Mitigation Recommendations

A fix for this vulnerability has been implemented in the Linux kernel. Users and administrators should apply the official kernel updates that include this patch to remediate the issue. Since this is a kernel-level vulnerability, updating to a patched kernel version is the recommended mitigation. Patch status is not explicitly confirmed in the provided data; therefore, verify the vendor advisory or Linux kernel mailing lists for the exact fixed version and apply updates accordingly.

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-2vg8-pj5q-762f
Osv Schema Version
1.4.0
Aliases
["CVE-2025-40320"]
Ecosystems
[]
Database Specific Severity
CRITICAL
Cvss Version
3.1

Threat ID: 6a6b72d49c2644c7f8479245

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

Last enriched: 07/30/2026, 17:52:25 UTC

Last updated: 07/31/2026, 19:24:47 UTC

Views: 2

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