# CVE-2026-31712: ksmbd: require minimum ACE size in smb\_check\_perm\_dacl()

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 8.3
- **CVSS:** 8.3 (v3.1, CNA) `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:H`
- **CVSS metrics:** Attack vector: Network; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: Low; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, login needed
- **EPSS:** 0.54% (percentile 39, 2026-11-26)
- **CWE:** CWE-787
- **Published:** 2026-05-01T13:56:08.583Z
- **Modified:** 2026-11-11T21:10:00.200Z

## Who should check

- Anyone running Linux \>= e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9, \< 282cbbb476b9f35793452bc461934af4c7eca169; \>= e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9, \< f20adc4ef7428bc485ee83fd1a592252fb87718b; \>= e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9, \< 325d4ac11f526cb8964cff14548ccf02d8c756d8; \>= e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9, \< 95e5aa3c3261da8c95b27d7aecf8ee39b9f86a4c; \>= e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9, \< 90089584b2e25c4510b7b987387b4405f0673ece; \>= e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9, \< 151b1799861fde38087c08f613abc2843ef597b0; \>= e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9, \< d07b26f39246a82399661936dd0c853983cfade7
- Anyone running Linux 5.15

## Description

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

ksmbd: require minimum ACE size in smb\_check\_perm\_dacl()

Both ACE-walk loops in smb\_check\_perm\_dacl() only guard against an
under-sized remaining buffer, not against an ACE whose declared
\`ace-\>size\` is smaller than the struct it claims to describe:

  if (offsetof(struct smb\_ace, access\_req) \> aces\_size)
      break;
  ace\_size = le16\_to\_cpu(ace-\>size);
  if (ace\_size \> aces\_size)
      break;

The first check only requires the 4-byte ACE header to be in bounds;
it does not require access\_req (4 bytes at offset 4) to be readable.
An attacker who has set a crafted DACL on a file they own can declare
ace-\>size == 4 with aces\_size == 4, pass both checks, and then

  granted \|= le32\_to\_cpu(ace-\>access\_req);               /\* upper loop \*/
  compare\_sids(&sid, &ace-\>sid);                         /\* lower loop \*/

reads access\_req at offset 4 (OOB by up to 4 bytes) and ace-\>sid at
offset 8 (OOB by up to CIFS\_SID\_BASE\_SIZE + SID\_MAX\_SUB\_AUTHORITIES
\* 4 bytes).

Tighten both loops to require

  ace\_size \>= offsetof(struct smb\_ace, sid) + CIFS\_SID\_BASE\_SIZE

which is the smallest valid on-wire ACE layout (4-byte header +
4-byte access\_req + 8-byte sid base with zero sub-auths).  Also
reject ACEs whose sid.num\_subauth exceeds SID\_MAX\_SUB\_AUTHORITIES
before letting compare\_sids() dereference sub\_auth\[\] entries.

parse\_sec\_desc() already enforces an equivalent check (lines 441-448);
smb\_check\_perm\_dacl() simply grew weaker validation over time.

Reachability: authenticated SMB client with permission to set an ACL
on a file.  On a subsequent CREATE against that file, the kernel
walks the stored DACL via smb\_check\_perm\_dacl() and triggers the
OOB read.  Not pre-auth, and the OOB read is not reflected to the
attacker, but KASAN reports and kernel state corruption are
possible.

## Affected and fixed versions

- Linux: \>= e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9, \< 282cbbb476b9f35793452bc461934af4c7eca169; \>= e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9, \< f20adc4ef7428bc485ee83fd1a592252fb87718b; \>= e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9, \< 325d4ac11f526cb8964cff14548ccf02d8c756d8; \>= e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9, \< 95e5aa3c3261da8c95b27d7aecf8ee39b9f86a4c; \>= e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9, \< 90089584b2e25c4510b7b987387b4405f0673ece; \>= e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9, \< 151b1799861fde38087c08f613abc2843ef597b0; \>= e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9, \< d07b26f39246a82399661936dd0c853983cfade7 (cvelist)
- Linux: 5.15 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-31712. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-31712.md
Affected: Linux >= e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9, < 282cbbb476b9f35793452bc461934af4c7eca169; >= e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9, < f20adc4ef7428bc485ee83fd1a592252fb87718b; >= e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9, < 325d4ac11f526cb8964cff14548ccf02d8c756d8; >= e2f34481b24db2fd634b5ed…
Fixed in: Linux 282cbbb476b9f35793452bc461934af4c7eca169, Linux 325d4ac11f526cb8964cff14548ccf02d8c756d8, Linux 95e5aa3c3261da8c95b27d7aecf8ee39b9f86a4c, Linux 90089584b2e25c4510b7b987387b4405f0673ece, Linux 151b1799861fde38087c08f613abc2843ef597b0

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-31712 being exploited?

There is no confirmed exploitation: CVE-2026-31712 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.54% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2026-31712?

High: CVSS 8.3 (v3.1, scored by CNA). Remote, login needed.

### Which versions are affected by CVE-2026-31712?

Linux \>= e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9, \< 282cbbb476b9f35793452bc461934af4c7eca169; \>= e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9, \< f20adc4ef7428bc485ee83fd1a592252fb87718b; \>= e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9, \< 325d4ac11f526cb8964cff14548ccf02d8c756d8; \>= e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9, \< 95e5aa3c3261da8c95b27d7aecf8ee39b9f86a4c; \>= e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9, \< 90089584b2e25c4510b7b987387b4405f0673ece; \>= e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9, \< 151b1799861fde38087c08f613abc2843ef597b0; \>= e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9, \< d07b26f39246a82399661936dd0c853983cfade7; Linux 5.15.

### Is there a fix for CVE-2026-31712?

Yes. Fixed in Linux 282cbbb476b9f35793452bc461934af4c7eca169, Linux 325d4ac11f526cb8964cff14548ccf02d8c756d8, Linux 95e5aa3c3261da8c95b27d7aecf8ee39b9f86a4c, Linux 90089584b2e25c4510b7b987387b4405f0673ece, Linux 151b1799861fde38087c08f613abc2843ef597b0. No fix listed yet: follow the vendor advisory.

### How do I check if I'm affected by CVE-2026-31712?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/95e5aa3c3261da8c95b27d7aecf8ee39b9f86a4c>
- patch: <https://git.kernel.org/stable/c/90089584b2e25c4510b7b987387b4405f0673ece>
- patch: <https://git.kernel.org/stable/c/151b1799861fde38087c08f613abc2843ef597b0>
- patch: <https://git.kernel.org/stable/c/d07b26f39246a82399661936dd0c853983cfade7>
- other: <https://git.kernel.org/stable/c/282cbbb476b9f35793452bc461934af4c7eca169>
- other: <https://git.kernel.org/stable/c/f20adc4ef7428bc485ee83fd1a592252fb87718b>
- other: <https://git.kernel.org/stable/c/325d4ac11f526cb8964cff14548ccf02d8c756d8>
- other: <https://cert-portal.siemens.com/productcert/html/ssa-784472.html>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-31712>

HTML: <https://flawdb.com/CVE-2026-31712> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-31712>
