lkml.org 
[lkml]   [2020]   [Apr]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] crypto: caam - fix the address of the last entry of S/G
From
Date
On 4/7/2020 6:59 PM, Iuliana Prodan wrote:
> For skcipher algorithms, the input, output HW S/G tables
> look like this: [IV, src][dst, IV]
> Now, we can have 2 conditions here:
> - there is no IV;
> - src and dst are equal (in-place encryption) and scattered
> and the error is an "off-by-one" in the HW S/G table.
>
> This issue was seen with KASAN:
> BUG: KASAN: slab-out-of-bounds in skcipher_edesc_alloc+0x95c/0x1018
>
> Read of size 4 at addr ffff000022a02958 by task cryptomgr_test/321
>
> CPU: 2 PID: 321 Comm: cryptomgr_test Not tainted
> 5.6.0-rc1-00165-ge4ef8383-dirty #4
Non-public SHA1, dirty tree.

Probably it's not reproducible without applying previous fixes?
https://patchwork.kernel.org/project/linux-crypto/list/?series=266561

> Fixes: 334d37c9e263 ("crypto: caam - update IV using HW support")
> Cc: <stable@vger.kernel.org> # v5.3+
> Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
Reviewed-by: Horia Geantă <horia.geanta@nxp.com>

Thanks,
Horia

\
 
 \ /
  Last update: 2020-04-07 20:57    [W:0.091 / U:2.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site