summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorDaniel Borkmann <dborkman@redhat.com>2013-02-07 00:55:37 +0000
committerPaul Gortmaker <paul.gortmaker@windriver.com>2014-02-10 16:10:50 -0500
commitc9ea1069d2243c74c812dc91a3f87903823dcc65 (patch)
treee8b3e64092d1bf3f047e5dcf49363a9f2ab807df /net
parent5eb0345a28351e4e2b785e57f2552bf7c497625a (diff)
net: sctp: sctp_auth_key_put: use kzfree instead of kfree
commit 586c31f3bf04c290dc0a0de7fc91d20aa9a5ee53 upstream. 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: Paul Gortmaker <paul.gortmaker@windriver.com>
Diffstat (limited to 'net')
-rw-r--r--net/sctp/auth.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/sctp/auth.c b/net/sctp/auth.c
index ddbbf7c81fa1..ce9ef56708ac 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);
}
}