summaryrefslogtreecommitdiff
path: root/fs/ext4/inline.c
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@google.com>2019-01-14 15:21:45 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-01-16 22:16:12 +0100
commit6b22de54346b5d00e3fcf3b0bd0bc2958cc52c41 (patch)
treeec8d55fb662e7f90c7e8c6144c630a7272f76ee7 /fs/ext4/inline.c
parent61dd99c3788d9752453c5406b8ae6d6e2197cf34 (diff)
crypto: cts - fix crash on short inputs
[It's a minimal fix for a bug that was fixed incidentally by a large refactoring in v4.8.] In the CTS template, when the input length is <= one block cipher block (e.g. <= 16 bytes for AES) pass the correct length to the underlying CBC transform rather than one block. This matches the upstream behavior and makes the encryption/decryption operation correctly return -EINVAL when 1 <= nbytes < bsize or succeed when nbytes == 0, rather than crashing. This was fixed upstream incidentally by a large refactoring, commit 0605c41cc53c ("crypto: cts - Convert to skcipher"). But syzkaller easily trips over this when running on older kernels, as it's easily reachable via AF_ALG. Therefore, this patch makes the minimal fix for older kernels. Cc: linux-crypto@vger.kernel.org Fixes: 76cb9521795a ("[CRYPTO] cts: Add CTS mode required for Kerberos AES support") Signed-off-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/ext4/inline.c')
0 files changed, 0 insertions, 0 deletions