Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6

Pull crypto fixes from Herbert Xu:
"This fixes a couple of crypto drivers that were using memcmp to verify
authentication tags. They now use crypto_memneq instead"

* 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
crypto: talitos - Fix timing leak in ESP ICV verification
crypto: nx - Fix timing leak in GCM and CCM decryption

+4 -3
+1 -1
drivers/crypto/nx/nx-aes-ccm.c
··· 409 409 processed += to_process; 410 410 } while (processed < nbytes); 411 411 412 - rc = memcmp(csbcpb->cpb.aes_ccm.out_pat_or_mac, priv->oauth_tag, 412 + rc = crypto_memneq(csbcpb->cpb.aes_ccm.out_pat_or_mac, priv->oauth_tag, 413 413 authsize) ? -EBADMSG : 0; 414 414 out: 415 415 spin_unlock_irqrestore(&nx_ctx->lock, irq_flags);
+2 -1
drivers/crypto/nx/nx-aes-gcm.c
··· 21 21 22 22 #include <crypto/internal/aead.h> 23 23 #include <crypto/aes.h> 24 + #include <crypto/algapi.h> 24 25 #include <crypto/scatterwalk.h> 25 26 #include <linux/module.h> 26 27 #include <linux/types.h> ··· 419 418 itag, req->src, req->assoclen + nbytes, 420 419 crypto_aead_authsize(crypto_aead_reqtfm(req)), 421 420 SCATTERWALK_FROM_SG); 422 - rc = memcmp(itag, otag, 421 + rc = crypto_memneq(itag, otag, 423 422 crypto_aead_authsize(crypto_aead_reqtfm(req))) ? 424 423 -EBADMSG : 0; 425 424 }
+1 -1
drivers/crypto/talitos.c
··· 977 977 } else 978 978 oicv = (char *)&edesc->link_tbl[0]; 979 979 980 - err = memcmp(oicv, icv, authsize) ? -EBADMSG : 0; 980 + err = crypto_memneq(oicv, icv, authsize) ? -EBADMSG : 0; 981 981 } 982 982 983 983 kfree(edesc);