The PLPKS signed update operation uses an authentication buffer that
contains a password. Freeing this buffer with kfree(), without wiping
the contents, can leave sensitive data in memory.
Use kfree_sensitive() to wipe the buffer when freeing it.
Fixes: 899d9b8fee66 ("powerpc/pseries: Implement signed update for PLPKS
objects")
Cc: [email protected] # 6.3
Signed-off-by: Srish Srinivasan <[email protected]>
Reviewed-by: Nayna Jain <[email protected]>
Tested-by: R Nageswara Sastry <[email protected]>
---
arch/powerpc/platforms/pseries/plpks.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/powerpc/platforms/pseries/plpks.c
b/arch/powerpc/platforms/pseries/plpks.c
index 17a73a04d45b..b057e378a6b3 100644
--- a/arch/powerpc/platforms/pseries/plpks.c
+++ b/arch/powerpc/platforms/pseries/plpks.c
@@ -685,7 +685,7 @@ int plpks_signed_update_var(struct plpks_var *var, u64
flags)
kfree(label);
out:
- kfree(auth);
+ kfree_sensitive(auth);
return rc;
}
--
2.52.0