ksmbd: fix null pointer dereference in destroy_previous_session
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
ksmbd: fix null pointer dereference in destroy_previous_session
If client set ->PreviousSessionId on kerberos session setup stage, NULL pointer dereference error will happen. Since sess->user is not set yet, It can pass the user argument as NULL to destroy_previous_session. sess->user will be set in ksmbd_krb5_authenticate(). So this patch move calling destroy_previous_session() after ksmbd_krb5_authenticate().
From the CVE record · Linux
The Linux kernel's ksmbd can dereference a null pointer when a client sets PreviousSessionId during Kerberos session setup, before the session user is set. This can cause an error during session setup; the input does not specify whether authentication is required or describe any further impact.
Engineers running the Linux kernel with ksmbd should check their kernel version against the vendor advisory; affected versions are not specified.