CVE-2026-31704 Details
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.
A vulnerability in the Linux kernel's ksmbd component can lead to memory corruption by allowing a u16 Discretionary Access Control List (DACL) size overflow. The issue arises in the set_posix_acl_entries_dacl() and set_ntacl_dacl() functions, which accumulate Access Control Entry (ACE) sizes in u16 variables. When a file contains numerous POSIX ACL entries, the total size can exceed 65535, causing pointer arithmetic to overwrite existing ACEs. This overwriting truncates the DACL size, leading to potential data corruption. The vulnerability has been addressed by incorporating overflow checks at each accumulation point, preventing the size from exceeding its limit and causing buffer corruption.
Users can update to the latest version of the Linux kernel where this vulnerability has been fixed. Instructions for updating the kernel can be found in the official Linux documentation.
Metrics
CVSS 4.0 Severity and Vector Strings:
No CVSS 4.0 data is available for this CVE.
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
No SSVC data is available for this CVE.
References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://git.kernel.org/stable/c/299f962c0b02d048fb45d248b4da493d03f3175d | kernel.org | Patch |
| https://git.kernel.org/stable/c/41e53a773db6342ac9a689ee5ba635c31744c9f0 | kernel.org | |
| https://git.kernel.org/stable/c/5e7b8f3c539d69b2ed5f2408e2f75e68ce7eef43 | kernel.org | Patch |
| https://git.kernel.org/stable/c/8d5729350b236896f51379588d9a690b7fafb8db | kernel.org | Patch |
| https://git.kernel.org/stable/c/e1955a94b6f17f4b058afa955a6f187eb3ed7615 | kernel.org | Patch |
| https://git.kernel.org/stable/c/ef7902be3f215b6bf7babe4dc9dd9a7d57dad7a7 | kernel.org | Patch |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| NVD-CWE-noinfo | Insufficient Information to Classify Weakness | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| linux linux kernel | >= 5.15, < 6.6.136 >= 6.7, < 6.12.84 >= 6.13, < 6.18.25 >= 6.19, < 7.0.2 |
CPE
Remediation
| |
Change History
4 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | kernel.org |
| Jun 1, 2026 | CVE Modified | kernel.org |
| May 6, 2026 | Initial Analysis | [email protected] |
| May 1, 2026 | New CVE Received | kernel.org |