ath9k: fix tx99 potential info leak
authorMiaoqing Pan <miaoqing@codeaurora.org>
Wed, 27 Sep 2017 01:13:34 +0000 (09:13 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Dec 2017 09:10:38 +0000 (10:10 +0100)
commite37eb54a000c767e7f39b806fb048c4be75ed786
tree3446e6cdf06ac137564e39f145f5d9a7171c6474
parent99ab42f783da58540c80c91a2af8e8c764c46ca8
ath9k: fix tx99 potential info leak

[ Upstream commit ee0a47186e2fa9aa1c56cadcea470ca0ba8c8692 ]

When the user sets count to zero the string buffer would remain
completely uninitialized which causes the kernel to parse its
own stack data, potentially leading to an info leak. In addition
to that, the string might be not terminated properly when the
user data does not contain a 0-terminator.

Signed-off-by: Miaoqing Pan <miaoqing@codeaurora.org>
Reviewed-by: Christoph Böhmwalder <christoph@boehmwalder.at>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/wireless/ath/ath9k/tx99.c