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

ksmbd: use check_add_overflow() to prevent u16 DACL size overflow

set_posix_acl_entries_dacl() and set_ntacl_dacl() accumulate ACE sizes
in u16 variables. When a file has many POSIX ACL entries, the
accumulated size can wrap past 65535, causing the pointer arithmetic
(char *)pndace + *size to land within already-written ACEs. Subsequent
writes then overwrite earlier entries, and pndacl->size gets a
truncated value.

Use check_add_overflow() at each accumulation point to detect the
wrap before it corrupts the buffer, consistent with existing
check_mul_overflow() usage elsewhere in smbacl.c.
Published: 2026-05-01
Score: n/a
EPSS: n/a
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The ksmbd component in the Linux kernel aggregates the sizes of POSIX and NT access control entries in unsigned 16‑bit counters. If a file contains many ACL entries the accumulated size can wrap past 65535. The subsequent pointer arithmetic then points into a region of the buffer that has already been written, causing overwrites that corrupt earlier entries and truncate the ACL size field. This integrity violation in a kernel data structure can subvert permission checks or inject malicious data, allowing an attacker to elevate privileges or execute code at kernel level.

Affected Systems

All Linux kernel releases that include the ksmbd SMB server component are potentially affected until the patch commits are applied. The fix was introduced in commit 299f962c0b02d048fb45d248b4da493d03f3175d, so any kernel older than that is vulnerable.

Risk and Exploitability

An attacker with network access to a ksmbd‑enabled SMB service can send crafted ACL entries to trigger the integer overflow. Because the error occurs in kernel space, successful exploitation can lead to privilege escalation or arbitrary code execution. The EPSS score is not available and the vulnerability is not listed in CISA’s KEV catalog; no CVSS score was supplied, but kernel‑level impact indicates high severity. The attack requires only the ability to influence ACL creation over SMB, with no local privilege escalation prerequisite.

Generated by OpenCVE AI on May 2, 2026 at 10:41 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Update the Linux kernel to a version that includes the commit 299f962c0b02d048fb45d248b4da493d03f3175d or later which implements the overflow check.
  • If an immediate kernel upgrade is not possible, disable the ksmbd SMB service or restrict its operation to trusted networks only.
  • Use firewall rules or network segmentation to block or limit SMB traffic from untrusted hosts to reduce exposure while the kernel is upgraded.

Generated by OpenCVE AI on May 2, 2026 at 10:41 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Sat, 02 May 2026 00:15:00 +0000


Fri, 01 May 2026 14:15:00 +0000

Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: ksmbd: use check_add_overflow() to prevent u16 DACL size overflow set_posix_acl_entries_dacl() and set_ntacl_dacl() accumulate ACE sizes in u16 variables. When a file has many POSIX ACL entries, the accumulated size can wrap past 65535, causing the pointer arithmetic (char *)pndace + *size to land within already-written ACEs. Subsequent writes then overwrite earlier entries, and pndacl->size gets a truncated value. Use check_add_overflow() at each accumulation point to detect the wrap before it corrupts the buffer, consistent with existing check_mul_overflow() usage elsewhere in smbacl.c.
Title ksmbd: use check_add_overflow() to prevent u16 DACL size overflow
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-05-01T13:56:03.243Z

Reserved: 2026-03-09T15:48:24.132Z

Link: CVE-2026-31704

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Awaiting Analysis

Published: 2026-05-01T14:16:20.367

Modified: 2026-05-01T15:24:14.893

Link: CVE-2026-31704

cve-icon Redhat

Severity :

Publid Date: 2026-05-01T00:00:00Z

Links: CVE-2026-31704 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-05-01T22:15:27Z

Weaknesses