Commit 1558efd0 authored by Wenliang Fan's avatar Wenliang Fan Committed by John W. Linville

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: default avatarWenliang Fan <fanwlexca@gmail.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent c3c5bb31
...@@ -2567,7 +2567,7 @@ static int prism2_ioctl_priv_prism2_param(struct net_device *dev, ...@@ -2567,7 +2567,7 @@ static int prism2_ioctl_priv_prism2_param(struct net_device *dev,
local->passive_scan_interval = value; local->passive_scan_interval = value;
if (timer_pending(&local->passive_scan_timer)) if (timer_pending(&local->passive_scan_timer))
del_timer(&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_timer.expires = jiffies +
local->passive_scan_interval * HZ; local->passive_scan_interval * HZ;
add_timer(&local->passive_scan_timer); add_timer(&local->passive_scan_timer);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment