From: Vlad Yasevich <vyasevich@gmail.com>
To: Daniel Borkmann <dborkman@redhat.com>
Cc: davem@davemloft.net, netdev@vger.kernel.org, linux-sctp@vger.kernel.org
Subject: Re: [PATCH net 2/2] net: sctp: sctp_auth_key_put: use kzfree instead of kfree
Date: Thu, 07 Feb 2013 10:05:46 -0500 [thread overview]
Message-ID: <5113C2CA.6080102@gmail.com> (raw)
In-Reply-To: <8c764d916f21d56402a5b9a915ea31d927898da0.1360231701.git.dborkman@redhat.com>
On 02/07/2013 05:55 AM, Daniel Borkmann wrote:
> 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: Vlad Yasevich <vyasevich@gmail.com>
-vlad
> ---
> 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 55f1b06..69fcd6d 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);
> }
> }
>
next prev parent reply other threads:[~2013-02-07 15:05 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-07 10:55 [PATCH net 0/2] fixes for net/sctp/auth.c Daniel Borkmann
2013-02-07 10:55 ` [PATCH net 1/2] net: sctp: sctp_auth_make_key_vector: fix undefined ref-count behaviour Daniel Borkmann
2013-02-07 15:04 ` Vlad Yasevich
2013-02-07 15:24 ` Daniel Borkmann
2013-02-07 15:45 ` Vlad Yasevich
2013-02-07 10:55 ` [PATCH net 2/2] net: sctp: sctp_auth_key_put: use kzfree instead of kfree Daniel Borkmann
2013-02-07 15:05 ` Vlad Yasevich [this message]
2013-02-08 4:45 ` David Miller
2013-02-07 14:52 ` [PATCH net 0/2] fixes for net/sctp/auth.c Neil Horman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5113C2CA.6080102@gmail.com \
--to=vyasevich@gmail.com \
--cc=davem@davemloft.net \
--cc=dborkman@redhat.com \
--cc=linux-sctp@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).