mbox series

[0/3] crypto: fix crash in scatterwalk_pagedone()

Message ID 20180723175458.108900-1-ebiggers3@gmail.com (mailing list archive)
Headers show
Series crypto: fix crash in scatterwalk_pagedone() | expand

Message

Eric Biggers July 23, 2018, 5:54 p.m. UTC
From: Eric Biggers <ebiggers@google.com>

This series fixes the bug reported by Liu Chao (found using syzkaller)
where a crash occurs in scatterwalk_pagedone() on architectures such as
arm and arm64 that implement flush_dcache_page(), due to an invalid page
pointer when walk->offset == 0.  This series attempts to address the
underlying problem which is that scatterwalk_pagedone() shouldn't have
been called at all in that case.

Eric Biggers (3):
  crypto: skcipher - fix crash flushing dcache in error path
  crypto: blkcipher - fix crash flushing dcache in error path
  crypto: ablkcipher - fix crash flushing dcache in error path

 crypto/ablkcipher.c | 57 +++++++++++++++++++++------------------------
 crypto/blkcipher.c  | 54 +++++++++++++++++++++---------------------
 crypto/skcipher.c   | 53 ++++++++++++++++++++---------------------
 3 files changed, 79 insertions(+), 85 deletions(-)

Comments

Herbert Xu Aug. 3, 2018, 1:59 p.m. UTC | #1
On Mon, Jul 23, 2018 at 10:54:55AM -0700, Eric Biggers wrote:
> From: Eric Biggers <ebiggers@google.com>
> 
> This series fixes the bug reported by Liu Chao (found using syzkaller)
> where a crash occurs in scatterwalk_pagedone() on architectures such as
> arm and arm64 that implement flush_dcache_page(), due to an invalid page
> pointer when walk->offset == 0.  This series attempts to address the
> underlying problem which is that scatterwalk_pagedone() shouldn't have
> been called at all in that case.
> 
> Eric Biggers (3):
>   crypto: skcipher - fix crash flushing dcache in error path
>   crypto: blkcipher - fix crash flushing dcache in error path
>   crypto: ablkcipher - fix crash flushing dcache in error path
> 
>  crypto/ablkcipher.c | 57 +++++++++++++++++++++------------------------
>  crypto/blkcipher.c  | 54 +++++++++++++++++++++---------------------
>  crypto/skcipher.c   | 53 ++++++++++++++++++++---------------------
>  3 files changed, 79 insertions(+), 85 deletions(-)

All applied.  Thanks.