ksmbd: Fix refcount leak when invalid session is found on session lookup
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ b95629435b84b9ecc0c765995204a4d8a913ed52 · < cafb57f7bdd57abba87725eb4e82bbdca4959644| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
ksmbd: Fix refcount leak when invalid session is found on session lookup
When a session is found but its state is not SMB2_SESSION_VALID, It indicates that no valid session was found, but it is missing to decrement the reference count acquired by the session lookup, which results in a reference count leak. This patch fixes the issue by explicitly calling ksmbd_user_session_put to release the reference to the session.
From the CVE record · Linux
In the Linux kernel's ksmbd component, a session lookup can leak a reference when it finds a session whose state is not SMB2_SESSION_VALID. The input does not specify how an attacker could trigger this condition or whether network access, authentication, or user interaction is required.
Engineers running Linux kernels with ksmbd should check whether their versions are affected; no affected versions are specified.