CVE-2023-53597 cifs: fix mid leak during reconnection after timeout threshold

High 7.5 Published Updated

A memory leak in the Linux kernel CIFS module during reconnection after timeouts can lead to resource exhaustion and denial of service.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2023-53597?

CVE-2023-53597 is a high-severity denial of service vulnerability in Linux kernel, published on 4 Oct 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

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

cifs: fix mid leak during reconnection after timeout threshold

When the number of responses with status of STATUS_IO_TIMEOUT exceeds a specified threshold (NUM_STATUS_IO_TIMEOUT), we reconnect the connection. But we do not return the mid, or the credits returned for the mid, or reduce the number of in-flight requests.

This bug could result in the server->in_flight count to go bad, and also cause a leak in the mids.

This change moves the check to a few lines below where the response is decrypted, even of the response is read from the transform header. This way, the code for returning the mids can be reused.

Also, the cifs_reconnect was reconnecting just the transport connection before. In case of multi-channel, this may not be what we want to do after several timeouts. Changed that to reconnect the session and the tree too.

Also renamed NUM_STATUS_IO_TIMEOUT to a more appropriate name MAX_STATUS_IO_TIMEOUT.

Weakness: CWE-401

Which versions are affected by CVE-2023-53597?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2023-53597?

Apply the vendor's patch.

Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.

Is CVE-2023-53597 being exploited?

There is no known exploitation of CVE-2023-53597 in the wild and no public exploit code.

All Linux kernel vulnerabilities

Sources

Also known as BELL-CVE-2023-53597, DEBIAN-CVE-2023-53597, GHSA-g6xj-m5qj-cqp6, ROOT-OS-DEBIAN-11-CVE-2023-53597, UBUNTU-CVE-2023-53597.

Is CVE-2023-53597 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free