| Submitter | Herton Ronaldo Krzesinski |
|---|---|
| Date | Feb. 15, 2013, 3:11 a.m. |
| Message ID | <1360897885-16086-1-git-send-email-herton.krzesinski@canonical.com> |
| Download | mbox | patch |
| Permalink | /patch/220606/ |
| State | New |
| Headers | show |
Comments
Patch
diff --git a/net/sctp/socket.c b/net/sctp/socket.c index 944cfce..957bb6e 100644 --- a/net/sctp/socket.c +++ b/net/sctp/socket.c @@ -3375,7 +3375,7 @@ static int sctp_setsockopt_auth_key(struct sock *sk, ret = sctp_auth_set_key(sctp_sk(sk)->ep, asoc, authkey); out: - kfree(authkey); + kzfree(authkey); return ret; }
This is a note to let you know that I have just added a patch titled net: sctp: sctp_setsockopt_auth_key: use kzfree instead of to the linux-3.5.y-queue branch of the 3.5.y.z extended stable tree which can be found at: http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/heads/linux-3.5.y-queue If you, or anyone else, feels it should not be added to this tree, please reply to this email. For more information about the 3.5.y.z tree, see https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable Thanks. -Herton ------ From 8d1c0152028e2eb8f1434d8471ada07d4bbd68c3 Mon Sep 17 00:00:00 2001 From: Daniel Borkmann <dborkman@redhat.com> Date: Fri, 8 Feb 2013 03:04:34 +0000 Subject: [PATCH] net: sctp: sctp_setsockopt_auth_key: use kzfree instead of kfree commit 6ba542a291a5e558603ac51cda9bded347ce7627 upstream. In sctp_setsockopt_auth_key, we create a temporary copy of the user passed shared auth key for the endpoint or association and after internal setup, we free it right away. Since it's sensitive data, we should zero out the key before returning the memory back to the allocator. Thus, use kzfree instead of kfree, just as we do in sctp_auth_key_put(). Signed-off-by: Daniel Borkmann <dborkman@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Herton Ronaldo Krzesinski <herton.krzesinski@canonical.com> --- net/sctp/socket.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 1.7.9.5