Messages in this thread Patch in this message | | | Date | Tue, 04 Jun 2013 19:24:16 +0200 | From | Willy Tarreau <> | Subject | [ 166/184] net: sctp: sctp_auth_key_put: use kzfree instead of |
| |
2.6.32-longterm review patch. If anyone has any objections, please let me know.
------------------ kfree
From: Daniel Borkmann <dborkman@redhat.com>
[ 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: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Willy Tarreau <w@1wt.eu> --- net/sctp/auth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/sctp/auth.c b/net/sctp/auth.c index 914c419..7363b9f 100644 --- a/net/sctp/auth.c +++ b/net/sctp/auth.c @@ -70,7 +70,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); } } -- 1.7.12.2.21.g234cd45.dirty
| |