summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/hostap/hostap_ioctl.c
diff options
context:
space:
mode:
authorWenliang Fan <fanwlexca@gmail.com>2013-12-18 09:56:12 +0400
committerJohn W. Linville <linville@tuxdriver.com>2014-01-04 00:36:56 +0400
commit1558efd0d48671845d2bd9ad80ba042577afd578 (patch)
tree08b013dced0bfc309a356cc32e9ae078ea928753 /drivers/net/wireless/hostap/hostap_ioctl.c
parentc3c5bb31ea046721bc5fe3e54b45c7a13677f398 (diff)
downloadlinux-1558efd0d48671845d2bd9ad80ba042577afd578.tar.xz
drivers/net/wireless/hostap: Integer overflow
The local variable 'value' comes from 'extra', a parameter of function 'prism2_ioctl_priv_prism2_param'. If a large number passed to 'value', there would be an integer overflow in the following line: local->passive_scan_timer.expires = jiffies + local->passive_scan_interval * HZ Signed-off-by: Wenliang Fan <fanwlexca@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/hostap/hostap_ioctl.c')
-rw-r--r--drivers/net/wireless/hostap/hostap_ioctl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/hostap/hostap_ioctl.c b/drivers/net/wireless/hostap/hostap_ioctl.c
index e5090309824e..63e350affc7e 100644
--- a/drivers/net/wireless/hostap/hostap_ioctl.c
+++ b/drivers/net/wireless/hostap/hostap_ioctl.c
@@ -2567,7 +2567,7 @@ static int prism2_ioctl_priv_prism2_param(struct net_device *dev,
local->passive_scan_interval = value;
if (timer_pending(&local->passive_scan_timer))
del_timer(&local->passive_scan_timer);
- if (value > 0) {
+ if (value > 0 && value < INT_MAX / HZ) {
local->passive_scan_timer.expires = jiffies +
local->passive_scan_interval * HZ;
add_timer(&local->passive_scan_timer);