CVE-2026-99309

ksmbd: fix overflow in dacloffset bounds check in build_sec_desc()

Published Nov 16, 2026 CVSS n/a EPSS n/a KEV · Not listed
Description
In the Linux kernel, the following vulnerability has been resolved:

ksmbd: fix overflow in dacloffset bounds check in build_sec_desc()

When the large dacl_offset is provided, dacl_offset + sizeof(struct
smb_acl) overflows on 32-bit builds and the check is passed,
Which makes le16_to_cpu(ppdacl_ptr->size) read out-of-bounds. This
only happens for dacl_offset in range [0xFFFFFFF8, 0xFFFFFFFF]. So
the oob read is max 8 bytes preceding the allocated ppntsd.

unsigned int dacl_offset = le32_to_cpu(ppntsd->dacloffset);
int ppdacl_size, ntacl_size = ppntsd_size - dacl_offset;

if (!dacl_offset ||
(dacl_offset + sizeof(struct smb_acl) > ppntsd_size))
goto out;

Commit beff0bc9d69b ("ksmbd: fix overflow in dacloffset bounds check")
fixes similar checks in other functions. But leaves this one out,
because it is only valid for 32-bit builds.

Reproduced on 32-bit ARM with KASAN, by a client sending SMB2
SET_INFO(SEC) with dacloffset=0xfffffff8, then QUERY_INFO(SEC) on the
same file:

BUG: KASAN: slab-out-of-bounds in build_sec_desc (fs/smb/server/smbacl.c:1105)
Read of size 2 at addr c2a273fa by task kworker/1:1/35
CPU: 1 UID: 0 PID: 35 Comm: kworker/1:1 Not tainted 7.3.0-rc2+ #5
Workqueue: ksmbd-io handle_ksmbd_work
Call trace:
kasan_check_range from build_sec_desc (fs/smb/server/smbacl.c:1105)
build_sec_desc from smb2_query_info (fs/smb/server/smb2pdu.c:7676)
smb2_query_info from handle_ksmbd_work (fs/smb/server/server.c:160)
handle_ksmbd_work from process_one_work (kernel/workqueue.c:3401)
process_one_work from worker_thread (kernel/workqueue.c:3473)
worker_thread from kthread (kernel/kthread.c:436)

Add overflow check.

Analysis

AI-generated

Technical impact

An integer overflow occurs in the ksmbd component when calculating the bounds of the dacl_offset in build_sec_desc(). On 32‑bit builds, the expression dacl_offset + sizeof(struct smb_acl) overflows when dacl_offset is in the range [0xFFFFFFF8, 0xFFFFFFFF], causing the subsequent read of ppdacl_ptr->size to access memory just before the allocated structure. This out‑of‑bounds read can expose up to eight bytes of kernel memory, providing attackers with an information‑leak vector. The flaw does not allow remote code execution but can aid other attacks that rely on kernel data disclosure, and is characterized as a CWE‑190, CWE‑805 and CWE‑788 issue.

Affected Systems

The defect resides in the Linux kernel’s ksmbd SMB‑server implementation on 32‑bit architectures. All kernel releases prior to the patch commit beff0bc9d69b that added the bounds‑check guard are affected. The vulnerability applies to all distributions shipping an unpatched 32‑bit kernel. 64‑bit kernels are not impacted because the overflow cannot occur in that address space.

Risk and Exploitability

The CVSS score is not provided and the EPSS score is unavailable, while the vulnerability is not listed in the CISA KEV catalog, indicating no known active exploitation. It is inferred that an attacker would need network access to the vulnerable SMB server to send a crafted SMB2 SET_INFO(SEC) request with a dacl_offset of 0xfffffff8, triggering the overflow. The exploit does not require local privileges and can be performed over the network, but it requires a specific SMB packet and a 32‑bit kernel, so the likelihood is moderate. The potential impact on confidentiality is significant because kernel memory may contain sensitive data.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Apply a kernel update that includes the ksmbd bounds‑check fix or backport the patch to your current kernel
  • If the patch cannot be applied immediately, disable or remove the ksmbd service or block SMB traffic from untrusted networks
  • Consider switching to a 64‑bit kernel, which is not affected by this overflow

Generated by OpenCVE AI on November 16, 2026 at 12:22 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Weaknesses CWE-190
CWE-788
CWE-805
Type Values Removed Values Added
First Time appeared Linux linux
Vendors & Products Linux linux
Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: ksmbd: fix overflow in dacloffset bounds check in build_sec_desc() When the large dacl_offset is provided, dacl_offset + sizeof(struct smb_acl) overflows on 32-bit builds and the check is passed, Which makes le16_to_cpu(ppdacl_ptr->size) read out-of-bounds. This only happens for dacl_offset in range [0xFFFFFFF8, 0xFFFFFFFF]. So the oob read is max 8 bytes preceding the allocated ppntsd. unsigned int dacl_offset = le32_to_cpu(ppntsd->dacloffset); int ppdacl_size, ntacl_size = ppntsd_size - dacl_offset; if (!dacl_offset || (dacl_offset + sizeof(struct smb_acl) > ppntsd_size)) goto out; Commit beff0bc9d69b ("ksmbd: fix overflow in dacloffset bounds check") fixes similar checks in other functions. But leaves this one out, because it is only valid for 32-bit builds. Reproduced on 32-bit ARM with KASAN, by a client sending SMB2 SET_INFO(SEC) with dacloffset=0xfffffff8, then QUERY_INFO(SEC) on the same file: BUG: KASAN: slab-out-of-bounds in build_sec_desc (fs/smb/server/smbacl.c:1105) Read of size 2 at addr c2a273fa by task kworker/1:1/35 CPU: 1 UID: 0 PID: 35 Comm: kworker/1:1 Not tainted 7.3.0-rc2+ #5 Workqueue: ksmbd-io handle_ksmbd_work Call trace: kasan_check_range from build_sec_desc (fs/smb/server/smbacl.c:1105) build_sec_desc from smb2_query_info (fs/smb/server/smb2pdu.c:7676) smb2_query_info from handle_ksmbd_work (fs/smb/server/server.c:160) handle_ksmbd_work from process_one_work (kernel/workqueue.c:3401) process_one_work from worker_thread (kernel/workqueue.c:3473) worker_thread from kthread (kernel/kthread.c:436) Add overflow check.
Title ksmbd: fix overflow in dacloffset bounds check in build_sec_desc()
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References
Weaknesses
  • CWE-190

    Integer Overflow or Wraparound

  • CWE-788

    Access of Memory Location After End of Buffer

  • CWE-805

    Buffer Access with Incorrect Length Value

Sources

Status
PUBLISHED
Assigner
Linux
Published
Updated
Nov 16, 2026, 9:59 AM
Reserved
Sep 25, 2026, 10:25 AM
Status
Received
Published
Nov 16, 2026, 10:17 AM
Modified
Nov 16, 2026, 10:17 AM