CVE-2026-31712·Kernel vulnerability
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.
- Severity
- high
- Software
- Kernel
- Fixed in
- 7.0.2
- Published
How likely is exploitation
FIRST's Exploit Prediction Scoring System puts the probability of this CVE being exploited in the next 30 days at 0.32% — higher than 24% of all published CVEs. EPSS is an independent forecast of exploitation, not a severity rating: it says nothing about how much damage a successful attack does, which is what a CVSS score measures.
Read the two together. CVE-2026-31712 scores 8.3 on CVSS, so a successful attack would be serious — but at 0.32%, almost nobody is currently attempting it. That is a different situation from a flaw under mass exploitation, and it is usually the difference between patching on your next maintenance window and patching tonight.
Affected versions
From: 6.19
Until: 7.0.2
Fixed in: 7.0.2
How to fix this CVE
Update your Linux kernel to version 7.0.2 or later to patch an out-of-bounds read vulnerability in the ksmbd SMB server component. This vulnerability affects authenticated users who can set file ACLs and requires immediate patching to prevent kernel state corruption. Reboot the system after applying the kernel update to complete remediation.
sudo dnf update kernel kernel-devel && sudo rebootDefensia detects this vulnerability
How to check if you are affected
- Check the installed kernel version: uname -r | grep -E '^[5-6]\.|^7\.0\.[0-1]' to identify vulnerable versions between 6.19 and 7.0.1
- Verify ksmbd module is loaded: lsmod | grep ksmbd — if present, the vulnerable component is active on this system
- Search kernel logs for out-of-bounds access indicators: sudo dmesg | grep -i 'kasan\|out of bounds\|smb_check_perm_dacl' to detect exploitation attempts
- Confirm the fix: uname -r should return 7.0.2 or higher; additionally verify with: cat /proc/version | grep -E '7\.0\.[2-9]|7\.[1-9]' after patching and reboot
FAQ
What is CVE-2026-31712?
This is an out-of-bounds memory read vulnerability in the Linux kernel's ksmbd SMB server that occurs when processing specially crafted DACL (Discretionary Access Control List) structures. An authenticated attacker who can set file ACLs can trigger the vulnerability during subsequent file access, potentially corrupting kernel state.
Is CVE-2026-31712 being actively exploited?
No, this vulnerability is not currently listed on the CISA Known Exploited Vulnerabilities catalog and no public exploits are available. However, it requires authentication and ACL modification privileges, limiting its attack surface.
What versions of Kernel are affected by CVE-2026-31712?
Linux kernel versions 6.19 through 7.0.1 are vulnerable. Version 7.0.2 and all subsequent releases contain the fix.
How do I check if my server is vulnerable to CVE-2026-31712?
Run: uname -r — if the output shows version 6.19 to 7.0.1, your system is vulnerable. Additionally verify ksmbd is enabled with: lsmod | grep ksmbd
Does Defensia detect CVE-2026-31712?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If the Linux kernel is installed on a monitored server, CVE-2026-31712 will appear in your dashboard with remediation steps.
Related Kernel CVEs
References
- https://git.kernel.org/stable/c/151b1799861fde38087c08f613abc2843ef597b0
- https://git.kernel.org/stable/c/282cbbb476b9f35793452bc461934af4c7eca169
- https://git.kernel.org/stable/c/325d4ac11f526cb8964cff14548ccf02d8c756d8
- https://git.kernel.org/stable/c/90089584b2e25c4510b7b987387b4405f0673ece
- https://git.kernel.org/stable/c/95e5aa3c3261da8c95b27d7aecf8ee39b9f86a4c
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2026-31712. Free for 1 server.
Get started free