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

- Priority: **Routine**
- Reason: Not severe (CVSS 8.3, network access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2026-05-01 · Modified: 2026-10-15
- Aliases: UBUNTU-CVE-2026-31712, DEBIAN-CVE-2026-31712, CGA-5pwg-c3m3-pqr9, CGA-78rp-v8ff-2cv7, CGA-8frq-jjcm-m2fg, CGA-8gcw-xqjq-xc6q, CGA-cvjr-6782-35p9, CGA-jf89-xq67-c6hq, CGA-qpx4-8xwv-wr2m
- Record: https://cvemate.com/vulnerability/CVE-2026-31712 · JSON: https://cvemate.com/vulnerability/CVE-2026-31712/json

## Description

```text
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.
```

## Signals

- CVSS: 8.3 high (v3.1, CVE.org) CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:H
- EPSS: 0.329%, percentile 28%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected (first 20 of 156)

- chainguard linux-aws-6.18 (Chainguard): \< 6.18.31-r0
- chainguard linux-azure-6.18 (Chainguard): \< 6.18.24-r1 \| \< 6.18.31-r0
- chainguard linux-gcp-6.18 (Chainguard): \< 6.18.31-r0
- chainguard linux-qemu-6.18 (Chainguard): \< 6.18.24-r3
- chainguard linux-qemu-rc (Chainguard): \< 7.1\_rc3-r0
- chainguard linux-vmware-6.18 (Chainguard): \< 6.18.31-r0
- debian linux (Debian): \< 6.1.176-1 \| \< 6.12.85-1 \| \< 7.0.3-1
- ubuntu linux (Ubuntu): \< 5.15.0-198.208 \| \< 6.8.0-136.136 \| All versions (No fix recorded) \| \< 7.0.0-27.27
- ubuntu linux-allwinner-5.19 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws (Ubuntu): \< 5.15.0-1117.124 \| \< 6.8.0-1061.64 \| All versions (No fix recorded) \| \< 7.0.0-1008.8
- ubuntu linux-aws-5.0 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.11 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.13 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.15 (Ubuntu): \< 5.15.0-1117.124~20.04.1
- ubuntu linux-aws-5.19 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.3 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.8 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-6.14 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-6.17 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-6.2 (Ubuntu): All versions (No fix recorded)

## References (first 20 of 42)

- <https://git.kernel.org/stable/c/282cbbb476b9f35793452bc461934af4c7eca169>
- <https://git.kernel.org/stable/c/f20adc4ef7428bc485ee83fd1a592252fb87718b>
- <https://git.kernel.org/stable/c/325d4ac11f526cb8964cff14548ccf02d8c756d8>
- <https://git.kernel.org/stable/c/95e5aa3c3261da8c95b27d7aecf8ee39b9f86a4c>
- <https://git.kernel.org/stable/c/90089584b2e25c4510b7b987387b4405f0673ece>
- <https://git.kernel.org/stable/c/151b1799861fde38087c08f613abc2843ef597b0>
- <https://git.kernel.org/stable/c/d07b26f39246a82399661936dd0c853983cfade7>
- <https://ubuntu.com/security/CVE-2026-31712>
- <https://www.cve.org/CVERecord?id=CVE-2026-31712>
- <https://git.kernel.org/linus/d07b26f39246a82399661936dd0c853983cfade7>
- <https://ubuntu.com/security/notices/USN-8488-1>
- <https://ubuntu.com/security/notices/USN-8488-2>
- <https://ubuntu.com/security/notices/USN-8507-1>
- <https://ubuntu.com/security/notices/USN-8569-1>
- <https://ubuntu.com/security/notices/USN-8567-1>
- <https://ubuntu.com/security/notices/USN-8574-1>
- <https://ubuntu.com/security/notices/USN-8574-2>
- <https://ubuntu.com/security/notices/USN-8595-1>
- <https://ubuntu.com/security/notices/USN-8596-1>
- <https://ubuntu.com/security/notices/USN-8603-1>

---

Data as of 2026-12-05T05:11:09.487Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
