linux/arch
Ard Biesheuvel fd16931a2f crypto: arm/chacha-neon - add missing counter increment
Commit 86cd97ec4b ("crypto: arm/chacha-neon - optimize for non-block
size multiples") refactored the chacha block handling in the glue code in
a way that may result in the counter increment to be omitted when calling
chacha_block_xor_neon() to process a full block. This violates the skcipher
API, which requires that the output IV is suitable for handling more input
as long as the preceding input has been presented in round multiples of the
block size. Also, the same code is exposed via the chacha library interface
whose callers may actually rely on this increment to occur even for final
blocks that are smaller than the chacha block size.

So increment the counter after calling chacha_block_xor_neon().

Fixes: 86cd97ec4b ("crypto: arm/chacha-neon - optimize for non-block size multiples")
Reported-by: Eric Biggers <ebiggers@kernel.org>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2021-01-03 08:35:35 +11:00
..
alpha A treewide cleanup of interrupt descriptor (ab)use with all sorts of racy 2020-12-24 13:50:23 -08:00
arc tif-task_work.arch-2020-12-14 2020-12-16 12:33:35 -08:00
arm crypto: arm/chacha-neon - add missing counter increment 2021-01-03 08:35:35 +11:00
arm64 A treewide cleanup of interrupt descriptor (ab)use with all sorts of racy 2020-12-24 13:50:23 -08:00
c6x tif-task_work.arch-2020-12-14 2020-12-16 12:33:35 -08:00
csky Tracing updates for 5.11 2020-12-17 13:22:17 -08:00
h8300 tif-task_work.arch-2020-12-14 2020-12-16 12:33:35 -08:00
hexagon tif-task_work.arch-2020-12-14 2020-12-16 12:33:35 -08:00
ia64 Kbuild updates for v5.11 2020-12-22 14:02:39 -08:00
m68k Fixes include: 2020-12-21 10:35:11 -08:00
microblaze epoll: wire up syscall epoll_pwait2 2020-12-19 11:18:38 -08:00
mips epoll: fix compat syscall wire up of epoll_pwait2 2020-12-20 10:01:38 -08:00
nds32 Tracing updates for 5.11 2020-12-17 13:22:17 -08:00
nios2 tif-task_work.arch-2020-12-14 2020-12-16 12:33:35 -08:00
openrisc OpenRISC updates for 5.11 2020-12-17 13:41:27 -08:00
parisc A treewide cleanup of interrupt descriptor (ab)use with all sorts of racy 2020-12-24 13:50:23 -08:00
powerpc powerpc fixes for 5.11 #2 2020-12-24 14:02:00 -08:00
riscv RISC-V Fixes for 5.11-rc1 2020-12-24 14:05:05 -08:00
s390 A treewide cleanup of interrupt descriptor (ab)use with all sorts of racy 2020-12-24 13:50:23 -08:00
sh The core framework got some nice improvements this time around. We gained the 2020-12-21 10:39:37 -08:00
sparc epoll: fix compat syscall wire up of epoll_pwait2 2020-12-20 10:01:38 -08:00
um This pull request contains the following changes for UML: 2020-12-17 17:56:44 -08:00
x86 A treewide cleanup of interrupt descriptor (ab)use with all sorts of racy 2020-12-24 13:50:23 -08:00
xtensa The core framework got some nice improvements this time around. We gained the 2020-12-21 10:39:37 -08:00
.gitignore
Kconfig kasan: allow VMAP_STACK for HW_TAGS mode 2020-12-22 12:55:08 -08:00