ALSA: seq: Fix OOB-reads from strlcpy
authorZubin Mithra <zsm@chromium.org>
Thu, 4 Apr 2019 21:33:55 +0000 (14:33 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Apr 2019 06:38:48 +0000 (08:38 +0200)
commit73b50a56e51edcd78ef7602afe75083d640548e8
tree694519d8710045330ef793d04e3ad54929c76e5c
parentd4b4aeea5506349a68adc9d2c372c8fa2416d790
ALSA: seq: Fix OOB-reads from strlcpy

commit 212ac181c158c09038c474ba68068be49caecebb upstream.

When ioctl calls are made with non-null-terminated userspace strings,
strlcpy causes an OOB-read from within strlen. Fix by changing to use
strscpy instead.

Signed-off-by: Zubin Mithra <zsm@chromium.org>
Reviewed-by: Guenter Roeck <groeck@chromium.org>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sound/core/seq/seq_clientmgr.c