nvmet-auth: assign dh_key to NULL after kfree_sensitive
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 |
|
|
In the Linux kernel, the following vulnerability has been resolved:
nvmet-auth: assign dh_key to NULL after kfree_sensitive
ctrl->dh_key might be used across multiple calls to nvmet_setup_dhgroup() for the same controller. So it's better to nullify it after release on error path in order to avoid double free later in nvmet_destroy_auth().
Found by Linux Verification Center (linuxtesting.org) with Svace.
From the CVE record · Linux
In the Linux kernel's nvmet-auth component, a controller's dh_key can be freed on an error path and then freed again during authentication cleanup. The input does not specify how an attacker could trigger this condition or whether access or user interaction is required.
Engineers running Linux kernels with nvmet-auth should check their kernel versions; affected versions are not specified.