Linux kernel source tree
Go to file
Jason A. Donenfeld 4ad23a4fc1 UPSTREAM: crypto: chacha20poly1305 - prevent integer overflow on large input
This code assigns src_len (size_t) to sl (int), which causes problems
when src_len is very large. Probably nobody in the kernel should be
passing this much data to chacha20poly1305 all in one go anyway, so I
don't think we need to change the algorithm or introduce larger types
or anything. But we should at least error out early in this case and
print a warning so that we get reports if this does happen and can look
into why anybody is possibly passing it that much data or if they're
accidently passing -1 or similar.

Fixes: d95312a3cc ("crypto: lib/chacha20poly1305 - reimplement crypt_from_sg() routine")
Cc: Ard Biesheuvel <ardb@kernel.org>
Cc: stable@vger.kernel.org # 5.5+
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
(cherry picked from commit c9cc0517bb)
Bug: 152722841
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I0d9e4966a1a7fd20d369698af34cbff60e735710
2020-10-25 11:48:01 +01:00
android ANDROID: Refresh ABI.xmls with libabigail 1.8.0-98bbf30d 2020-09-28 14:42:26 +01:00
arch UPSTREAM: crypto: arm/chacha - fix build failured when kernel mode NEON is disabled 2020-10-25 11:47:59 +01:00
block This is the 4.19.145 stable release 2020-09-12 14:23:25 +02:00
certs
crypto UPSTREAM: crypto: Kconfig - allow tests to be disabled when manager is disabled 2020-10-25 11:48:00 +01:00
Documentation This is the 4.19.149 stable release 2020-10-01 16:49:05 +02:00
drivers UPSTREAM: binder: fix UAF when releasing todo list 2020-10-17 13:15:39 +02:00
firmware Fix built-in early-load Intel microcode alignment 2020-01-23 08:21:29 +01:00
fs This is the 4.19.152 stable release 2020-10-17 10:26:40 +02:00
include UPSTREAM: crypto: poly1305 - add new 32 and 64-bit generic versions 2020-10-25 11:47:54 +01:00
init UPSTREAM: security: allow using Clang's zero initialization for stack variables 2020-09-02 18:53:22 +02:00
ipc Revert "ANDROID: vfs: Add permission2 for filesystems with per mount permissions" 2020-06-27 15:17:42 +02:00
kernel This is the 4.19.151 stable release 2020-10-14 12:11:08 +02:00
lib UPSTREAM: crypto: chacha20poly1305 - prevent integer overflow on large input 2020-10-25 11:48:01 +01:00
LICENSES
mm This is the 4.19.151 stable release 2020-10-14 12:11:08 +02:00
net This is the 4.19.152 stable release 2020-10-17 10:26:40 +02:00
samples This is the 4.19.126 stable release 2020-06-03 09:23:15 +02:00
scripts This is the 4.19.144 stable release 2020-09-09 19:48:58 +02:00
security This is the 4.19.149 stable release 2020-10-01 16:49:05 +02:00
sound This is the 4.19.149 stable release 2020-10-01 16:49:05 +02:00
tools This is the 4.19.152 stable release 2020-10-17 10:26:40 +02:00
usr initramfs: restore default compression behavior 2020-04-13 10:44:59 +02:00
virt KVM: arm64: Assume write fault on S1PTW permission fault on instruction fetch 2020-10-01 13:14:54 +02:00
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap
build.config.aarch64 ANDROID: move builds to use gas prebuilts 2020-10-19 21:13:08 +00:00
build.config.allmodconfig ANDROID: build.config.allmodconfig: Re-enable XFS_FS 2020-04-17 08:41:31 +00:00
build.config.allmodconfig.aarch64 ANDROID: drop KERNEL_DIR setting in build.config.common 2020-09-25 15:14:51 +08:00
build.config.allmodconfig.arm ANDROID: drop KERNEL_DIR setting in build.config.common 2020-09-25 15:14:51 +08:00
build.config.allmodconfig.x86_64 ANDROID: drop KERNEL_DIR setting in build.config.common 2020-09-25 15:14:51 +08:00
build.config.arm ANDROID: move builds to use gas prebuilts 2020-10-19 21:13:08 +00:00
build.config.common ANDROID: build.config.common: enable LLVM=1 2020-10-01 20:10:11 +00:00
build.config.gki ANDROID: gki: Removed cf modules from gki_defconfig 2020-01-31 16:23:38 -08:00
build.config.gki_kasan ANDROID: drop KERNEL_DIR setting in build.config.common 2020-09-25 15:14:51 +08:00
build.config.gki_kasan.aarch64 ANDROID: drop KERNEL_DIR setting in build.config.common 2020-09-25 15:14:51 +08:00
build.config.gki_kasan.x86_64 ANDROID: drop KERNEL_DIR setting in build.config.common 2020-09-25 15:14:51 +08:00
build.config.gki-debug.aarch64 ANDROID: drop KERNEL_DIR setting in build.config.common 2020-09-25 15:14:51 +08:00
build.config.gki-debug.x86_64 ANDROID: drop KERNEL_DIR setting in build.config.common 2020-09-25 15:14:51 +08:00
build.config.gki.aarch64 ANDROID: GKI: prevent removal of monitored symbols 2020-09-29 11:48:43 +01:00
build.config.gki.x86_64 ANDROID: drop KERNEL_DIR setting in build.config.common 2020-09-25 15:14:51 +08:00
build.config.x86_64 ANDROID: move builds to use gas prebuilts 2020-10-19 21:13:08 +00:00
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS UPSTREAM: crypto: lib - tidy up lib/crypto Kconfig and Makefile 2020-10-24 14:43:29 +02:00
Makefile This is the 4.19.152 stable release 2020-10-17 10:26:40 +02: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.
See Documentation/00-INDEX for a list of what is contained in each file.

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.