{"id":"CVE-2026-31708","state":"PUBLISHED","title":"smb: client: fix OOB read in smb2_ioctl_query_info QUERY_INFO path","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nsmb: client: fix OOB read in smb2_ioctl_query_info QUERY_INFO path\n\nsmb2_ioctl_query_info() has two response-copy branches: PASSTHRU_FSCTL\nand the default QUERY_INFO path.  The QUERY_INFO branch clamps\nqi.input_buffer_length to the server-reported OutputBufferLength and then\ncopies qi.input_buffer_length bytes from qi_rsp->Buffer to userspace, but\nit never verifies that the flexible-array payload actually fits within\nrsp_iov[1].iov_len.\n\nA malicious server can return OutputBufferLength larger than the actual\nQUERY_INFO response, causing copy_to_user() to walk past the response\nbuffer and expose adjacent kernel heap to userspace.\n\nGuard the QUERY_INFO copy with a bounds check on the actual Buffer\npayload.  Use struct_size(qi_rsp, Buffer, qi.input_buffer_length)\nrather than an open-coded addition so the guard cannot overflow on\n32-bit builds.","publishedAt":"2026-05-01T13:56:05.880Z","updatedAt":"2026-10-19T19:06:06.825Z","severity":{"score":8.1,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"f5778c398713692a16150ae96e5c8270bab8399f","status":"affected","lessThan":"e66bdc0704977ecee667a81d38255b579c2353d0","versionType":"git"},{"version":"f5778c398713692a16150ae96e5c8270bab8399f","status":"affected","lessThan":"9e203dbb5402897c43130fb171a2617008a91f45","versionType":"git"},{"version":"f5778c398713692a16150ae96e5c8270bab8399f","status":"affected","lessThan":"1dd757379997b71a328a4b591ffaf481acd0ead1","versionType":"git"},{"version":"f5778c398713692a16150ae96e5c8270bab8399f","status":"affected","lessThan":"a34d456934fe42e4da5d2cc07787bf418bee99c6","versionType":"git"},{"version":"f5778c398713692a16150ae96e5c8270bab8399f","status":"affected","lessThan":"ac2f14e4705d020f04e806efa0d49ab8dc2b145f","versionType":"git"},{"version":"f5778c398713692a16150ae96e5c8270bab8399f","status":"affected","lessThan":"078fae8f50adebb903ccf2252b44391324571e78","versionType":"git"},{"version":"f5778c398713692a16150ae96e5c8270bab8399f","status":"affected","lessThan":"85fd46ee26a11841c670449508025965f61ce131","versionType":"git"},{"version":"f5778c398713692a16150ae96e5c8270bab8399f","status":"affected","lessThan":"a58c5af19ff0d6f44f6e9fe31e33a2c92223f77e","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/smb/client/smb2ops.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.1","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.1","versionType":"semver"},{"version":"5.10.259","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.210","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.175","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.136","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.84","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.25","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.0.2","status":"unaffected","lessThanOrEqual":"7.0.*","versionType":"semver"},{"version":"7.1","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/smb/client/smb2ops.c"]}],"references":["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://cert-portal.siemens.com/productcert/html/ssa-784472.html"],"weaknesses":["CWE-125"],"ingestedAt":"2026-10-29T20:11:40.391Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/31xxx/CVE-2026-31708.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-31708","state":"PUBLISHED","datePublished":"2026-05-01T13:56:05.880Z","dateUpdated":"2026-10-19T19:06:06.825Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-03-09T15:48:24.132Z"},"containers":{"cna":{"title":"smb: client: fix OOB read in smb2_ioctl_query_info QUERY_INFO path","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nsmb: client: fix OOB read in smb2_ioctl_query_info QUERY_INFO path\n\nsmb2_ioctl_query_info() has two response-copy branches: PASSTHRU_FSCTL\nand the default QUERY_INFO path.  The QUERY_INFO branch clamps\nqi.input_buffer_length to the server-reported OutputBufferLength and then\ncopies qi.input_buffer_length bytes from qi_rsp->Buffer to userspace, but\nit never verifies that the flexible-array payload actually fits within\nrsp_iov[1].iov_len.\n\nA malicious server can return OutputBufferLength larger than the actual\nQUERY_INFO response, causing copy_to_user() to walk past the response\nbuffer and expose adjacent kernel heap to userspace.\n\nGuard the QUERY_INFO copy with a bounds check on the actual Buffer\npayload.  Use struct_size(qi_rsp, Buffer, qi.input_buffer_length)\nrather than an open-coded addition so the guard cannot overflow on\n32-bit builds."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"f5778c398713692a16150ae96e5c8270bab8399f","status":"affected","lessThan":"e66bdc0704977ecee667a81d38255b579c2353d0","versionType":"git"},{"version":"f5778c398713692a16150ae96e5c8270bab8399f","status":"affected","lessThan":"9e203dbb5402897c43130fb171a2617008a91f45","versionType":"git"},{"version":"f5778c398713692a16150ae96e5c8270bab8399f","status":"affected","lessThan":"1dd757379997b71a328a4b591ffaf481acd0ead1","versionType":"git"},{"version":"f5778c398713692a16150ae96e5c8270bab8399f","status":"affected","lessThan":"a34d456934fe42e4da5d2cc07787bf418bee99c6","versionType":"git"},{"version":"f5778c398713692a16150ae96e5c8270bab8399f","status":"affected","lessThan":"ac2f14e4705d020f04e806efa0d49ab8dc2b145f","versionType":"git"},{"version":"f5778c398713692a16150ae96e5c8270bab8399f","status":"affected","lessThan":"078fae8f50adebb903ccf2252b44391324571e78","versionType":"git"},{"version":"f5778c398713692a16150ae96e5c8270bab8399f","status":"affected","lessThan":"85fd46ee26a11841c670449508025965f61ce131","versionType":"git"},{"version":"f5778c398713692a16150ae96e5c8270bab8399f","status":"affected","lessThan":"a58c5af19ff0d6f44f6e9fe31e33a2c92223f77e","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/smb/client/smb2ops.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.1","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.1","versionType":"semver"},{"version":"5.10.259","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.210","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.175","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.136","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.84","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.25","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.0.2","status":"unaffected","lessThanOrEqual":"7.0.*","versionType":"semver"},{"version":"7.1","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/smb/client/smb2ops.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/e66bdc0704977ecee667a81d38255b579c2353d0"},{"url":"https://git.kernel.org/stable/c/9e203dbb5402897c43130fb171a2617008a91f45"},{"url":"https://git.kernel.org/stable/c/1dd757379997b71a328a4b591ffaf481acd0ead1"},{"url":"https://git.kernel.org/stable/c/a34d456934fe42e4da5d2cc07787bf418bee99c6"},{"url":"https://git.kernel.org/stable/c/ac2f14e4705d020f04e806efa0d49ab8dc2b145f"},{"url":"https://git.kernel.org/stable/c/078fae8f50adebb903ccf2252b44391324571e78"},{"url":"https://git.kernel.org/stable/c/85fd46ee26a11841c670449508025965f61ce131"},{"url":"https://git.kernel.org/stable/c/a58c5af19ff0d6f44f6e9fe31e33a2c92223f77e"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:H","baseScore":8.1,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:N - The attacker-controlled data is an SMB2 QUERY_INFO response sent by a remote SMB server to the kernel SMB client over the network. The vulnerable copy is reached after the client issues the ioctl-triggered compound open/query/close request.\nAC:L - There is no race or fragile timing requirement; a malicious server controls the malformed response fields and can reliably make the advertised copy length exceed the actual response payload. CIFS/SMB client support is common and the affected SMB2+ path is not a rare configuration.\nPR:N - The malicious SMB server needs no privileges on the vulnerable client. The affected PASSTHRU_QUERY_INFO branch has no CAP_SYS_ADMIN check, unlike the FSCTL and SET_INFO branches.\nUI:R - A victim or local process must have mounted/accessed the SMB share and issued the CIFS_QUERY_INFO ioctl. The malicious server cannot reach this ioctl path entirely unsolicited.\nS:U - The impact is within the vulnerable kernel/client system security scope. This is not a VM escape, IOMMU bypass, or cross-authority boundary violation.\nC:H - The bug is an out-of-bounds kernel read copied to userspace from beyond the received SMB response buffer. The overread can expose adjacent kernel heap data and is not strictly bounded to only a few harmless bytes.\nI:N - The vulnerable operation is a read from kernel memory followed by copy_to_user. It does not provide a kernel write primitive or direct data modification.\nA:H - The same attacker-controlled length can drive copy_to_user far beyond the valid response buffer. That can trigger kernel faults or hardened usercopy failures, so a kernel crash is a defensible impact."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T12:24:43.143Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.1","versionEndExcluding":"5.10.259"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.1","versionEndExcluding":"5.15.210"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.1","versionEndExcluding":"6.1.175"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.1","versionEndExcluding":"6.6.136"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.1","versionEndExcluding":"6.12.84"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.1","versionEndExcluding":"6.18.25"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.1","versionEndExcluding":"7.0.2"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.1","versionEndExcluding":"7.1"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"affected":[{"vendor":"Siemens","product":"SIMATIC S7-1500 TM MFP - GNU/Linux subsystem","defaultStatus":"unknown","versions":[{"version":"0","status":"affected","lessThan":"*","versionType":"custom"}]}],"references":[{"url":"https://cert-portal.siemens.com/productcert/html/ssa-784472.html"}],"providerMetadata":{"shortName":"siemens-SADP","orgId":"0b142b55-0307-4c5a-b3c9-f314f3fb7c5e","dateUpdated":"2026-10-15T01:18:04.567Z"},"x_adpType":"supplier"},{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"id":"CVE-2026-31708","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"version":"2.0.3","timestamp":"2026-10-16T15:12:45.456025Z"}}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-125","lang":"en","type":"CWE","description":"CWE-125 Out-of-bounds Read"}]}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-10-19T19:06:06.825Z"}}]}}}