diff options
author | Daniel Borkmann <dborkman@redhat.com> | 2013-02-07 00:55:37 +0000 |
---|---|---|
committer | Ben Hutchings <ben@decadent.org.uk> | 2013-05-13 15:02:38 +0100 |
commit | 9f5c2767c8c12861bafc76e1f33435af3f92f40f (patch) | |
tree | 4a1e6deecf374b8eac07fad253f3b7f18414728f | |
parent | 3932af2c9a664a2550debd923b3c6d050aed1bc4 (diff) | |
download | lwn-9f5c2767c8c12861bafc76e1f33435af3f92f40f.tar.gz lwn-9f5c2767c8c12861bafc76e1f33435af3f92f40f.zip |
net: sctp: sctp_auth_key_put: use kzfree instead of kfree
[ Upstream commit 586c31f3bf04c290dc0a0de7fc91d20aa9a5ee53 ]
For sensitive data like keying material, it is common practice to zero
out keys before returning the memory back to the allocator. Thus, use
kzfree instead of kfree.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Vlad Yasevich <vyasevich@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
-rw-r--r-- | net/sctp/auth.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/sctp/auth.c b/net/sctp/auth.c index bf812048cf6f..333926d4d356 100644 --- a/net/sctp/auth.c +++ b/net/sctp/auth.c @@ -71,7 +71,7 @@ void sctp_auth_key_put(struct sctp_auth_bytes *key) return; if (atomic_dec_and_test(&key->refcnt)) { - kfree(key); + kzfree(key); SCTP_DBG_OBJCNT_DEC(keys); } } |