]> 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)
committerJiri Slaby <jslaby@suse.cz>
Wed, 19 Nov 2014 17:38:25 +0000 (18:38 +0100)
commit131172845aa2c804ffa9423455aee585061ea35e
treea60f4d785a29bc13edd4b35e30cead9c17ef162c
parent04e7556e9c84532bbdbe5663b7b25eb8ca15c14e
netfilter: nf_log: account for size of NLMSG_DONE attribute

commit 9dfa1dfe4d5e5e66a991321ab08afe69759d797a upstream.

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>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
net/netfilter/nfnetlink_log.c