Commit 75aa0a7c authored by Alex Cope's avatar Alex Cope Committed by Herbert Xu

crypto: gf128mul - Zero memory when freeing multiplication table

GF(2^128) multiplication tables are typically used for secret
information, so it's a good idea to zero them on free.
Signed-off-by: default avatarAlex Cope <alexcope@google.com>
Signed-off-by: default avatarEric Biggers <ebiggers@google.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent b516b88a
......@@ -310,8 +310,8 @@ void gf128mul_free_64k(struct gf128mul_64k *t)
int i;
for (i = 0; i < 16; i++)
kfree(t->t[i]);
kfree(t);
kzfree(t->t[i]);
kzfree(t);
}
EXPORT_SYMBOL(gf128mul_free_64k);
......
......@@ -177,7 +177,7 @@ void gf128mul_4k_bbe(be128 *a, struct gf128mul_4k *t);
static inline void gf128mul_free_4k(struct gf128mul_4k *t)
{
kfree(t);
kzfree(t);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment