diff options
author | Cristian Stoica <cristian.stoica@freescale.com> | 2014-09-23 10:44:40 (GMT) |
---|---|---|
committer | Matthew Weigel <Matthew.Weigel@freescale.com> | 2014-12-11 18:41:02 (GMT) |
commit | 93471b68954c1b81d1099461cb724046c9a5bca9 (patch) | |
tree | d7239909afab1e4f8d029999ca1a3ede45c6098c /drivers/crypto/caam/caamhash.c | |
parent | e8b69435af3cb76513b95e7ba7d817b2325089ba (diff) | |
download | linux-fsl-qoriq-93471b68954c1b81d1099461cb724046c9a5bca9.tar.xz |
crypto: caamctrl: fix array out of bound access
desc_len(desc) returns a result masked by a seven bits mask representing
a descriptor length. The maximum length is 64 u32 words but masking
allows for larger but incorrect values.
This fix adds a bound check to the index of deco.descbuf array
(which is smaller than the maximum of 64 words), to avoid invalid
memory accesses.
(based on commit 05dbe2ed7da7d67cfd8915382c2559db684a0a29)
Signed-off-by: Cristian Stoica <cristian.stoica@freescale.com>
Signed-off-by: Matthew Weigel <matthew.weigel@freescale.com>
Change-Id: I05dbe2ed7da7d67cfd8915382c2559db684a0a29
Conflicts:
drivers/crypto/caam/ctrl.c
Reviewed-on: http://git.am.freescale.net:8181/19805
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Matthew Weigel <Matthew.Weigel@freescale.com>
Diffstat (limited to 'drivers/crypto/caam/caamhash.c')
0 files changed, 0 insertions, 0 deletions