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: netfilter-devel@vger.kernel.org, Houcheng Lin <houcheng@gmail.com>
Subject: Re: [PATCH 3/3] netfilter: nf_log: release skbuff on nlmsg put failure
Date: Fri, 24 Oct 2014 14:35:09 +0200	[thread overview]
Message-ID: <20141024123509.GC4587@salvia> (raw)
In-Reply-To: <1414053368-29037-4-git-send-email-fw@strlen.de>

On Thu, Oct 23, 2014 at 10:36:08AM +0200, Florian Westphal wrote:
> From: Houcheng Lin <houcheng@gmail.com>
> 
> The kernel should reserve enough room in the skb so that the DONE
> message can always be appended.  However, in case of e.g. new attribute
> erronously not being size-accounted for, __nfulnl_send() will still
> try to put next nlmsg into this full skbuf, causing the skb to be stuck
> forever and blocking delivery of further messages.
> 
> Fix issue by releasing skb immediately after nlmsg_put error and
> WARN() so we can track down the cause of such size mismatch.

Good idea.

> [ fw@strlen.de: add tailroom/len info to WARN ]

Applied, thanks.

      reply	other threads:[~2014-10-24 12:33 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-23  8:36 [PATCH 0/3] netfilter: nf_log: nlmsg size fixes Florian Westphal
2014-10-23  8:36 ` [PATCH 1/3] netfilter: nf_log: account for size of NLMSG_DONE attribute Florian Westphal
2014-10-24 12:30   ` Pablo Neira Ayuso
2014-10-24 12:39     ` Pablo Neira Ayuso
2014-10-23  8:36 ` [PATCH 2/3] netfilter: nfnetlink_log: fix maximum packet length logged to userspace Florian Westphal
2014-10-24 12:33   ` Pablo Neira Ayuso
2014-10-23  8:36 ` [PATCH 3/3] netfilter: nf_log: release skbuff on nlmsg put failure Florian Westphal
2014-10-24 12:35   ` 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=20141024123509.GC4587@salvia \
    --to=pablo@netfilter.org \
    --cc=fw@strlen.de \
    --cc=houcheng@gmail.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).