Description
In the Linux kernel, the following vulnerability has been resolved:

ksmbd: fix UAF of struct file_lock in SMB2_LOCK deferred-lock cancellation

When a blocking byte-range lock request is deferred in the
FILE_LOCK_DEFERRED path, ksmbd registers the asynchronous work into
the connection's async_requests list via setup_async_work(). The cancel
callback smb2_remove_blocked_lock() holds a reference to the flock.

If the lock waiter is subsequently woken up but the work state is no
longer KSMBD_WORK_ACTIVE (e.g., due to a concurrent cancellation), the
cleanup path calls locks_free_lock(flock) without dequeuing the work from
the async_requests list. Concurrently, smb2_cancel() walks the list
under conn->request_lock and invokes the cancel callback, which then
dereferences the already freed 'flock'. This leads to a slab-use-after-free
inside __wake_up_common.

Fix this by restructuring the cleanup logic after the worker returns
from ksmbd_vfs_posix_lock_wait(). Move list_del(&smb_lock->llist) and
release_async_work(work) to the top of the cleanup block. This guarantees
that the async work is completely dequeued and serialized under
conn->request_lock before locks_free_lock(flock) is called, rendering
the flock unreachable for any concurrent smb2_cancel().
Published: 2026-07-25
Score: 8.8 High
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

A use‑after‑free bug was discovered in the Linux kernel’s ksmbd SMB server component, specifically when a deferred byte‑range lock is cancelled. The bug allows a freed file_lock structure to be dereferenced by an asynchronous cancellation callback, causing a breach of kernel memory safety. While the description does not explicitly state the resulting effects, such a flaw can lead to kernel memory corruption, possible crash (Denial of Service), or in the best‑case scenario, code execution if the attacker can reliably control the freed memory contents. The vulnerability is classified under CWE‑825.

Affected Systems

Any Linux installation that includes the ksmbd SMB server module is potentially affected. The CVE documentation does not list a specific kernel version range; therefore, any kernel build that contains the ksmbd code path may be vulnerable until the patch is applied.

Risk and Exploitability

The CVSS score of 8.8 points to a high severity issue. The EPSS score of less than 1% indicates a low probability that this vulnerability is being actively exploited in the wild. It is not currently listed in the CISA KEV catalog. The most likely attack vector is via an SMB client that requests a blocking byte‑range lock and then cancels it concurrently, which would trigger the race condition. This assessment is inferred from the description and has not been directly observed in the public threat landscape.

Generated by OpenCVE AI on August 4, 2026 at 14:28 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Apply the latest Linux kernel release that incorporates the ksmbd use‑after‑free patch
  • Ensure the system boots with the updated kernel and that no older kernel versions remain selectable
  • If a kernel upgrade cannot be applied immediately, consider disabling SMB lock support or restricting SMB access to trusted clients to limit the attack surface

Generated by OpenCVE AI on August 4, 2026 at 14:28 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Debian DLA Debian DLA DLA-4720-1 linux security update
Debian DLA Debian DLA DLA-4723-1 linux-6.1 security update
Debian DLA Debian DLA DLA-4724-1 linux-6.12 new package
History

Mon, 03 Aug 2026 19:15:00 +0000

Type Values Removed Values Added
Weaknesses CWE-416

Wed, 29 Jul 2026 00:15:00 +0000


Mon, 27 Jul 2026 05:15:00 +0000

Type Values Removed Values Added
Metrics cvssV3_1

{'score': 8.8, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H'}


Sun, 26 Jul 2026 02:00:00 +0000

Type Values Removed Values Added
Weaknesses CWE-416

Sat, 25 Jul 2026 09:30:00 +0000

Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: ksmbd: fix UAF of struct file_lock in SMB2_LOCK deferred-lock cancellation When a blocking byte-range lock request is deferred in the FILE_LOCK_DEFERRED path, ksmbd registers the asynchronous work into the connection's async_requests list via setup_async_work(). The cancel callback smb2_remove_blocked_lock() holds a reference to the flock. If the lock waiter is subsequently woken up but the work state is no longer KSMBD_WORK_ACTIVE (e.g., due to a concurrent cancellation), the cleanup path calls locks_free_lock(flock) without dequeuing the work from the async_requests list. Concurrently, smb2_cancel() walks the list under conn->request_lock and invokes the cancel callback, which then dereferences the already freed 'flock'. This leads to a slab-use-after-free inside __wake_up_common. Fix this by restructuring the cleanup logic after the worker returns from ksmbd_vfs_posix_lock_wait(). Move list_del(&smb_lock->llist) and release_async_work(work) to the top of the cleanup block. This guarantees that the async work is completely dequeued and serialized under conn->request_lock before locks_free_lock(flock) is called, rendering the flock unreachable for any concurrent smb2_cancel().
Title ksmbd: fix UAF of struct file_lock in SMB2_LOCK deferred-lock cancellation
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References

Subscriptions

Linux Linux Kernel
cve-icon MITRE

Status: PUBLISHED

Assigner: Linux

Published:

Updated: 2026-08-05T12:41:34.061Z

Reserved: 2026-07-19T15:36:31.785Z

Link: CVE-2026-64396

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Awaiting Analysis

Published: 2026-07-25T10:17:23.040

Modified: 2026-08-11T15:01:50.637

Link: CVE-2026-64396

cve-icon Redhat

Severity :

Publid Date: 2026-07-25T00:00:00Z

Links: CVE-2026-64396 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-08-04T14:30:10Z

Weaknesses
  • CWE-825

    Expired Pointer Dereference