lkml.org 
[lkml]   [2013]   [Apr]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[ 14/30] net: sctp: sctp_auth_key_put: use kzfree instead of kfree
    Date
    3.0-stable review patch.  If anyone has any objections, please let me know.

    ------------------


    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>
    ---
    net/sctp/auth.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    --- a/net/sctp/auth.c
    +++ b/net/sctp/auth.c
    @@ -71,7 +71,7 @@ void sctp_auth_key_put(struct sctp_auth_
    return;

    if (atomic_dec_and_test(&key->refcnt)) {
    - kfree(key);
    + kzfree(key);
    SCTP_DBG_OBJCNT_DEC(keys);
    }
    }



    \
     
     \ /
      Last update: 2013-04-29 21:21    [W:4.400 / U:1.000 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site