CVE-2026-31704
Received Received - Intake
ksmbd ACL Size Overflow via u16 DACL Accumulation

Publication date: 2026-05-01

Last updated on: 2026-05-06

Assigner: kernel.org

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.
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2026-05-01
Last Modified
2026-05-06
Generated
2026-05-07
AI Q&A
2026-05-01
EPSS Evaluated
2026-05-05
NVD
EUVD
Affected Vendors & Products
Showing 4 associated CPEs
Vendor Product Version / Range
linux linux_kernel From 6.7 (inc) to 6.12.84 (exc)
linux linux_kernel From 5.15 (inc) to 6.6.136 (exc)
linux linux_kernel From 6.13 (inc) to 6.18.25 (exc)
linux linux_kernel From 6.19 (inc) to 7.0.2 (exc)
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-UNKNOWN
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?

This vulnerability exists in the Linux kernel's ksmbd component, where the functions set_posix_acl_entries_dacl() and set_ntacl_dacl() accumulate Access Control Entry (ACE) sizes in 16-bit unsigned integer (u16) variables. When a file has many POSIX ACL entries, the total size can exceed the maximum value of 65535 and wrap around, causing pointer arithmetic to point inside already-written ACEs. This leads to overwriting earlier entries and corrupting the buffer.

The fix involves using the check_add_overflow() function at each accumulation point to detect this overflow before it corrupts the buffer, preventing the size wrap and ensuring data integrity.


How can this vulnerability impact me? :

This vulnerability can lead to buffer corruption in the handling of Access Control Lists (ACLs) within the Linux kernel's ksmbd service. Specifically, when the size of ACL entries overflows, it causes overwriting of previously written entries, potentially leading to incorrect ACL data.

Such corruption could result in improper access permissions being set on files, which might allow unauthorized access or denial of access to legitimate users, thereby compromising system security and data integrity.


What immediate steps should I take to mitigate this vulnerability?

The vulnerability has been resolved by updating the Linux kernel to include the use of check_add_overflow() to prevent u16 DACL size overflow in the ksmbd component.

Therefore, the immediate step to mitigate this vulnerability is to update your Linux kernel to a version that includes this fix.


Ask Our AI Assistant
Need more information? Ask your question to get an AI reply (Powered by our expertise)
0/70
EPSS Chart