smb/server: fix tree connection leak in smb2_tree_connect()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
smb/server: fix tree connection leak in smb2_tree_connect()
See the procedure below:
smb2_tree_connect ksmbd_tree_conn_connect xa_store(&sess->tree_conns, tree_conn->id, tree_conn) ksmbd_counter_inc(KSMBD_COUNTER_TREE_CONNS) ksmbd_share_tree_conn_inc(sc) ksmbd_iov_pin_rsp // fail status.ret = KSMBD_TREE_CONN_STATUS_NOMEM // do not disconnect tree_conn
Disconnect the new tree connection if ksmbd_iov_pin_rsp() fails.
From the CVE record · Linux
The Linux kernel SMB server can leak a tree connection when response pinning fails during smb2_tree_connect(). A remote client may cause a resource leak under that failure condition; the input does not specify authentication requirements or user interaction.
Engineers running the Linux kernel SMB server should check their deployments; affected versions are not specified.