smb: client: fix smbd_connection leak on cifs_get_tcp_session() error
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 2f8946464b11822169b9f10c7cf58a2440b51d54 · < 928edc4bd6a617caabeb575fc13c254d9df623c4| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
smb: client: fix smbd_connection leak on cifs_get_tcp_session() error
When an RDMA connection is successfully established via smbd_get_connection() but cifs_get_tcp_session() later fails (e.g. kthread_create() returns an error), the error path frees tcp_ses without first destroying the smbd_connection.
Fix this by calling smbd_destroy() in the out_err cleanup path before kfree(tcp_ses). smbd_destroy() safely handles the case where smbd_conn is NULL, so it can be called unconditionally.
From the CVE record · Linux
The Linux kernel SMB client can leak an RDMA connection if session setup fails after the connection is established. The input does not establish whether an attacker can trigger this failure, or specify network access, authentication, or user-interaction requirements.
Engineers running Linux kernels with the SMB client should check their kernel vendor’s advisory for affected versions; none are listed here.