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

- Severity: High 7.5 (CVSS:3.1, scored by Linux) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.29%, higher than 22% of CVEs (2026-12-01)
- Published: 2025-10-04T15:44:09.616Z
- Modified: 2026-08-05T09:15:00.757Z
- Weaknesses: CWE-401
- Assigned by: Linux

## 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.

(As written by CVE List.)

## Affected

- Linux Linux: from 8e670f77c4a55013db6d23b962f9bf6673a5e7b6 before df31d05f0678cdd0796ea19983a2b93edca18bb0; from 8e670f77c4a55013db6d23b962f9bf6673a5e7b6 before c55901d381a22300c9922170e59704059f50977b; from 8e670f77c4a55013db6d23b962f9bf6673a5e7b6 before 57d25e9905c71133e201f6d06b56a3403d4ad433; from 8e670f77c4a55013db6d23b962f9bf6673a5e7b6 before 69cba9d3c1284e0838ae408830a02c4a063104bc; fa6d7a5853f93efb088aba36af12cb1944156411; from 5.9.5 before 5.10; 5.10 (not affected: before 5.10; from 5.15.150 up to 5.15.*; from 6.1.42 up to 6.1.*; from 6.4.7 up to 6.4.*; from 6.5 up to *)
- linux linux_kernel: from 5.9.5 before 5.15.150; from 5.16 before 6.1.42; from 6.2 before 6.4.7; 6.5

## Every score

- Linux: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- NVD: CVSS:3.1 5.5 Medium `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`

## References

- <https://git.kernel.org/stable/c/df31d05f0678cdd0796ea19983a2b93edca18bb0> (patch)
- <https://git.kernel.org/stable/c/c55901d381a22300c9922170e59704059f50977b> (patch)
- <https://git.kernel.org/stable/c/57d25e9905c71133e201f6d06b56a3403d4ad433> (patch)
- <https://git.kernel.org/stable/c/69cba9d3c1284e0838ae408830a02c4a063104bc> (patch)

## Sources

- CVE List: [CVE-2023-53597](https://www.cve.org/CVERecord?id=CVE-2023-53597), CVE Terms of Use, modified 2026-08-05
- NVD: [CVE-2023-53597](https://nvd.nist.gov/vuln/detail/CVE-2023-53597), Public domain, modified 2026-08-04

---

Page: https://cve.day/CVE-2023-53597 · Whole record: https://cve.day/CVE-2023-53597.json · Rebuilt by cve.day 2026-11-25T22:58:34.960Z
