Drivers: misc: fix out-of-bounds access in function param_set_kgdbts_var
authorYoung Xiao <YangX92@hotmail.com>
Fri, 12 Apr 2019 07:45:06 +0000 (15:45 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Apr 2019 20:23:06 +0000 (22:23 +0200)
commitb281218ad4311a0342a40cb02fb17a363df08b48
treedd6e5b40e6ffd8793af4d033ef833e2b4e452a67
parent15235f1f495efc5ed435cf6fff95066ba85c5328
Drivers: misc: fix out-of-bounds access in function param_set_kgdbts_var

There is an out-of-bounds access to "config[len - 1]" array when the
variable "len" is zero.

See commit dada6a43b040 ("kgdboc: fix KASAN global-out-of-bounds bug
in param_set_kgdboc_var()") for details.

Signed-off-by: Young Xiao <YangX92@hotmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/kgdbts.c