Main-line Linux kernel tree http://www.kernel.org
Go to file
Eric Biggers edaf28e996 crypto: salsa20 - don't access already-freed walk.iv
If the user-provided IV needs to be aligned to the algorithm's
alignmask, then skcipher_walk_virt() copies the IV into a new aligned
buffer walk.iv.  But skcipher_walk_virt() can fail afterwards, and then
if the caller unconditionally accesses walk.iv, it's a use-after-free.

salsa20-generic doesn't set an alignmask, so currently it isn't affected
by this despite unconditionally accessing walk.iv.  However this is more
subtle than desired, and it was actually broken prior to the alignmask
being removed by commit b62b3db76f ("crypto: salsa20-generic - cleanup
and convert to skcipher API").

Since salsa20-generic does not update the IV and does not need any IV
alignment, update it to use req->iv instead of walk.iv.

Fixes: 2407d60872 ("[CRYPTO] salsa20: Salsa20 stream cipher")
Cc: stable@vger.kernel.org
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2019-04-18 22:14:58 +08:00
arch crypto: arm64/cbcmac - handle empty messages in same way as template 2019-04-08 14:42:55 +08:00
block
certs
crypto crypto: salsa20 - don't access already-freed walk.iv 2019-04-18 22:14:58 +08:00
Documentation Kbuild updates for v5.1 (2nd) 2019-03-17 13:25:26 -07:00
drivers crypto: mxs-dcp - remove set but not used variable 'fini' 2019-04-18 22:14:58 +08:00
fs Pull request for inlusion in 5.1 2019-03-17 09:10:56 -07:00
include crypto: streebog - fix unaligned memory accesses 2019-04-08 14:42:55 +08:00
init
ipc
kernel
lib Kbuild updates for v5.1 (2nd) 2019-03-17 13:25:26 -07:00
LICENSES
mm
net Pull request for inlusion in 5.1 2019-03-17 09:10:56 -07:00
samples
scripts
security
sound
tools
usr
virt
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS
Makefile Linux 5.1-rc1 2019-03-17 14:22:26 -07:00
README

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.