All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH nf] netfilter: ebt_nflog: fix unexpected truncated packet
@ 2017-06-18  2:51 Liping Zhang
  2017-06-27 16:12 ` Pablo Neira Ayuso
  0 siblings, 1 reply; 2+ messages in thread
From: Liping Zhang @ 2017-06-18  2:51 UTC (permalink / raw)
  To: pablo; +Cc: netfilter-devel, Liping Zhang, Vishwanath Pai

From: Liping Zhang <zlpnobody@gmail.com>

"struct nf_loginfo li;" is a local variable, so we should set the flags
to 0 explicitly, else, packets maybe truncated unexpectedly when copied
to the userspace.

Fixes: 7643507fe8b5 ("netfilter: xt_NFLOG: nflog-range does not truncate packets")
Cc: Vishwanath Pai <vpai@akamai.com>
Signed-off-by: Liping Zhang <zlpnobody@gmail.com>
---
 net/bridge/netfilter/ebt_nflog.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/net/bridge/netfilter/ebt_nflog.c b/net/bridge/netfilter/ebt_nflog.c
index c1dc486..da1c2fd 100644
--- a/net/bridge/netfilter/ebt_nflog.c
+++ b/net/bridge/netfilter/ebt_nflog.c
@@ -30,6 +30,7 @@ ebt_nflog_tg(struct sk_buff *skb, const struct xt_action_param *par)
 	li.u.ulog.copy_len = info->len;
 	li.u.ulog.group = info->group;
 	li.u.ulog.qthreshold = info->threshold;
+	li.u.ulog.flags = 0;
 
 	nf_log_packet(net, PF_BRIDGE, xt_hooknum(par), skb, xt_in(par),
 		      xt_out(par), &li, "%s", info->prefix);
-- 
2.5.5



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH nf] netfilter: ebt_nflog: fix unexpected truncated packet
  2017-06-18  2:51 [PATCH nf] netfilter: ebt_nflog: fix unexpected truncated packet Liping Zhang
@ 2017-06-27 16:12 ` Pablo Neira Ayuso
  0 siblings, 0 replies; 2+ messages in thread
From: Pablo Neira Ayuso @ 2017-06-27 16:12 UTC (permalink / raw)
  To: Liping Zhang; +Cc: netfilter-devel, Liping Zhang, Vishwanath Pai

On Sun, Jun 18, 2017 at 10:51:09AM +0800, Liping Zhang wrote:
> From: Liping Zhang <zlpnobody@gmail.com>
> 
> "struct nf_loginfo li;" is a local variable, so we should set the flags
> to 0 explicitly, else, packets maybe truncated unexpectedly when copied
> to the userspace.
> 
> Fixes: 7643507fe8b5 ("netfilter: xt_NFLOG: nflog-range does not truncate packets")
> Cc: Vishwanath Pai <vpai@akamai.com>
> Signed-off-by: Liping Zhang <zlpnobody@gmail.com>

Applied to nf, thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-06-27 16:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-18  2:51 [PATCH nf] netfilter: ebt_nflog: fix unexpected truncated packet Liping Zhang
2017-06-27 16:12 ` Pablo Neira Ayuso

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.