summaryrefslogtreecommitdiff
path: root/drivers/usb/core/hcd.c
diff options
context:
space:
mode:
authorPan Bian <bianpan2016@163.com>2016-12-03 10:27:37 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-11-15 14:53:14 (GMT)
commit397b6e5d7bbe23ee8f0973b42fc273940e3bd0d1 (patch)
treef610af848c6f9007b43a82141d9c8ed66dfad39b /drivers/usb/core/hcd.c
parent2ae9f47ce114680dbbc2c56b00ed85eade4f6328 (diff)
downloadlinux-397b6e5d7bbe23ee8f0973b42fc273940e3bd0d1.tar.xz
libertas: fix improper return value
[ Upstream commit 259010c509b6f28b3b851ae45238cf526f52e185 ] Function lbs_cmd_802_11_sleep_params() always return 0, even if the call to lbs_cmd_with_response() fails. In this case, the parameter @sp will keep uninitialized. Because the return value is 0, its caller (say lbs_sleepparams_read()) will not detect the error, and will copy the uninitialized stack memory to user sapce, resulting in stack information leak. To avoid the bug, this patch returns variable ret (which takes the return value of lbs_cmd_with_response()) instead of 0. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=188451 Signed-off-by: Pan Bian <bianpan2016@163.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Signed-off-by: Sasha Levin <alexander.levin@verizon.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/core/hcd.c')
0 files changed, 0 insertions, 0 deletions