mirror of
https://github.com/torvalds/linux.git
synced 2026-06-09 23:23:53 +02:00
net: sctp: sctp_auth_key_put: use kzfree instead of kfree
[ Upstream commit 586c31f3bf ]
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>
This commit is contained in:
parent
d768ca1b9f
commit
a009d58e52
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user