Linux kernel use-after-free in ksmbd session channels
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
7.3.27.4-rc1In the Linux kernel, the following vulnerability has been resolved:
ksmbd: hold a connection reference for each session channel
ksmbd_session_unregister() removes a session from the global and per- connection tables before dropping the table reference. A concurrent reference holder can keep the session and its channel list alive after those removals.
Connection cleanup can no longer find the unpublished session to remove its channels. Since a channel only stores a raw conn pointer, the connection can be freed while another session reference holder is still accessing it, for example during SMB3.1.1 binding or a procfs read.
Take a connection reference when registering a channel and release it on insertion failure, channel removal, or final session destruction. Keep the channels and signing keys until the session is destroyed so a response can still be signed after the session has been unregistered.
From the CVE record · Linux
In the Linux kernel's ksmbd component, a session channel can retain a pointer to a connection after that connection is freed. A concurrent session reference holder may access the freed connection during SMB3.1.1 binding or a procfs read. The input does not specify authentication requirements or whether user interaction is needed.
Engineers running the Linux kernel with ksmbd should check their deployments; affected versions are not specified.