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…

In the Linux kernel, the following vulnerability has been resolved: ksmbd: serialize QUERY_DIRECTORY requests per file smb2_query_dir() stores a… (CVE-2026-64397)

0
Medium
Published: 07/25/2026 (07/25/2026, 12:31:34 UTC)
Source: GCVE Database

Description

A vulnerability in the Linux kernel's ksmbd component involves improper serialization of QUERY_DIRECTORY requests per file. The smb2_query_dir() function stores a pointer to stack-allocated private data in a shared structure, which can be overwritten by concurrent requests using the same file handle. This leads to a stack use-after-free condition. The issue is resolved by adding a per-file mutex to serialize access to shared directory enumeration state, preventing concurrent modification of the pointer during iteration.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 07/25/2026, 23:27:18 UTC

Technical Analysis

The Linux kernel vulnerability CVE-2026-64397 affects the ksmbd server component handling SMB2 QUERY_DIRECTORY requests. The function smb2_query_dir() improperly stores a pointer to stack-allocated private data in the ksmbd_file's readdir_data structure. Concurrent QUERY_DIRECTORY requests using the same file handle can overwrite this pointer while it is still in use by an iterate_dir() callback, causing a stack use-after-free. The fix involves introducing a per-file mutex to serialize access to the shared directory enumeration state, including scan restart, dot entry state, readdir_data setup, iteration, and response construction. This serialization prevents concurrent requests from interfering with each other's private data pointers and shared file position state.

Potential Impact

The vulnerability results in a stack use-after-free condition in the ksmbd SMB2 server implementation within the Linux kernel. This could potentially lead to memory corruption or instability in the kernel when handling concurrent QUERY_DIRECTORY requests on the same file handle. No known exploits in the wild have been reported. The impact is limited to systems running the vulnerable Linux kernel with ksmbd enabled and handling SMB2 directory queries concurrently.

Mitigation Recommendations

A fix has been implemented by adding a per-file mutex to serialize QUERY_DIRECTORY requests, preventing concurrent access issues. Since the vulnerability is resolved in the Linux kernel, users should apply the official kernel updates or patches that include this fix. Patch status is not explicitly confirmed in the provided data; therefore, check the vendor or Linux kernel advisory for the current remediation guidance and apply the update 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-76f2-j4c3-m5v4
Osv Schema Version
1.4.0
Aliases
["CVE-2026-64397"]
Ecosystems
[]
Database Specific Severity
null
Cvss Version
null

Threat ID: 6a65420a9c2644c7f808418d

Added to database: 07/25/2026, 23:08:58 UTC

Last enriched: 07/25/2026, 23:27:18 UTC

Last updated: 07/26/2026, 03:43:10 UTC

Views: 4

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