CVE-2026-31712 json
ksmbd: require minimum ACE size in smb_check_perm_dacl()
published 2026-05-01 6 mo ago modified 2026-10-15 25 d ago also EUVD-2026-26521
- cvss
- 8.3
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.3%
- EPSS 0.3% chance of exploitation in 30 days, percentile 25%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- Linux Linux 5.15.210, 6.1.176, 6.6.140, 6.12.84, 6.18.25, 7.0.2, 7.1
- linux Debian 12 6.1.176-1
- linux Debian 13 6.12.85-1
- linux Debian 14 7.0.3-1
debian advisories DEBIAN-CVE-2026-31712
- linux Ubuntu 22.04 LTS 5.15.0-198.208
- linux Ubuntu 24.04 LTS 6.8.0-136.136
- linux Ubuntu 26.04 LTS 7.0.0-27.27
- linux-aws Ubuntu 22.04 LTS 5.15.0-1117.124
- linux-aws Ubuntu 24.04 LTS 6.8.0-1061.64
- linux-aws Ubuntu 26.04 LTS 7.0.0-1008.8
- linux-gcp Ubuntu 22.04 LTS 5.15.0-1118.128
- linux-gcp Ubuntu 24.04 LTS 6.8.0-1064.72
ubuntu advisories UBUNTU-CVE-2026-31712
Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- kernel-source openSUSE Tumbleweed 7.0.7-1.1
opensuse advisories openSUSE-SU-2026:10793-1
- git.kernel.org/stable/c/282cbbb476b9f35793452bc461934af4c7eca169 commit
- git.kernel.org/stable/c/f20adc4ef7428bc485ee83fd1a592252fb87718b commit
- git.kernel.org/stable/c/325d4ac11f526cb8964cff14548ccf02d8c756d8 commit
- git.kernel.org/stable/c/95e5aa3c3261da8c95b27d7aecf8ee39b9f86a4c commit
- git.kernel.org/stable/c/90089584b2e25c4510b7b987387b4405f0673ece commit
- git.kernel.org/stable/c/151b1799861fde38087c08f613abc2843ef597b0 commit
- git.kernel.org/stable/c/d07b26f39246a82399661936dd0c853983cfade7 commit
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2026-31712 updated
kernel: ksmbd: require minimum ACE size in smb_check_perm_dacl()
-
Red Hat Enterprise Linux 6 perf, kernel, python-perf, kernel-kdump, kernel-firmware, kernel-bootwrapper, +1 more Red Hat Enterprise Linux 7 perf, kernel, bpftool, kernel-rt, python-perf, kernel-kdump, +8 more Red Hat Enterprise Linux 8 perf, kernel, bpftool, kernel-rt, kernel-core, kernel-tools, +29 more Red Hat Enterprise Linux 9 rv, perf, rtla, kernel, bpftool, libperf, +83 more Red Hat Enterprise Linux 10 kernelnot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
cisa ICSA-26-295-16 updated cvss 8.3
Siemens SIMATIC S7-1500 TM MFP
-
Siemens SIMATIC S7-1500 TM MFP - GNU/Linux subsystemaffected: mitigation, no fix available
Facts from CISA's republication of the vendor's own advisory (CSAF); the linked advisory is the authoritative source. CISA notification · csaf
Exploit prediction
0.32% chance of exploitation in the next 30 days, higher than 25% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 8.3 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:H |
Affected products
- Linux Linux
- Siemens SIMATIC S7-1500 TM MFP - GNU/Linux subsystem
Classification
- Weakness
-
- CWE-787 Out-of-bounds Write
- Technology feeds
References
- git.kernel.org /stable/c/282cbbb476b9f35793452bc461934af4c7eca169
- git.kernel.org /stable/c/f20adc4ef7428bc485ee83fd1a592252fb87718b
- git.kernel.org /stable/c/325d4ac11f526cb8964cff14548ccf02d8c756d8
-
git.kernel.org
/stable/c/95e5aa3c3261da8c95b27d7aecf8ee39b9f86a4c
patch
-
git.kernel.org
/stable/c/90089584b2e25c4510b7b987387b4405f0673ece
patch
-
git.kernel.org
/stable/c/151b1799861fde38087c08f613abc2843ef597b0
patch
-
git.kernel.org
/stable/c/d07b26f39246a82399661936dd0c853983cfade7
patch
- cert-portal.siemens.com /productcert/html/ssa-784472.html
Sources
- CVE List CVE-2026-31712
- NVD CVE-2026-31712
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.