From 1558efd0d48671845d2bd9ad80ba042577afd578 Mon Sep 17 00:00:00 2001 From: Wenliang Fan Date: Wed, 18 Dec 2013 13:56:12 +0800 Subject: 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 Signed-off-by: John W. Linville --- drivers/net/wireless/hostap/hostap_ioctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/net/wireless/hostap') 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); -- cgit v1.2.1 From c8bf40ad4f8f5d26f6744020ad51be420a707385 Mon Sep 17 00:00:00 2001 From: Paul Gortmaker Date: Thu, 2 Jan 2014 18:58:32 -0500 Subject: wireless: delete non-required instances of include None of these files are actually using any __init type directives and hence don't need to include . Most are just a left over from __devinit and __cpuinit removal, or simply due to code getting copied from one driver to the next. Signed-off-by: Paul Gortmaker Acked-by: Larry Finger Acked-by: Christian Lamparter Acked-by: Gertjan van Wingerde Signed-off-by: John W. Linville --- drivers/net/wireless/hostap/hostap_cs.c | 1 - drivers/net/wireless/hostap/hostap_pci.c | 1 - drivers/net/wireless/hostap/hostap_plx.c | 1 - 3 files changed, 3 deletions(-) (limited to 'drivers/net/wireless/hostap') diff --git a/drivers/net/wireless/hostap/hostap_cs.c b/drivers/net/wireless/hostap/hostap_cs.c index 56cd01ca8ad0..9f825f2620da 100644 --- a/drivers/net/wireless/hostap/hostap_cs.c +++ b/drivers/net/wireless/hostap/hostap_cs.c @@ -1,7 +1,6 @@ #define PRISM2_PCCARD #include -#include #include #include #include diff --git a/drivers/net/wireless/hostap/hostap_pci.c b/drivers/net/wireless/hostap/hostap_pci.c index 05ca3402dca7..91158e2e961c 100644 --- a/drivers/net/wireless/hostap/hostap_pci.c +++ b/drivers/net/wireless/hostap/hostap_pci.c @@ -5,7 +5,6 @@ * Andy Warner */ #include -#include #include #include #include diff --git a/drivers/net/wireless/hostap/hostap_plx.c b/drivers/net/wireless/hostap/hostap_plx.c index c3d067ee4db9..3bf530d9a40f 100644 --- a/drivers/net/wireless/hostap/hostap_plx.c +++ b/drivers/net/wireless/hostap/hostap_plx.c @@ -8,7 +8,6 @@ #include -#include #include #include #include -- cgit v1.2.1