RE: [PATCH 1/4] netfilter: ipset: fix timeout value overflow bug

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



 
> --- a/include/linux/netfilter/ipset/ip_set_timeout.h
> +++ b/include/linux/netfilter/ipset/ip_set_timeout.h
> @@ -30,6 +30,10 @@ ip_set_timeout_uget(struct nlattr *tb)
>  {
>  	unsigned int timeout = ip_set_get_h32(tb);
>  
> +	/* Normalize to fit into jiffies */
> +	if (timeout > UINT_MAX/1000)
> +		timeout = UINT_MAX/1000;
> +

Doesn't that rather assume that HZ is 1000 ?

	David
 


--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux