# CVE-2026-31708: smb: client: fix OOB read in smb2\_ioctl\_query\_info QUERY\_INFO path

- Priority: **Routine**
- Reason: Not severe (CVSS 8.1, 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-19
- Aliases: UBUNTU-CVE-2026-31708, DEBIAN-CVE-2026-31708, CGA-8r68-39qp-v8hc, CGA-9jw8-cv43-q3wv, CGA-j7w2-932j-g336, CGA-jm34-h6qf-3p44, CGA-qpqh-3f8w-chp5, CGA-rhj9-f276-62mv, CGA-xqm2-rjxf-9wx6
- Record: https://cvemate.com/vulnerability/CVE-2026-31708 · JSON: https://cvemate.com/vulnerability/CVE-2026-31708/json

## Description

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

## Signals

- CVSS: 8.1 high (v3.1, CVE.org) CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:H
- EPSS: 0.358%, percentile 31.578%, 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 164)

- chainguard linux-aws-6.18 (Chainguard): \< 6.18.31-r0
- chainguard linux-azure-6.18 (Chainguard): \< 6.18.31-r0 \| \< 6.18.24-r1
- 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): All versions (No fix recorded) \| \< 5.15.0-198.208 \| \< 6.8.0-136.136 \| \< 7.0.0-27.27
- ubuntu linux-allwinner-5.19 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws (Ubuntu): All versions (No fix recorded) \| \< 5.15.0-1117.124 \| \< 6.8.0-1061.64 \| \< 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.4 (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)

## References (first 20 of 43)

- <https://git.kernel.org/stable/c/e66bdc0704977ecee667a81d38255b579c2353d0>
- <https://git.kernel.org/stable/c/9e203dbb5402897c43130fb171a2617008a91f45>
- <https://git.kernel.org/stable/c/1dd757379997b71a328a4b591ffaf481acd0ead1>
- <https://git.kernel.org/stable/c/a34d456934fe42e4da5d2cc07787bf418bee99c6>
- <https://git.kernel.org/stable/c/ac2f14e4705d020f04e806efa0d49ab8dc2b145f>
- <https://git.kernel.org/stable/c/078fae8f50adebb903ccf2252b44391324571e78>
- <https://git.kernel.org/stable/c/85fd46ee26a11841c670449508025965f61ce131>
- <https://git.kernel.org/stable/c/a58c5af19ff0d6f44f6e9fe31e33a2c92223f77e>
- <https://ubuntu.com/security/CVE-2026-31708>
- <https://www.cve.org/CVERecord?id=CVE-2026-31708>
- <https://git.kernel.org/linus/a58c5af19ff0d6f44f6e9fe31e33a2c92223f77e>
- <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>

---

Data as of 2026-12-05T03:09:12.261Z. 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
