mirror of
https://github.com/torvalds/linux.git
synced 2026-09-22 12:44:03 +02:00
platform/x86: think-lmi: Free system certificate signatures
Multi-certificate support also allows the system authentication object
to store ->signature and ->save_signature, which leak when the driver is
removed. Free the signatures to avoid leaking memory.
Fixes: 5dcb5ef125 ("platform/x86: think-lmi: Multi-certificate support")
Cc: stable@vger.kernel.org
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Reviewed-by: Mark Pearson <mpearson-lenovo@squebb.ca>
Link: https://patch.msgid.link/20260810204106.165895-2-thorsten.blum@linux.dev
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
This commit is contained in:
parent
3de2776e9d
commit
abca989604
|
|
@ -1456,6 +1456,10 @@ static void tlmi_release_attr(void)
|
|||
/* Free up any saved signatures */
|
||||
kfree(tlmi_priv.pwd_admin->signature);
|
||||
kfree(tlmi_priv.pwd_admin->save_signature);
|
||||
if (tlmi_priv.pwd_system) {
|
||||
kfree(tlmi_priv.pwd_system->signature);
|
||||
kfree(tlmi_priv.pwd_system->save_signature);
|
||||
}
|
||||
|
||||
/* Authentication structures */
|
||||
list_for_each_entry_safe(pos, n, &tlmi_priv.authentication_kset->list, entry)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user