{"id":"CVE-2026-31708","aliases":["CVE-2026-31708"],"related":[],"kind":"vulnerability","state":"published","title":"smb: client: fix OOB read in smb2_ioctl_query_info QUERY_INFO path","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta:\n\nsmb: cliente: corregir lectura fuera de límites en la ruta QUERY_INFO de smb2_ioctl_query_info\n\nsmb2_ioctl_query_info() tiene dos ramas de copia de respuesta: PASSTHRU_FSCTL y la ruta QUERY_INFO predeterminada. La rama QUERY_INFO limita qi.input_buffer_length a la OutputBufferLength reportada por el servidor y luego copia qi.input_buffer_length bytes de qi_rsp  ->  Buffer al espacio de usuario, pero nunca verifica que la carga útil del array flexible realmente quepa dentro de rsp_iov[1].iov_len.\n\nUn servidor malicioso puede devolver una OutputBufferLength mayor que la respuesta QUERY_INFO real, haciendo que copy_to_user() se desplace más allá del búfer de respuesta y exponga el heap adyacente del kernel al espacio de usuario.\n\nProteger la copia QUERY_INFO con una comprobación de límites en la carga útil real del Buffer. Usar struct_size(qi_rsp, Buffer, qi.input_buffer_length) en lugar de una adición codificada abiertamente para que la protección no pueda desbordarse en compilaciones de 32 bits.","source":"nvd"}],"published":"2026-05-01T13:56:05.880Z","modified":"2026-11-11T21:10:00.200Z","severity":{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:H","score":8.1,"rating":"HIGH"},"severities":[{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:H","score":8.1,"rating":"HIGH"}],"cwes":["CWE-125"],"affected":[{"ranges":[{"type":"git","introduced":"f5778c398713692a16150ae96e5c8270bab8399f","fixed":"e66bdc0704977ecee667a81d38255b579c2353d0","status":"affected"},{"type":"git","introduced":"f5778c398713692a16150ae96e5c8270bab8399f","fixed":"9e203dbb5402897c43130fb171a2617008a91f45","status":"affected"},{"type":"git","introduced":"f5778c398713692a16150ae96e5c8270bab8399f","fixed":"1dd757379997b71a328a4b591ffaf481acd0ead1","status":"affected"},{"type":"git","introduced":"f5778c398713692a16150ae96e5c8270bab8399f","fixed":"a34d456934fe42e4da5d2cc07787bf418bee99c6","status":"affected"},{"type":"git","introduced":"f5778c398713692a16150ae96e5c8270bab8399f","fixed":"ac2f14e4705d020f04e806efa0d49ab8dc2b145f","status":"affected"},{"type":"git","introduced":"f5778c398713692a16150ae96e5c8270bab8399f","fixed":"078fae8f50adebb903ccf2252b44391324571e78","status":"affected"},{"type":"git","introduced":"f5778c398713692a16150ae96e5c8270bab8399f","fixed":"85fd46ee26a11841c670449508025965f61ce131","status":"affected"},{"type":"git","introduced":"f5778c398713692a16150ae96e5c8270bab8399f","fixed":"a58c5af19ff0d6f44f6e9fe31e33a2c92223f77e","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"5.1","status":"affected"},{"type":"semver","introduced":"0","fixed":"5.1","status":"unaffected"},{"type":"semver","introduced":"5.10.259","lastAffected":"5.10.*","status":"unaffected"},{"type":"semver","introduced":"5.15.210","lastAffected":"5.15.*","status":"unaffected"},{"type":"semver","introduced":"6.1.175","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.6.136","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.12.84","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.18.25","lastAffected":"6.18.*","status":"unaffected"},{"type":"semver","introduced":"7.0.2","lastAffected":"7.0.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"7.1","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"5.1","fixed":"6.6.136"},{"status":"affected","introduced":"6.7","fixed":"6.12.84"},{"status":"affected","introduced":"6.13","fixed":"6.18.25"},{"status":"affected","introduced":"6.19","fixed":"7.0.2"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/e66bdc0704977ecee667a81d38255b579c2353d0","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/9e203dbb5402897c43130fb171a2617008a91f45","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/1dd757379997b71a328a4b591ffaf481acd0ead1","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/a34d456934fe42e4da5d2cc07787bf418bee99c6","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/ac2f14e4705d020f04e806efa0d49ab8dc2b145f","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/078fae8f50adebb903ccf2252b44391324571e78","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/85fd46ee26a11841c670449508025965f61ce131","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/a58c5af19ff0d6f44f6e9fe31e33a2c92223f77e","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-784472.html","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-10-16T15:12:45.456Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-31708","url":"https://www.cve.org/CVERecord?id=CVE-2026-31708","licence":"CVE Terms of Use","modified":"2026-10-19T19:06:06.825Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-31708","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-31708","licence":"Public domain","modified":"2026-11-11T21:10:00.200Z"}],"updatedAt":"2026-11-25T22:59:20.342Z","epss":{"score":0.00358,"percentile":0.31599,"date":"2026-12-01T12:00:22.000Z"}}