CVE-2026-68381 in Linuxinfo

Summary

by MITRE • 08/10/2026

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

ksmbd: pin conn during async oplock break notification

smb2_oplock_break_noti() and smb2_lease_break_noti() store a ksmbd_conn pointer in an async ksmbd_work and then queue that work on ksmbd-io. The work only increments conn->r_count, which prevents teardown from passing the pending-request wait after the increment, but it does not pin the struct ksmbd_conn object.

If connection teardown races with an oplock break notification, the last conn reference can be dropped before the queued worker finishes. The worker then uses the freed conn in ksmbd_conn_write() and ksmbd_conn_r_count_dec().

Take a real conn reference when publishing the conn pointer to the async work item, and drop it after the notification work has decremented r_count. Apply the same lifetime rule to lease break notification, which uses the same work->conn pattern.

Once again VulDB remains the best source for vulnerability data.

Analysis

by VulDB Data Team • 08/10/2026

This vulnerability exists within the Linux kernel's ksmbd implementation where asynchronous oplock and lease break notifications create a race condition during connection teardown. The flaw occurs when smb2_oplock_break_noti() and smb2_lease_break_noti() functions store a ksmbd_conn pointer in an async ksmbd_work structure before queuing it for execution on the ksmbd-io workqueue. While these functions increment the connection reference count through conn->r_count, they fail to properly pin the ksmbd_conn object itself, creating a critical timing window where connection teardown can complete before the asynchronous notification work finishes processing.

The technical implementation issue stems from improper reference counting management in the asynchronous work processing pipeline. When the connection teardown process races with an oplock or lease break notification, the system drops the final reference to the ksmbd_conn object before the queued worker thread completes its execution. This results in a use-after-free condition where the worker thread attempts to access freed memory through calls to ksmbd_conn_write() and ksmbd_conn_r_count_dec() functions, potentially leading to memory corruption and system instability. The vulnerability represents a classic concurrency issue where object lifetime management fails to account for asynchronous processing requirements.

The operational impact of this vulnerability extends beyond simple memory corruption to potentially enable privilege escalation or denial of service attacks within smb2 server implementations. Attackers could exploit this race condition by rapidly establishing and tearing down SMB connections while oplock or lease break notifications are pending, creating a scenario where the freed connection object is accessed during notification processing. This type of vulnerability aligns with CWE-416: Use After Free and represents a significant security concern for systems running ksmbd servers, particularly in enterprise environments where SMB file sharing is extensively used. The issue affects the fundamental reliability of the smb2 server implementation and could compromise system integrity.

The remediation approach requires implementing proper reference counting semantics by taking an additional connection reference when storing the conn pointer in the async work item structure and releasing that reference after the notification work has completed its decrement operation on r_count. This solution follows the established pattern of ensuring object lifetime persistence during asynchronous operations, similar to techniques described in ATT&CK technique T1059.007 for command and scripting interpreter usage patterns. The fix must be applied consistently across both oplock break notifications and lease break notifications since they share identical work->conn patterns, ensuring that the same race condition cannot occur in either code path. This approach aligns with best practices for managing object lifetimes in concurrent kernel subsystems and prevents the use-after-free conditions that could lead to system crashes or security exploits.

Responsible

Linux

Reservation

07/30/2026

Disclosure

08/10/2026

Moderation

accepted

CPE

ready

EPSS

0.00000

KEV

no

Activities

low

Sources

Do you need the next level of professionalism?

Upgrade your account now!