CVE-2026-31704
ksmbd: use check_add_overflow() to prevent u16 DACL size overflow
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.
INFO
Published Date :
May 1, 2026, 2:16 p.m.
Last Modified :
Nov. 11, 2026, 9:10 p.m.
Remotely Exploit :
No
Source :
416baaa9-dc9f-4396-8d5f-8c081fb06d67
CVSS Scores
| Score | Version | Severity | Vector | Exploitability Score | Impact Score | Source |
|---|---|---|---|---|---|---|
| CVSS 3.1 | MEDIUM | [email protected] |
Solution
- Update the Linux kernel to a patched version.
- Apply security updates for ksmbd.
- Recompile kernel if custom patches are applied.
References to Advisories, Solutions, and Tools
Here, you will find a curated list of external links that provide in-depth
information, practical solutions, and valuable tools related to
CVE-2026-31704.
CWE - Common Weakness Enumeration
While CVE identifies
specific instances of vulnerabilities, CWE categorizes the common flaws or
weaknesses that can lead to vulnerabilities. CVE-2026-31704 is
associated with the following CWEs:
Common Attack Pattern Enumeration and Classification (CAPEC)
Common Attack Pattern Enumeration and Classification
(CAPEC)
stores attack patterns, which are descriptions of the common attributes and
approaches employed by adversaries to exploit the CVE-2026-31704
weaknesses.
We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).
Results are limited to the first 15 repositories due to potential performance issues.
The following list is the news that have been mention
CVE-2026-31704 vulnerability anywhere in the article.
The following table lists the changes that have been made to the
CVE-2026-31704 vulnerability over time.
Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.
-
CVE Translated by [email protected]
Nov. 11, 2026
Action Type Old Value New Value Added Translation Title: Linux Kernel, Description: En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta: ksmbd: usar check_add_overflow() para prevenir el desbordamiento de tamaño de DACL u16 set_posix_acl_entries_dacl() y set_ntacl_dacl() acumulan tamaños de ACE en variables u16. Cuando un archivo tiene muchas entradas ACL POSIX, el tamaño acumulado puede desbordarse más allá de 65535, causando que la aritmética de punteros (char *)pndace + size aterrice dentro de ACEs ya escritos. Las escrituras subsiguientes luego sobrescriben entradas anteriores, y pndacl -> size obtiene un valor truncado. Usar check_add_overflow() en cada punto de acumulación para detectar el desbordamiento antes de que corrompa el búfer, consistente con el uso existente de check_mul_overflow() en otras partes de smbacl.c. -
CVE Modified by 0b142b55-0307-4c5a-b3c9-f314f3fb7c5e
Oct. 15, 2026
Action Type Old Value New Value Added Affected New affected value received. <a href="https://github.com/CVEProject/cvelistV5/blob/main/cves/2026/31xxx/CVE-2026-31704.json">CVE-2026-31704</a> Added Reference https://cert-portal.siemens.com/productcert/html/ssa-784472.html -
CVE Modified by 416baaa9-dc9f-4396-8d5f-8c081fb06d67
Oct. 15, 2026
Action Type Old Value New Value Added Reference https://git.kernel.org/stable/c/299f962c0b02d048fb45d248b4da493d03f3175d Added Reference https://git.kernel.org/stable/c/41e53a773db6342ac9a689ee5ba635c31744c9f0 Added Reference https://git.kernel.org/stable/c/5e7b8f3c539d69b2ed5f2408e2f75e68ce7eef43 Added Reference https://git.kernel.org/stable/c/8d5729350b236896f51379588d9a690b7fafb8db Added Reference https://git.kernel.org/stable/c/e1955a94b6f17f4b058afa955a6f187eb3ed7615 Added Reference https://git.kernel.org/stable/c/ef7902be3f215b6bf7babe4dc9dd9a7d57dad7a7 Removed Reference https://git.kernel.org/stable/c/299f962c0b02d048fb45d248b4da493d03f3175d Removed Reference https://git.kernel.org/stable/c/41e53a773db6342ac9a689ee5ba635c31744c9f0 Removed Reference https://git.kernel.org/stable/c/5e7b8f3c539d69b2ed5f2408e2f75e68ce7eef43 Removed Reference https://git.kernel.org/stable/c/8d5729350b236896f51379588d9a690b7fafb8db Removed Reference https://git.kernel.org/stable/c/e1955a94b6f17f4b058afa955a6f187eb3ed7615 Removed Reference https://git.kernel.org/stable/c/ef7902be3f215b6bf7babe4dc9dd9a7d57dad7a7 Removed Reference Type https://git.kernel.org/stable/c/299f962c0b02d048fb45d248b4da493d03f3175d Types: Patch Removed Reference Type https://git.kernel.org/stable/c/5e7b8f3c539d69b2ed5f2408e2f75e68ce7eef43 Types: Patch Removed Reference Type https://git.kernel.org/stable/c/8d5729350b236896f51379588d9a690b7fafb8db Types: Patch Removed Reference Type https://git.kernel.org/stable/c/e1955a94b6f17f4b058afa955a6f187eb3ed7615 Types: Patch Removed Reference Type https://git.kernel.org/stable/c/ef7902be3f215b6bf7babe4dc9dd9a7d57dad7a7 Types: Patch -
CVE Modified by 416baaa9-dc9f-4396-8d5f-8c081fb06d67
Jun. 17, 2026
Action Type Old Value New Value Added Affected [{'repo': 'https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git', 'vendor': 'Linux', 'product': 'Linux', 'versions': [{'status': 'affected', 'version': 'e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9', 'lessThan': '41e53a773db6342ac9a689ee5ba635c31744c9f0', 'versionType': 'git'}, {'status': 'affected', 'version': 'e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9', 'lessThan': '8d5729350b236896f51379588d9a690b7fafb8db', 'versionType': 'git'}, {'status': 'affected', 'version': 'e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9', 'lessThan': 'e1955a94b6f17f4b058afa955a6f187eb3ed7615', 'versionType': 'git'}, {'status': 'affected', 'version': 'e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9', 'lessThan': '5e7b8f3c539d69b2ed5f2408e2f75e68ce7eef43', 'versionType': 'git'}, {'status': 'affected', 'version': 'e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9', 'lessThan': 'ef7902be3f215b6bf7babe4dc9dd9a7d57dad7a7', 'versionType': 'git'}, {'status': 'affected', 'version': 'e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9', 'lessThan': '299f962c0b02d048fb45d248b4da493d03f3175d', 'versionType': 'git'}], 'programFiles': ['fs/smb/server/smbacl.c'], 'defaultStatus': 'unaffected'}, {'repo': 'https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git', 'vendor': 'Linux', 'product': 'Linux', 'versions': [{'status': 'affected', 'version': '5.15'}, {'status': 'unaffected', 'version': '0', 'lessThan': '5.15', 'versionType': 'semver'}, {'status': 'unaffected', 'version': '6.1.175', 'versionType': 'semver', 'lessThanOrEqual': '6.1.*'}, {'status': 'unaffected', 'version': '6.6.136', 'versionType': 'semver', 'lessThanOrEqual': '6.6.*'}, {'status': 'unaffected', 'version': '6.12.84', 'versionType': 'semver', 'lessThanOrEqual': '6.12.*'}, {'status': 'unaffected', 'version': '6.18.25', 'versionType': 'semver', 'lessThanOrEqual': '6.18.*'}, {'status': 'unaffected', 'version': '7.0.2', 'versionType': 'semver', 'lessThanOrEqual': '7.0.*'}, {'status': 'unaffected', 'version': '7.1', 'versionType': 'original_commit_for_fix', 'lessThanOrEqual': '*'}], 'programFiles': ['fs/smb/server/smbacl.c'], 'defaultStatus': 'affected'}] -
CVE Modified by 416baaa9-dc9f-4396-8d5f-8c081fb06d67
Jun. 01, 2026
Action Type Old Value New Value Added Reference https://git.kernel.org/stable/c/41e53a773db6342ac9a689ee5ba635c31744c9f0 -
Initial Analysis by [email protected]
May. 06, 2026
Action Type Old Value New Value Added CVSS V3.1 AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H Added CWE NVD-CWE-noinfo Added CPE Configuration OR *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 6.7 up to (excluding) 6.12.84 *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 5.15 up to (excluding) 6.6.136 *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 6.13 up to (excluding) 6.18.25 *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 6.19 up to (excluding) 7.0.2 Added Reference Type kernel.org: https://git.kernel.org/stable/c/299f962c0b02d048fb45d248b4da493d03f3175d Types: Patch Added Reference Type kernel.org: https://git.kernel.org/stable/c/5e7b8f3c539d69b2ed5f2408e2f75e68ce7eef43 Types: Patch Added Reference Type kernel.org: https://git.kernel.org/stable/c/8d5729350b236896f51379588d9a690b7fafb8db Types: Patch Added Reference Type kernel.org: https://git.kernel.org/stable/c/e1955a94b6f17f4b058afa955a6f187eb3ed7615 Types: Patch Added Reference Type kernel.org: https://git.kernel.org/stable/c/ef7902be3f215b6bf7babe4dc9dd9a7d57dad7a7 Types: Patch -
New CVE Received by 416baaa9-dc9f-4396-8d5f-8c081fb06d67
May. 01, 2026
Action Type Old Value New Value 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. Added Reference https://git.kernel.org/stable/c/299f962c0b02d048fb45d248b4da493d03f3175d Added Reference https://git.kernel.org/stable/c/5e7b8f3c539d69b2ed5f2408e2f75e68ce7eef43 Added Reference https://git.kernel.org/stable/c/8d5729350b236896f51379588d9a690b7fafb8db Added Reference https://git.kernel.org/stable/c/e1955a94b6f17f4b058afa955a6f187eb3ed7615 Added Reference https://git.kernel.org/stable/c/ef7902be3f215b6bf7babe4dc9dd9a7d57dad7a7