OSDN Git Service

gpio: Fix kernel stack leak to userspace
authorLinus Walleij <linus.walleij@linaro.org>
Mon, 22 Jan 2018 12:19:28 +0000 (13:19 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 3 Feb 2018 16:05:34 +0000 (17:05 +0100)
commitcc1fa4a7b653a4f0a4c95a26ce842d699e8e4b1a
treeb8d48316231116340afe75055a77ed6a36e94a18
parent241c04f75e90b6e0eaf099d53c68a77ed5767835
gpio: Fix kernel stack leak to userspace

commit 24bd3efc9d1efb5f756a7c6f807a36ddb6adc671 upstream.

The GPIO event descriptor was leaking kernel stack to
userspace because we don't zero the variable before
use. Ooops. Fix this.

Reported-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Bartosz Golaszewski <brgl@bgdev.pl>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpio/gpiolib.c