CVE-2026-31708: smb: client: fix OOB read in smb2_ioctl_query_info QUERY_INFO path

Published May 1, 2026
·
Updated

In the Linux kernel, the following vulnerability has been resolved:

smb: client: fix OOB read in smb2ioctlqueryinfo QUERYINFO path

smb2ioctlqueryinfo() has two response-copy branches: PASSTHRUFSCTL and the default QUERYINFO path. The QUERYINFO branch clamps qi.inputbufferlength to the server-reported OutputBufferLength and then copies qi.inputbufferlength bytes from qirsp->Buffer to userspace, but it never verifies that the flexible-array payload actually fits within rspiov[1].iovlen.

A malicious server can return OutputBufferLength larger than the actual QUERYINFO response, causing copytouser() to walk past the response buffer and expose adjacent kernel heap to userspace.

Guard the QUERYINFO copy with a bounds check on the actual Buffer payload. Use structsize(qirsp, Buffer, qi.inputbufferlength) rather than an open-coded addition so the guard cannot overflow on 32-bit builds.

Affected Software

6 affected componentsFixes available
Linux Linux kernel
Microsoft azl3 kernel 6.6.134.1-2
Linux Linux kernel>=5.1<6.6.136
Linux Linux kernel>=6.7<6.12.84
Linux Linux kernel>=6.13<6.18.25
Linux Linux kernel>=6.19<7.0.2

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Configuration

    In smb2_ioctl_query_info()’s QUERY_INFO branch, guard the QUERY_INFO copy with a bounds check that uses struct_size(qi_rsp, Buffer, qi.input_buffer_length) and use the default QUERY_INFO path. Ensure the flexible-array payload actually fits in the response before copying to userspace.

    Linux kernel (smb2_ioctl_query_info) QUERY_INFO response path bounds check for QUERY_INFO flexible-array payload using struct_size(qi_rsp, Buffer, qi.input_buffer_length) = Use struct_size(qi_rsp, Buffer, qi.input_buffer_length) and the default QUERY_INFO path instead of open-coded addition
  2. Configuration

    In smb2_ioctl_query_info(), clamp qi.input_buffer_length to the server-reported OutputBufferLength, and compute rsp_iov[1].iov_len without open-coded addition so the guard cannot overflow (the text specifies this is done rather than open-coded addition so the guard cannot overflow on rsp_iov[1].iov_len).

    Linux kernel (smb2_ioctl_query_info) PASSTHRU_FSCTL / QUERY_INFO response-copy logic avoid overflow when clamping by server-reported OutputBufferLength = Rather than open-coded addition, clamp qi.input_buffer_length to server-reported OutputBufferLength and use guarded sizing for rsp_iov[1].iov_len

Event History

May 1, 2026
CVE Published
via MITRE·01:56 PM
Data Sourced
via MITRE·01:56 PM
DescriptionSeverity
Data Sourced
via NVD·02:16 PM
RemedyDescriptionSeverityWeaknessAffected Software
May 2, 2026
Data Sourced
via Microsoft·08:04 AM
DescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2026-31708?

CVE-2026-31708 is classified with a high severity rating due to its potential to allow an out-of-bounds read.

2

How do I fix CVE-2026-31708?

To fix CVE-2026-31708, update to the latest stable version of the Linux kernel where the vulnerability has been patched.

3

What systems are affected by CVE-2026-31708?

CVE-2026-31708 affects the Linux kernel, particularly versions where the smb2_ioctl_query_info function is used.

4

What type of vulnerability is CVE-2026-31708?

CVE-2026-31708 is categorized as an out-of-bounds read vulnerability in the Linux kernel's SMB client.

5

Is CVE-2026-31708 being actively exploited?

As of now, there are no specific reports indicating that CVE-2026-31708 is being actively exploited in the wild.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203