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:38:48 +0000 (17:38 +0100)
commitc5845e025423b02235489f154903b8befabebb02
treed0f6f44e0e019495862d641c7d579b0c3c6a8921
parent460c5b9745b8b455be5591b1179e89a8bdcb1afd
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