netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Florian Westphal <fw@strlen.de>
Cc: Jay Elliott <jelliott@arista.com>, netfilter-devel@vger.kernel.org
Subject: Re: [PATCH v4] netfilter: conntrack: clamp timeouts to INT_MAX
Date: Tue, 28 Nov 2017 01:14:57 +0100	[thread overview]
Message-ID: <20171128001457.GA1805@salvia> (raw)
In-Reply-To: <20171128001244.GE23412@breakpoint.cc>

On Tue, Nov 28, 2017 at 01:12:44AM +0100, Florian Westphal wrote:
> Pablo Neira Ayuso <pablo@netfilter.org> wrote:
> > On Wed, Nov 15, 2017 at 03:01:13PM -0800, Jay Elliott wrote:
> > > When the conntracking code multiplies a timeout by HZ, it can overflow
> > > from positive to negative; this causes it to instantly expire.  To
> > > protect against this the multiplication is done in 64-bit so we can
> > > prevent it from exceeding INT_MAX.
> > 
> > This is something you must be observing via conntrack utility or
> > conntrackd?
> 
> nf_ct_is_expired() will consider a ct as expired if the delta
> between current time and the (future) timeout is > 2**31.
> 
> This triggers when ctnetlink configures a timeout larger than 2**31.
> 
> The patch looks correct to me.
> 
> Acked-by: Florian Westphal <fw@strlen.de>

I'll pass this to net instead, this is likely breaking conntrackd.

Thanks.

      reply	other threads:[~2017-11-28  0:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-15 23:01 [PATCH v4] netfilter: conntrack: clamp timeouts to INT_MAX Jay Elliott
2017-11-27 23:24 ` Pablo Neira Ayuso
2017-11-28  0:12   ` Florian Westphal
2017-11-28  0:14     ` Pablo Neira Ayuso [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171128001457.GA1805@salvia \
    --to=pablo@netfilter.org \
    --cc=fw@strlen.de \
    --cc=jelliott@arista.com \
    --cc=netfilter-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).