{"api_version":"1","generated_at":"2026-09-18T22:58:22+00:00","cve":"CVE-2026-90125","urls":{"html":"https://cve.report/CVE-2026-90125","api":"https://cve.report/api/cve/CVE-2026-90125.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2026-90125","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-90125"},"summary":{"title":"smb: client: fix request buffer leak in smb2_new_read_req()","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nsmb: client: fix request buffer leak in smb2_new_read_req()\n\nsmb2_new_read_req() allocates the request buffer with\nsmb2_plain_req_init() but only publishes it to the caller with\n*buf = req at the very end of the function. Two error returns sit in\nbetween:\n\n\trc = smb2_plain_req_init(SMB2_READ, io_parms->tcon, server,\n\t\t\t\t (void **) &req, total_len);\n\tif (rc)\n\t\treturn rc;\n\n\tif (server == NULL)\n\t\treturn -ECONNABORTED;\n\t[...]\n\t\trdata->mr = smbd_register_mr(server->smbd_conn,\n\t\t\t\t\t     &rdata->subreq.io_iter,\n\t\t\t\t\t     true, need_invalidate);\n\t\tif (!rdata->mr)\n\t\t\treturn -EAGAIN;\n\nOn either of them the buffer is neither released nor handed back, so\nit is leaked. The caller cannot clean up after it: smb2_async_readv()\ndoes 'goto out' on a non-zero return, which skips the\ncifs_small_buf_release(buf) at async_readv_out, and buf has not been\nassigned at that point in any case.\n\nThe write path has never had this problem. smb2_async_writev()\nregisters the memory region inline and jumps to its release label\ninstead of returning:\n\n\twdata->mr = smbd_register_mr(...);\n\tif (!wdata->mr) {\n\t\trc = -EAGAIN;\n\t\tgoto async_writev_out;\n\t}\n\nCommit b7972092199f (\"cifs: smbd: Retry on memory registration\nfailure\") changed both sides from -ENOBUFS to -EAGAIN in a single\npatch, which puts the two shapes next to each other.\n\nOnly the -EAGAIN return is reachable in practice, because\nsmb2_plain_req_init() calls smb2_reconnect() first and that already\nfails with -EIO when server is NULL, before anything is allocated.\nBoth returns are given the same treatment here rather than leaving\none of them correct only by accident.\n\nBecause -EAGAIN is a replayable error, the failure also reaches the\nretry block at the end of smb2_async_readv(), which marks the\nsubrequest NETFS_SREQ_NEED_RETRY, so a failing registration can be\nretried rather than ending the I/O, and every attempt that reaches it\nleaks another buffer. smb2_should_replay() short-circuits on\ntcon->retry, so on a hard mount the attempt count is not bounded by\nthe retrans setting.\n\nOnly the asynchronous read path is affected. The synchronous\nSMB2_read() caller passes rdata == NULL and the memory registration\nblock is guarded on rdata.\n\nThe memory registration failure path was pointed out by the Sashiko\nAI reviewer while it was reviewing an unrelated patch to\nsmb2_async_readv().","state":"PUBLISHED","assigner":"Linux","published_at":"2026-09-17 17:17:04","updated_at":"2026-09-17 17:17:04"},"problem_types":[],"metrics":[],"references":[{"url":"https://git.kernel.org/stable/c/deb6468f4164640e4dc875f008aa449cf55987a5","name":"https://git.kernel.org/stable/c/deb6468f4164640e4dc875f008aa449cf55987a5","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/12092ed28434bf41e08d41e3c5269eb6b337fc02","name":"https://git.kernel.org/stable/c/12092ed28434bf41e08d41e3c5269eb6b337fc02","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/58066940076b90c16e821fd6f9767cd979cbdb5e","name":"https://git.kernel.org/stable/c/58066940076b90c16e821fd6f9767cd979cbdb5e","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/442c5f1358ced0d4e716778ac06f1e323a7e4f21","name":"https://git.kernel.org/stable/c/442c5f1358ced0d4e716778ac06f1e323a7e4f21","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/73f6bdb0380486ab37fe12cd74de20abfaf5d3ae","name":"https://git.kernel.org/stable/c/73f6bdb0380486ab37fe12cd74de20abfaf5d3ae","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-90125","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-90125","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected bd3dcc6a22a9186ed78da51ce09e889803552189 58066940076b90c16e821fd6f9767cd979cbdb5e git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected bd3dcc6a22a9186ed78da51ce09e889803552189 12092ed28434bf41e08d41e3c5269eb6b337fc02 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected bd3dcc6a22a9186ed78da51ce09e889803552189 442c5f1358ced0d4e716778ac06f1e323a7e4f21 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected bd3dcc6a22a9186ed78da51ce09e889803552189 73f6bdb0380486ab37fe12cd74de20abfaf5d3ae git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected bd3dcc6a22a9186ed78da51ce09e889803552189 deb6468f4164640e4dc875f008aa449cf55987a5 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 4.16","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 4.16 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.6.157 6.6.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.12.110 6.12.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.18.52 6.18.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.2.6 7.2.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.3-rc1 * original_commit_for_fix","platforms":[]}],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[],"vendor_comments":[],"enrichments":{"kev":null,"epss":null,"legacy_qids":[]},"source_records":{"cve_program":{"containers":{"cna":{"affected":[{"defaultStatus":"unaffected","product":"Linux","programFiles":["fs/smb/client/smb2pdu.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"lessThan":"58066940076b90c16e821fd6f9767cd979cbdb5e","status":"affected","version":"bd3dcc6a22a9186ed78da51ce09e889803552189","versionType":"git"},{"lessThan":"12092ed28434bf41e08d41e3c5269eb6b337fc02","status":"affected","version":"bd3dcc6a22a9186ed78da51ce09e889803552189","versionType":"git"},{"lessThan":"442c5f1358ced0d4e716778ac06f1e323a7e4f21","status":"affected","version":"bd3dcc6a22a9186ed78da51ce09e889803552189","versionType":"git"},{"lessThan":"73f6bdb0380486ab37fe12cd74de20abfaf5d3ae","status":"affected","version":"bd3dcc6a22a9186ed78da51ce09e889803552189","versionType":"git"},{"lessThan":"deb6468f4164640e4dc875f008aa449cf55987a5","status":"affected","version":"bd3dcc6a22a9186ed78da51ce09e889803552189","versionType":"git"}]},{"defaultStatus":"affected","product":"Linux","programFiles":["fs/smb/client/smb2pdu.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"status":"affected","version":"4.16"},{"lessThan":"4.16","status":"unaffected","version":"0","versionType":"semver"},{"lessThanOrEqual":"6.6.*","status":"unaffected","version":"6.6.157","versionType":"semver"},{"lessThanOrEqual":"6.12.*","status":"unaffected","version":"6.12.110","versionType":"semver"},{"lessThanOrEqual":"6.18.*","status":"unaffected","version":"6.18.52","versionType":"semver"},{"lessThanOrEqual":"7.2.*","status":"unaffected","version":"7.2.6","versionType":"semver"},{"lessThanOrEqual":"*","status":"unaffected","version":"7.3-rc1","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"cpeMatch":[{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.6.157","versionStartIncluding":"4.16","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.12.110","versionStartIncluding":"4.16","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.18.52","versionStartIncluding":"4.16","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.2.6","versionStartIncluding":"4.16","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.3-rc1","versionStartIncluding":"4.16","vulnerable":true}],"negate":false,"operator":"OR"}]}],"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nsmb: client: fix request buffer leak in smb2_new_read_req()\n\nsmb2_new_read_req() allocates the request buffer with\nsmb2_plain_req_init() but only publishes it to the caller with\n*buf = req at the very end of the function. Two error returns sit in\nbetween:\n\n\trc = smb2_plain_req_init(SMB2_READ, io_parms->tcon, server,\n\t\t\t\t (void **) &req, total_len);\n\tif (rc)\n\t\treturn rc;\n\n\tif (server == NULL)\n\t\treturn -ECONNABORTED;\n\t[...]\n\t\trdata->mr = smbd_register_mr(server->smbd_conn,\n\t\t\t\t\t     &rdata->subreq.io_iter,\n\t\t\t\t\t     true, need_invalidate);\n\t\tif (!rdata->mr)\n\t\t\treturn -EAGAIN;\n\nOn either of them the buffer is neither released nor handed back, so\nit is leaked. The caller cannot clean up after it: smb2_async_readv()\ndoes 'goto out' on a non-zero return, which skips the\ncifs_small_buf_release(buf) at async_readv_out, and buf has not been\nassigned at that point in any case.\n\nThe write path has never had this problem. smb2_async_writev()\nregisters the memory region inline and jumps to its release label\ninstead of returning:\n\n\twdata->mr = smbd_register_mr(...);\n\tif (!wdata->mr) {\n\t\trc = -EAGAIN;\n\t\tgoto async_writev_out;\n\t}\n\nCommit b7972092199f (\"cifs: smbd: Retry on memory registration\nfailure\") changed both sides from -ENOBUFS to -EAGAIN in a single\npatch, which puts the two shapes next to each other.\n\nOnly the -EAGAIN return is reachable in practice, because\nsmb2_plain_req_init() calls smb2_reconnect() first and that already\nfails with -EIO when server is NULL, before anything is allocated.\nBoth returns are given the same treatment here rather than leaving\none of them correct only by accident.\n\nBecause -EAGAIN is a replayable error, the failure also reaches the\nretry block at the end of smb2_async_readv(), which marks the\nsubrequest NETFS_SREQ_NEED_RETRY, so a failing registration can be\nretried rather than ending the I/O, and every attempt that reaches it\nleaks another buffer. smb2_should_replay() short-circuits on\ntcon->retry, so on a hard mount the attempt count is not bounded by\nthe retrans setting.\n\nOnly the asynchronous read path is affected. The synchronous\nSMB2_read() caller passes rdata == NULL and the memory registration\nblock is guarded on rdata.\n\nThe memory registration failure path was pointed out by the Sashiko\nAI reviewer while it was reviewing an unrelated patch to\nsmb2_async_readv()."}],"providerMetadata":{"dateUpdated":"2026-09-17T16:06:27.924Z","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux"},"references":[{"url":"https://git.kernel.org/stable/c/58066940076b90c16e821fd6f9767cd979cbdb5e"},{"url":"https://git.kernel.org/stable/c/12092ed28434bf41e08d41e3c5269eb6b337fc02"},{"url":"https://git.kernel.org/stable/c/442c5f1358ced0d4e716778ac06f1e323a7e4f21"},{"url":"https://git.kernel.org/stable/c/73f6bdb0380486ab37fe12cd74de20abfaf5d3ae"},{"url":"https://git.kernel.org/stable/c/deb6468f4164640e4dc875f008aa449cf55987a5"}],"title":"smb: client: fix request buffer leak in smb2_new_read_req()","x_generator":{"engine":"bippy-1.2.0"}}},"cveMetadata":{"assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","assignerShortName":"Linux","cveId":"CVE-2026-90125","datePublished":"2026-09-17T16:06:27.924Z","dateReserved":"2026-09-11T19:38:34.788Z","dateUpdated":"2026-09-17T16:06:27.924Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.2"},"nvd":{"publishedDate":"2026-09-17 17:17:04","lastModifiedDate":"2026-09-17 17:17:04","problem_types":[],"metrics":[],"configurations":[]},"legacy_mitre":{"record":{"CveYear":"2026","CveId":"90125","Ordinal":"1","Title":"smb: client: fix request buffer leak in smb2_new_read_req()","CVE":"CVE-2026-90125","Year":"2026"},"notes":[{"CveYear":"2026","CveId":"90125","Ordinal":"1","NoteData":"In the Linux kernel, the following vulnerability has been resolved:\n\nsmb: client: fix request buffer leak in smb2_new_read_req()\n\nsmb2_new_read_req() allocates the request buffer with\nsmb2_plain_req_init() but only publishes it to the caller with\n*buf = req at the very end of the function. Two error returns sit in\nbetween:\n\n\trc = smb2_plain_req_init(SMB2_READ, io_parms->tcon, server,\n\t\t\t\t (void **) &req, total_len);\n\tif (rc)\n\t\treturn rc;\n\n\tif (server == NULL)\n\t\treturn -ECONNABORTED;\n\t[...]\n\t\trdata->mr = smbd_register_mr(server->smbd_conn,\n\t\t\t\t\t     &rdata->subreq.io_iter,\n\t\t\t\t\t     true, need_invalidate);\n\t\tif (!rdata->mr)\n\t\t\treturn -EAGAIN;\n\nOn either of them the buffer is neither released nor handed back, so\nit is leaked. The caller cannot clean up after it: smb2_async_readv()\ndoes 'goto out' on a non-zero return, which skips the\ncifs_small_buf_release(buf) at async_readv_out, and buf has not been\nassigned at that point in any case.\n\nThe write path has never had this problem. smb2_async_writev()\nregisters the memory region inline and jumps to its release label\ninstead of returning:\n\n\twdata->mr = smbd_register_mr(...);\n\tif (!wdata->mr) {\n\t\trc = -EAGAIN;\n\t\tgoto async_writev_out;\n\t}\n\nCommit b7972092199f (\"cifs: smbd: Retry on memory registration\nfailure\") changed both sides from -ENOBUFS to -EAGAIN in a single\npatch, which puts the two shapes next to each other.\n\nOnly the -EAGAIN return is reachable in practice, because\nsmb2_plain_req_init() calls smb2_reconnect() first and that already\nfails with -EIO when server is NULL, before anything is allocated.\nBoth returns are given the same treatment here rather than leaving\none of them correct only by accident.\n\nBecause -EAGAIN is a replayable error, the failure also reaches the\nretry block at the end of smb2_async_readv(), which marks the\nsubrequest NETFS_SREQ_NEED_RETRY, so a failing registration can be\nretried rather than ending the I/O, and every attempt that reaches it\nleaks another buffer. smb2_should_replay() short-circuits on\ntcon->retry, so on a hard mount the attempt count is not bounded by\nthe retrans setting.\n\nOnly the asynchronous read path is affected. The synchronous\nSMB2_read() caller passes rdata == NULL and the memory registration\nblock is guarded on rdata.\n\nThe memory registration failure path was pointed out by the Sashiko\nAI reviewer while it was reviewing an unrelated patch to\nsmb2_async_readv().","Type":"Description","Title":"smb: client: fix request buffer leak in smb2_new_read_req()"}]}}}