From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:48382 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751542AbcKIIgJ (ORCPT ); Wed, 9 Nov 2016 03:36:09 -0500 Subject: Patch "netfilter: xt_NFLOG: fix unexpected truncated packet" has been added to the 4.8-stable tree To: liping.zhang@spreadtrum.com, ccaputo@alt.net, gregkh@linuxfoundation.org, jpiszcz@lucidpixels.com, pablo@netfilter.org Cc: , From: Date: Wed, 09 Nov 2016 09:35:59 +0100 Message-ID: <14786805598829@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org List-ID: This is a note to let you know that I've just added the patch titled netfilter: xt_NFLOG: fix unexpected truncated packet to the 4.8-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: netfilter-xt_nflog-fix-unexpected-truncated-packet.patch and it can be found in the queue-4.8 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let know about it. >>From 6d19375b58763fefc2f215fb45117d3353ced888 Mon Sep 17 00:00:00 2001 From: Liping Zhang Date: Tue, 11 Oct 2016 21:03:45 +0800 Subject: netfilter: xt_NFLOG: fix unexpected truncated packet From: Liping Zhang commit 6d19375b58763fefc2f215fb45117d3353ced888 upstream. Justin and Chris spotted that iptables NFLOG target was broken when they upgraded the kernel to 4.8: "ulogd-2.0.5- IPs are no longer logged" or "results in segfaults in ulogd-2.0.5". Because "struct nf_loginfo li;" is a local variable, and flags will be filled with garbage value, not inited to zero. So if it contains 0x1, packets will not be logged to the userspace anymore. Fixes: 7643507fe8b5 ("netfilter: xt_NFLOG: nflog-range does not truncate packets") Reported-by: Justin Piszcz Reported-by: Chris Caputo Tested-by: Chris Caputo Signed-off-by: Liping Zhang Signed-off-by: Pablo Neira Ayuso Signed-off-by: Greg Kroah-Hartman --- net/netfilter/xt_NFLOG.c | 1 + 1 file changed, 1 insertion(+) --- a/net/netfilter/xt_NFLOG.c +++ b/net/netfilter/xt_NFLOG.c @@ -32,6 +32,7 @@ nflog_tg(struct sk_buff *skb, const stru li.u.ulog.copy_len = info->len; li.u.ulog.group = info->group; li.u.ulog.qthreshold = info->threshold; + li.u.ulog.flags = 0; if (info->flags & XT_NFLOG_F_COPY_LEN) li.u.ulog.flags |= NF_LOG_F_COPY_LEN; Patches currently in stable-queue which might be from liping.zhang@spreadtrum.com are queue-4.8/netfilter-xt_nflog-fix-unexpected-truncated-packet.patch