KernelScan.io

HIGH Introduced in 5.15

ksmbd DaclDedup OOB

CVE-2026-68098

CVSS 8.8 / 10.0 NVD

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

KernelScan AI8.0HIGH

01

In the Linux kernel, the following vulnerability has been resolved: ksmbd: bound DACL dedup walk to copied ACEs set_ntacl_dacl() can stop copying ACEs before consuming the full input DACL when size accounting overflows. When that happens, num_aces reflects only the ACEs that were actually copied into the output DACL, but set_posix_acl_entries_dacl() still receives nt_num_aces and uses it to walk the existing ACE array during dedup. That makes the dedup walk scan past the copied ACE array and inspect buffer tail that does not contain valid ACEs. Split the two meanings currently carried by the NT ACE count. Pass the number of copied NT ACEs to bound the dedup walk, and preserve the original "input DACL had NT ACEs" state separately for the Everyone/default ACL fallback. This keeps the dedup walk aligned with the ACEs that are actually present in the rebuilt DACL.

02

Engine v0.6.0

Risk summary

An authenticated SMB client can send a crafted security descriptor whose DACL triggers a size-accounting overflow during ACE copying, causing the deduplication walk to read past the valid ACE array into uninitialized heap memory. This exposes an attacker-controlled-length out-of-bounds read of kernel heap, which can leak sensitive data or crash the kernel. Any device running ksmbd with network-accessible SMB ports is at risk.

Affectedfs/smb/server/smbacl.c (ksmbd)

Vulnerability analysis

When ksmbd rebuilds a DACL from a client-supplied security descriptor, it copies ACEs into an output buffer but can stop early if internal size accounting overflows. The subsequent deduplication pass, however, was bounded by the original input ACE count rather than the number of ACEs actually copied, so it walks past the end of the valid ACE array and inspects whatever heap memory follows. The fix separates the count of copied ACEs (now used to bound the dedup walk) from a simple boolean indicating whether the input contained any NT ACEs (used only for the Everyone/default-ACL fallback), keeping the walk aligned with the rebuilt DACL. Any authenticated SMB client—including guest sessions if guest access is enabled—can trigger this by sending a SET_INFO request with a crafted DACL; no local shell access or special kernel privileges are required.

03

BranchIntroducedFixed inPatch commit
6.65.156.6.1486d9d7aa4a2c9
6.125.156.12.101b057a851129c
7.15.157.1.6a0ebdaa79e10
mainline5.157.2-rc558d97fcd0bf1
6.185.156.18.42f1eba60db813