]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
netfilter: nf_log: release skbuff on nlmsg put failure
authorHoucheng Lin <houcheng@gmail.com>
Thu, 23 Oct 2014 08:36:08 +0000 (10:36 +0200)
committerJiri Slaby <jslaby@suse.cz>
Wed, 19 Nov 2014 17:38:25 +0000 (18:38 +0100)
commit37bdac282ed1d1f2641ba9063f50cf42bcb94dc4
tree5e9370f29d91b8dce1dded31c968d84864c7be15
parent45ebf3641319166e3a6c468eeeac48aa4d6d567d
netfilter: nf_log: release skbuff on nlmsg put failure

commit b51d3fa364885a2c1e1668f88776c67c95291820 upstream.

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.

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

Signed-off-by: Houcheng Lin <houcheng@gmail.com>
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
net/netfilter/nfnetlink_log.c