CVE-2026-97559: smb: client: fail DACL rewrite when the new DACL exceeds 64K

Published Sep 25, 2026
·
Updated

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

smb: client: fail DACL rewrite when the new DACL exceeds 64K

replacesidsandcopyaces() and setchmoddacl() accumulate the size of the DACL they build in a u16. That accumulator can wrap.

validatedacl() caps numaces at (daclsize - sizeof(struct smbacl)) / 20, i.e. 3276 for a maximally sized DACL, while each rewritten ACE can grow to sizeof(struct smbace) (76 bytes) once its SID is replaced with one carrying SIDMAXSUBAUTHORITIES sub-authorities. The worst case is therefore sizeof(struct smbacl) + 3276 76 = 248984 bytes, far beyond what a u16 can hold. A wraparound is reached with 863 ACEs.

After the wraparound, ndaclptr->size becomes meaningless and the offset will point anywhere in the ACE array. As a result, we will see corruption of the DACL, which then gets sent to the server. This is not an out-of-bounds write as the allocation now covers the worst-case expansion, so writes will always go into the buffer.

Adjust the code to use a u32 internally and return -EOVERFLOW in the overflow case. The operation must be refused, because a DACL can only hold 2^16-1 bytes on the wire and larger DACLs cannot be represented.

setchmoddacl() carries the same pattern and is fixed the same way. It only wraps once the source DACL comes within roughly 380 bytes of the 64K ceiling, but the failure mode is identical.

Affected Software

1 affected component
Linux Linux kernel

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Compensating control

    Update replace_sids_and_copy_aces() and set_chmod_dacl() to accumulate the rewritten DACL size in a u32, refuse rewrites whose resulting DACL exceeds 64K, and return -EOVERFLOW for the overflow case.

Event History

Sep 25, 2026
CVE Published
via MITRE·10:21 AM
Data Sourced
via MITRE·10:21 AM
Description
Data Sourced
via NVD·11:17 AM
Description

Frequently Asked Questions

1

Which systems are exposed to this issue?

Linux systems using the SMB client are affected when they perform a DACL rewrite, including the chmod DACL path. The issue concerns DACLs whose rewritten ACEs expand significantly because their SIDs are replaced.

2

What conditions trigger the corruption?

The DACL rewrite must contain enough expanding ACEs for the internal 16-bit size accumulator to wrap. The described wraparound is reached with 863 ACEs when rewritten ACEs grow to 76 bytes.

3

What is the practical impact of the integer wraparound?

The resulting DACL size and ACE offset become invalid, causing corruption of the DACL that is sent to the SMB server. The described condition is not an out-of-bounds write because the allocation covers the worst-case expansion.

4

What should happen after the fix when a rewritten DACL is too large?

The operation is refused with -EOVERFLOW when the DACL would exceed the size that can be represented on the wire. A DACL cannot exceed 2^16-1 bytes on the wire.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203