cifs: Fix server use-after-free in cifs_chan_skip_or_disable()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
d61ba1d71ea6039eca7ada870bf3f0c3c8fc12e4| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
cifs: Fix server use-after-free in cifs_chan_skip_or_disable()
When a secondary channel is no longer supported by the server, cifs_chan_skip_or_disable() drops the channel reference with cifs_put_tcp_session() and then continues to use the server pointer by calling cifs_signal_cifsd_for_reconnect() on it and reading its primary_server pointer. cifs_put_tcp_session() can drop the last reference of the channel and tear it down, so both the channel and the primary server (whose reference is also dropped by cifs_put_tcp_session()) can be freed before they are signaled for reconnect.
Signal the channel and the primary server and capture the primary server pointer before dropping the channel reference with cifs_put_tcp_session().
From the CVE record · Linux
The Linux kernel’s CIFS channel handling can use freed server pointers when a server no longer supports a secondary channel. This can cause a use-after-free; the input does not specify how an attacker could trigger it or whether authentication or user interaction is required.
Engineers running Linux kernels with CIFS support should check their versions; affected versions are not specified.