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: 5.5 Medium
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The Linux kernel’s ksmbd SMB server component calculates the size of access control entries in unsigned 16‑bit counters. When a file contains many POSIX or NT ACL entries, the accumulated size can wrap beyond 65535, causing pointer arithmetic to address memory inside an already‑written block. The subsequent writes overwrite earlier entries and truncate the ACL size field, resulting in corruption of kernel data structures that hold permissions. The weakness is identified as an integer overflow (CWE‑190).

Affected Systems

All Linux kernels that include the ksmbd service are potentially affected until the fix is applied. The vulnerability was addressed with commit 299f962c0b02d048fb45d248b4da493d03f3175d; any kernel version prior to that commit is vulnerable.

Risk and Exploitability

An attacker who can control ACL entries sent over SMB can trigger this overflow. Successful exploitation could corrupt kernel memory, potentially undermining access checks. The CVSS score of 5.5 indicates medium severity, the EPSS score of less than 1% suggests a low likelihood of exploitation, and the vulnerability is not listed in CISA KEV. The attack requires only network access to a ksmbd‑enabled SMB service and does not rely on local privilege escalation prerequisites.

Generated by OpenCVE AI on May 6, 2026 at 23:40 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Update the Linux kernel to a release that includes commit 299f962c0b02d048fb45d248b4da493d03f3175d or later.
  • If an immediate kernel upgrade is not feasible, disable the ksmbd service or limit it to trusted internal networks.
  • Implement firewall rules or network segmentation to block SMB traffic from untrusted hosts while the kernel is patched.

Generated by OpenCVE AI on May 6, 2026 at 23:40 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Wed, 06 May 2026 21:00:00 +0000

Type Values Removed Values Added
Weaknesses NVD-CWE-noinfo
Metrics cvssV3_1

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


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-11T22:14:08.692Z

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

Link: CVE-2026-31704

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Analyzed

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

Modified: 2026-05-06T20:46:54.840

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-06T23:45:06Z

Weaknesses