CVE-2026-90125: smb: client: fix request buffer leak in smb2_new_read_req()

Published Sep 17, 2026
·
Updated

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

smb: client: fix request buffer leak in smb2newreadreq()

smb2newreadreq() allocates the request buffer with smb2plainreqinit() but only publishes it to the caller with buf = req at the very end of the function. Two error returns sit in between:

rc = smb2plainreqinit(SMB2READ, ioparms->tcon, server, (void ) &req, totallen); if (rc) return rc;

if (server == NULL) return -ECONNABORTED; [...] rdata->mr = smbdregistermr(server->smbdconn, &rdata->subreq.ioiter, true, needinvalidate); if (!rdata->mr) return -EAGAIN;

On either of them the buffer is neither released nor handed back, so it is leaked. The caller cannot clean up after it: smb2asyncreadv() does 'goto out' on a non-zero return, which skips the cifssmallbufrelease(buf) at asyncreadvout, and buf has not been assigned at that point in any case.

The write path has never had this problem. smb2asyncwritev() registers the memory region inline and jumps to its release label instead of returning:

wdata->mr = smbdregistermr(...); if (!wdata->mr) { rc = -EAGAIN; goto asyncwritevout; }

Commit b7972092199f ("cifs: smbd: Retry on memory registration failure") changed both sides from -ENOBUFS to -EAGAIN in a single patch, which puts the two shapes next to each other.

Only the -EAGAIN return is reachable in practice, because smb2plainreqinit() calls smb2reconnect() first and that already fails with -EIO when server is NULL, before anything is allocated. Both returns are given the same treatment here rather than leaving one of them correct only by accident.

Because -EAGAIN is a replayable error, the failure also reaches the retry block at the end of smb2asyncreadv(), which marks the subrequest NETFSSREQNEEDRETRY, so a failing registration can be retried rather than ending the I/O, and every attempt that reaches it leaks another buffer. smb2shouldreplay() short-circuits on tcon->retry, so on a hard mount the attempt count is not bounded by the retrans setting.

Only the asynchronous read path is affected. The synchronous SMB2read() caller passes rdata == NULL and the memory registration block is guarded on rdata.

The memory registration failure path was pointed out by the Sashiko AI reviewer while it was reviewing an unrelated patch to smb2asyncreadv().

Affected Software

1 affected component
Linux Kernel

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade Linux kernel to a version that resolves this vulnerability.

    Patch b7972092199f

Event History

Sep 17, 2026
CVE Published
via MITRE·04:06 PM
Data Sourced
via MITRE·04:06 PM
Description

Frequently Asked Questions

1

Which systems are exposed to this leak?

The affected path is the Linux kernel SMB client asynchronous read path. Exposure requires execution of smb2_new_read_req() and an error after the request buffer has been allocated but before it is returned to the caller.

2

What conditions trigger the leaked allocation?

The leak occurs if the server pointer is NULL after request initialization, causing an ECONNABORTED return, or if SMB Direct memory-region registration fails, causing an EAGAIN return. In both cases the allocated request buffer is neither released nor passed to the caller.

3

Is the SMB client write path affected in the same way?

No. The description states that the write path does not have this problem because it jumps to its release path when memory-region registration fails rather than returning directly.

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