CVE-2026-31708·Kernel vulnerability
In the Linux kernel, the following vulnerability has been resolved: smb: client: fix OOB read in smb2_ioctl_query_info QUERY_INFO path smb2_ioctl_query_info() has two response-copy branches: PASSTHRU_FSCTL and the default QUERY_INFO path. The QUERY_INFO branch clamps qi.input_buffer_length to the server-reported OutputBufferLength and then copies qi.input_buffer_length bytes from qi_rsp->Buffer to userspace, but it never verifies that the flexible-array payload actually fits within rsp_iov[1].iov_len. A malicious server can return OutputBufferLength larger than the actual QUERY_INFO response, causing copy_to_user() to walk past the response buffer and expose adjacent kernel heap to userspace. Guard the QUERY_INFO copy with a bounds check on the actual Buffer payload. Use struct_size(qi_rsp, Buffer, qi.input_buffer_length) rather than an open-coded addition so the guard cannot overflow on 32-bit builds.
- 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.35% — higher than 29% 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-31708 scores 8.1 on CVSS, so a successful attack would be serious — but at 0.35%, 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 SMB client query operations. This flaw allows a malicious SMB server to leak sensitive kernel memory to unprivileged users by returning falsified buffer size values. Immediate patching is recommended for systems connecting to untrusted or external SMB shares.
sudo dnf update kernel kernel-headersDefensia detects this vulnerability
How to check if you are affected
- Check installed kernel version: uname -r (affected range: 6.19 to 7.0.1)
- Verify SMB client is loaded: lsmod | grep smb (if cifs or smb3 modules appear, the vulnerable code path is present)
- Check for SMB mount points: mount | grep cifs (identifies systems actively using SMB shares that could trigger the vulnerability)
- Confirm patch applied: grep -i 'smb2_ioctl_query_info' /boot/config-$(uname -r) && uname -r | grep -E '7\.0\.[2-9]|7\.[1-9]|[8-9]\.' (version 7.0.2+ indicates fix is installed)
FAQ
What is CVE-2026-31708?
This vulnerability is an out-of-bounds memory read in the Linux kernel's SMB client implementation that occurs when processing QUERY_INFO responses. A rogue SMB server can craft a response with a falsified buffer length, causing the kernel to copy memory beyond the actual response buffer into userspace, exposing sensitive kernel heap data.
Is CVE-2026-31708 being actively exploited?
No, CVE-2026-31708 is not listed on the CISA KEV catalog and has no known public exploits at this time. However, the vulnerability is straightforward to exploit and could be weaponized by attackers controlling malicious SMB servers.
What versions of Kernel are affected by CVE-2026-31708?
Linux kernel versions 6.19 through 7.0.1 are vulnerable. Version 7.0.2 and later contain the fix.
How do I check if my server is vulnerable to CVE-2026-31708?
Run 'uname -r' and verify your version is 7.0.1 or earlier. If your kernel version is in the 6.19–7.0.1 range and your system mounts SMB shares (check with 'mount | grep cifs'), you are vulnerable.
Does Defensia detect CVE-2026-31708?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If Kernel is installed on a monitored server, CVE-2026-31708 will appear in your dashboard with remediation steps.
Related Kernel CVEs
References
- https://git.kernel.org/stable/c/078fae8f50adebb903ccf2252b44391324571e78
- https://git.kernel.org/stable/c/1dd757379997b71a328a4b591ffaf481acd0ead1
- https://git.kernel.org/stable/c/85fd46ee26a11841c670449508025965f61ce131
- https://git.kernel.org/stable/c/9e203dbb5402897c43130fb171a2617008a91f45
- https://git.kernel.org/stable/c/a34d456934fe42e4da5d2cc07787bf418bee99c6
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2026-31708. Free for 1 server.
Get started free