]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerWilly Tarreau <w@1wt.eu>
Sun, 23 Nov 2014 09:55:48 +0000 (10:55 +0100)
commit6c50e2f9c29f9dc72a3b1af1c6c401b10da96992
tree5613eeb2ecefeb2ab417cffb7f83c227452e2426
parent26967a02542d7e0673f82bc1b71e467f37e0f858
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>
(cherry picked from commit 9dfa1dfe4d5e5e66a991321ab08afe69759d797a)
Signed-off-by: Willy Tarreau <w@1wt.eu>
net/netfilter/nfnetlink_log.c