CVE-2026-31704: ksmbd: use check_add_overflow() to prevent u16 DACL size overflow

Published May 1, 2026
·
Updated

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

ksmbd: use checkaddoverflow() to prevent u16 DACL size overflow

setposixaclentriesdacl() and setntacldacl() 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 checkaddoverflow() at each accumulation point to detect the wrap before it corrupts the buffer, consistent with existing checkmuloverflow() usage elsewhere in smbacl.c.

Affected Software

6 affected componentsFixes available
The Linux Foundation ksmbd (Linux kernel)
Microsoft azl3 kernel 6.6.134.1-2
Linux Linux kernel>=5.15<6.6.136
Linux Linux kernel>=6.7<6.12.84
Linux Linux kernel>=6.13<6.18.25
Linux Linux kernel>=6.19<7.0.2

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Operational

    Apply a code-level fix to ksmbd that uses check_add_overflow() at each accumulation point when computing DACL/ACE sizes: modify set_posix_acl_entries_dacl() and set_ntacl_dacl() so that the u16 accumulations of ACE sizes are checked with check_add_overflow() to detect and prevent wraparound before writing the buffer.

Event History

May 1, 2026
CVE Published
via MITRE·01:56 PM
Data Sourced
via MITRE·01:56 PM
Description
Data Sourced
via NVD·02:16 PM
RemedyDescriptionSeverityAffected Software
May 2, 2026
Data Sourced
via Microsoft·08:04 AM
DescriptionSeverityWeaknessAffected Software
Updated
via Microsoft·08:04 AM
DescriptionSeverity
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-31704?

CVE-2026-31704 is classified with a moderate severity level due to its potential impact on Linux kernel security.

2

How do I fix CVE-2026-31704?

To fix CVE-2026-31704, upgrade to the Linux kernel version that includes the patch for this vulnerability.

3

Which software is affected by CVE-2026-31704?

CVE-2026-31704 affects the ksmbd component of the Linux kernel across several versions.

4

What is the nature of CVE-2026-31704?

CVE-2026-31704 involves an overflow vulnerability in DACL size handling in the Linux kernel's ksmbd implementation.

5

When was CVE-2026-31704 disclosed?

CVE-2026-31704 was disclosed in 2026 as part of ongoing security improvements to the Linux kernel.

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