]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
crypto: ccp - Validate the the error value used to index error messages
authorHook, Gary <Gary.Hook@amd.com>
Thu, 27 Jun 2019 16:16:23 +0000 (16:16 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 26 Jul 2019 07:12:53 +0000 (09:12 +0200)
commit8ab50be87e91e0fabd2a3d9e2265cb9f8b16169d
tree0be9eb7bbd1772f2d670c5fa7db0c58b79bba528
parentf976273ae5ba05640893560901464cbfa08dfaa0
crypto: ccp - Validate the the error value used to index error messages

commit 52393d617af7b554f03531e6756facf2ea687d2e upstream.

The error code read from the queue status register is only 6 bits wide,
but we need to verify its value is within range before indexing the error
messages.

Fixes: 81422badb3907 ("crypto: ccp - Make syslog errors human-readable")
Cc: <stable@vger.kernel.org>
Reported-by: Cfir Cohen <cfir@google.com>
Signed-off-by: Gary R Hook <gary.hook@amd.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/crypto/ccp/ccp-dev.c
drivers/crypto/ccp/ccp-dev.h