]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: nf_log: account for size of NLMSG_DONE attribute
authorFlorian Westphal <fw@strlen.de>
Thu, 23 Oct 2014 08:36:06 +0000 (10:36 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Fri, 24 Oct 2014 12:30:15 +0000 (14:30 +0200)
commit155ffc972a9a5836c99e2a17df4cade4f8b67d25
treef466a38d72a2cba8f6a93519c64a9d899690d612
parent8ff816bd6ca973d3bad0495c50fb782c5c711de3
netfilter: nf_log: account for size of NLMSG_DONE attribute

We currently neither account for the nlattr size, nor do we consider
the size of the trailing NLMSG_DONE when allocating nlmsg skb.

This can result in nflog to stop working, as __nfulnl_send() re-tries
sending forever if it failed to append NLMSG_DONE (which will never
work if buffer is not large enough).

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