]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
USB: idmouse: fix NULL-deref at probe
authorJohan Hovold <johan@kernel.org>
Mon, 13 Mar 2017 12:47:48 +0000 (13:47 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 30 Mar 2017 07:44:04 +0000 (09:44 +0200)
commitbcf394acf7360aae3d420bfa4b2172f48450fa44
tree8cb45a5056f20e069fb22e58e823d28d86688428
parentf615aa74026ff786061b91ce37ffbf1767ce7342
USB: idmouse: fix NULL-deref at probe

commit b0addd3fa6bcd119be9428996d5d4522479ab240 upstream.

Make sure to check the number of endpoints to avoid dereferencing a
NULL-pointer should a malicious device lack endpoints.

Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/misc/idmouse.c