lkml.org 
[lkml]   [2016]   [Nov]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Date
    Subject[PATCH 3.16 164/346] crypto: caam - fix non-hmac hashes
    3.16.39-rc1 review patch.  If anyone has any objections, please let me know.

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

    From: Russell King <rmk+kernel@armlinux.org.uk>

    commit a0118c8b2be9297aed8e915c60b4013326b256d4 upstream.

    Since 6de62f15b581 ("crypto: algif_hash - Require setkey before
    accept(2)"), the AF_ALG interface requires userspace to provide a key
    to any algorithm that has a setkey method. However, the non-HMAC
    algorithms are not keyed, so setting a key is unnecessary.

    Fix this by removing the setkey method from the non-keyed hash
    algorithms.

    Fixes: 6de62f15b581 ("crypto: algif_hash - Require setkey before accept(2)")
    Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
    Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
    Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
    ---
    drivers/crypto/caam/caamhash.c | 1 +
    1 file changed, 1 insertion(+)

    --- a/drivers/crypto/caam/caamhash.c
    +++ b/drivers/crypto/caam/caamhash.c
    @@ -1778,6 +1778,7 @@ caam_hash_alloc(struct caam_hash_templat
    template->name);
    snprintf(alg->cra_driver_name, CRYPTO_MAX_ALG_NAME, "%s",
    template->driver_name);
    + t_alg->ahash_alg.setkey = NULL;
    }
    alg->cra_module = THIS_MODULE;
    alg->cra_init = caam_hash_cra_init;
    \
     
     \ /
      Last update: 2016-11-14 03:40    [W:4.129 / U:0.408 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site