netfilter: nfnetlink_log: fix maximum packet length logged to userspace
authorFlorian Westphal <fw@strlen.de>
Thu, 23 Oct 2014 08:36:07 +0000 (10:36 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 21 Nov 2014 17:23:05 +0000 (09:23 -0800)
commit74525d5efb7c5d99f1c307ad4ffec7ecbd952acb
tree7c32ebd8e4dc4710ad858fc733b86b04921d2ae4
parentb1fef6b81871a396f3b8702077333e769673c87b
netfilter: nfnetlink_log: fix maximum packet length logged to userspace

commit c1e7dc91eed0ed1a51c9b814d648db18bf8fc6e9 upstream.

don't try to queue payloads > 0xffff - NLA_HDRLEN, it does not work.
The nla length includes the size of the nla struct, so anything larger
results in u16 integer overflow.

This patch is similar to
9cefbbc9c8f9abe (netfilter: nfnetlink_queue: cleanup copy_range usage).

Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/netfilter/nfnetlink_log.c