[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.00.1205142344470.29179@blackhole.kfki.hu>
Date: Mon, 14 May 2012 23:45:14 +0200 (CEST)
From: Jozsef Kadlecsik <kadlec@...ckhole.kfki.hu>
To: Pablo Neira Ayuso <pablo@...filter.org>
cc: Eric Dumazet <eric.dumazet@...il.com>,
David Laight <David.Laight@...LAB.COM>,
netfilter-devel@...r.kernel.org, davem@...emloft.net,
netdev@...r.kernel.org
Subject: Re: [PATCH 1/4] netfilter: ipset: fix timeout value overflow bug
On Mon, 14 May 2012, Pablo Neira Ayuso wrote:
> On Mon, May 14, 2012 at 07:45:07PM +0200, Jozsef Kadlecsik wrote:
> > On Mon, 14 May 2012, Eric Dumazet wrote:
> >
> > > On Mon, 2012-05-14 at 16:36 +0200, Pablo Neira Ayuso wrote:
> > > > On Mon, May 14, 2012 at 03:19:49PM +0100, David Laight wrote:
> > > > >
> > > > > > --- 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 ?
> > > >
> > > > Indeed. I overlooked that. Thanks David.
> > >
> > > I dont think so.
> > >
> > > 1000 here is really MSEC_PER_SEC
> > >
> > > (All occurrences should be changed in this file)
> >
> > Yes, exactly. Pablo, shall I produce a little patch or could you change
> > 1000 to MSEC_PER_SEC?
>
> New patch attached.
>
> I have rebase my tree again.
Thanks Pablo, indeed!
Best regards,
Jozsef
-
E-mail : kadlec@...ckhole.kfki.hu, kadlecsik.jozsef@...ner.mta.hu
PGP key : http://www.kfki.hu/~kadlec/pgp_public_key.txt
Address : Wigner Research Centre for Physics, Hungarian Academy of Sciences
H-1525 Budapest 114, POB. 49, Hungary
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists