]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
crypto: user - fix leaking uninitialized memory to userspace
authorEric Biggers <ebiggers@google.com>
Fri, 25 Jan 2019 02:08:08 +0000 (02:08 +0000)
committerKhalid Elmously <khalid.elmously@canonical.com>
Wed, 6 Feb 2019 04:53:01 +0000 (04:53 +0000)
commitc807ef3b4fbca42c6cb6f20cf3bddeaa8b312548
treee7c4a8157bcd58a9137065596e518cc823fb8f9e
parentdfe0642954320b4c0111089cbf579452ef71cc14
crypto: user - fix leaking uninitialized memory to userspace

All bytes of the NETLINK_CRYPTO report structures must be initialized,
since they are copied to userspace.  The change from strncpy() to
strlcpy() broke this.  As a minimal fix, change it back.

Fixes: 4473710df1f8 ("crypto: user - Prepare for CRYPTO_MAX_ALG_NAME expansion")
Cc: <stable@vger.kernel.org> # v4.12+
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
CVE-2018-19854

(backported from commit f43f39958beb206b53292801e216d9b8a660f087)
[tyhicks: Adjust the name of the file to be patched]
Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
Acked-by: Khalid Elmously <khalid.elmously@canonical.com>
Acked-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
crypto/crypto_user.c