]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit - crypto/testmgr.c
crypto: testmgr - add guard to dst buffer for ahash_export
authorJan Stancek <jstancek@redhat.com>
Wed, 28 Sep 2016 14:38:37 +0000 (16:38 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Sun, 2 Oct 2016 14:33:43 +0000 (22:33 +0800)
commit7bcb87bca2f51226f3ec382fcd3ff52cc15747bb
tree07bb151f7e7dd849a87822e33506f15925c28419
parent3387879524ec07fd9ba371eddd17e717abdd5e4f
crypto: testmgr - add guard to dst buffer for ahash_export

Add a guard to 'state' buffer and warn if its consistency after
call to crypto_ahash_export() changes, so that any write that
goes beyond advertised statesize (and thus causing potential
memory corruption [1]) is more visible.

[1] https://marc.info/?l=linux-crypto-vger&m=147467656516085

Signed-off-by: Jan Stancek <jstancek@redhat.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Marcelo Cerri <marcelo.cerri@canonical.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/testmgr.c