crypto: user - fix leaking uninitialized memory to userspace
authorEric Biggers <ebiggers@google.com>
Sat, 3 Nov 2018 21:56:00 +0000 (14:56 -0700)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 9 Nov 2018 09:35:43 +0000 (17:35 +0800)
commitf43f39958beb206b53292801e216d9b8a660f087
tree55c72a4428c1e7cb5e38e85e8912e1540be2e65b
parent508a1c4df085a547187eed346f1bfe5e381797f1
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>
crypto/crypto_user_base.c