]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
bus: moxtet: fix potential stack buffer overflow
authorMarek Behún <marek.behun@nic.cz>
Sat, 15 Feb 2020 14:21:30 +0000 (15:21 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 19 Feb 2020 18:53:04 +0000 (19:53 +0100)
commitfa3c053b831318b9dba8c197026035f06889307a
tree561714530a78421a1a95d67009199c6694262aef
parent279c15b917ec2dcc5128f6467304b1f253fd79a5
bus: moxtet: fix potential stack buffer overflow

commit 3bf3c9744694803bd2d6f0ee70a6369b980530fd upstream.

The input_read function declares the size of the hex array relative to
sizeof(buf), but buf is a pointer argument of the function. The hex
array is meant to contain hexadecimal representation of the bin array.

Link: https://lore.kernel.org/r/20200215142130.22743-1-marek.behun@nic.cz
Fixes: 5bc7f990cd98 ("bus: Add support for Moxtet bus")
Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reported-by: sohu0106 <sohu0106@126.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/bus/moxtet.c