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:
Thorsten Blum 2026-08-10 22:41:07 +02:00 committed by Ilpo Järvinen
parent 3de2776e9d
commit abca989604
No known key found for this signature in database
GPG Key ID: 59AC4F6153E5CE31

View File

@ -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)