Re: [PATCH V2] audit: normalize NETFILTER_PKT

2017-02-23 Thread Paul Moore
On Thu, Feb 23, 2017 at 8:59 PM, Florian Westphal wrote: > Richard Guy Briggs wrote: >> > Not following, sorry, are you saying users can/should use -j MARK >> > somehow? >> >> Part of the discussed design and rationale for stripping many of the >> vanishing fields is that when setting up netfilte

Re: net: possible deadlock in skb_queue_tail

2017-02-23 Thread Florian Westphal
Andrey Konovalov wrote: [ CC Paolo ] > I've got the following error report while fuzzing the kernel with syzkaller. > > On commit c470abd4fde40ea6a0846a2beab642a578c0b8cd (4.10). > > Unfortunately I can't reproduce it. This needs NETLINK_BROADCAST_ERROR enabled on a netlink socket that then s

Re: [PATCH V2] audit: normalize NETFILTER_PKT

2017-02-23 Thread Florian Westphal
Richard Guy Briggs wrote: > > Not following, sorry, are you saying users can/should use -j MARK > > somehow? > > Part of the discussed design and rationale for stripping many of the > vanishing fields is that when setting up netfilter rules to invoke the > AUDIT target, an accompanying nf mark sh

Re: [PATCH V2] audit: normalize NETFILTER_PKT

2017-02-23 Thread Florian Westphal
Paul Moore wrote: > On Thu, Feb 23, 2017 at 12:35 PM, Richard Guy Briggs wrote: > > I had another idea on how to include the sport and dport and that was to > > use the same identifier for sport/icmptype and also for dport/icmpcode, > > but you've already said you are not interested. > > Not at

[PATCH nf 2/2] netfilter: nf_ct_expect: Change __nf_ct_expect_check() return value.

2017-02-23 Thread Jarno Rajahalme
Commit 4dee62b1b9b4 ("netfilter: nf_ct_expect: nf_ct_expect_insert() returns void") inadvertently changed the successful return value of nf_ct_expect_related_report() from 0 to 1 due to __nf_ct_expect_check() returning 1 on success. Prevent this regression in the future by changing the return valu

[PATCH nf 1/2] netfilter: nf_ct_expect: nf_ct_expect_related_report(): Return zero on success.

2017-02-23 Thread Jarno Rajahalme
Commit 4dee62b1b9b4 ("netfilter: nf_ct_expect: nf_ct_expect_insert() returns void") inadvertently changed the successful return value of nf_ct_expect_related_report() from 0 to 1, which caused openvswitch conntrack integration fail in FTP test cases. Fix this by always returning zero on the succes

Re: [PATCH V2] audit: normalize NETFILTER_PKT

2017-02-23 Thread Paul Moore
On Thu, Feb 23, 2017 at 12:35 PM, Richard Guy Briggs wrote: > On 2017-02-23 12:14, Paul Moore wrote: >> On Thu, Feb 23, 2017 at 12:13 PM, Richard Guy Briggs wrote: >> > On 2017-02-23 12:06, Paul Moore wrote: >> >> On Thu, Feb 23, 2017 at 12:04 PM, Richard Guy Briggs >> >> wrote: >> >> > On 2017

[PATCH] uapi: fix linux/netfilter/xt_hashlimit.h userspace compilation error

2017-02-23 Thread Dmitry V. Levin
Include like some of uapi/linux/netfilter/xt_*.h headers do to fix the following linux/netfilter/xt_hashlimit.h userspace compilation error: /usr/include/linux/netfilter/xt_hashlimit.h:90:12: error: 'NAME_MAX' undeclared here (not in a function) char name[NAME_MAX]; Signed-off-by: Dmitry V. L

Re: [PATCH libnftnl] exthdr: remove unused variable uval8

2017-02-23 Thread Florian Westphal
Alexander Alemayhu wrote: > Was added but not used in d7b451fe1a45 (src: add TCP option matching > requirements, 2017-02-07). Fixes the following warning: > > expr/exthdr.c: In function ‘nftnl_expr_exthdr_json_parse’: > expr/exthdr.c:244:10: warning: unused variable ‘uval8’ [-Wunused-variable] >

[PATCH libnftnl] exthdr: remove unused variable uval8

2017-02-23 Thread Alexander Alemayhu
Was added but not used in d7b451fe1a45 (src: add TCP option matching requirements, 2017-02-07). Fixes the following warning: expr/exthdr.c: In function ‘nftnl_expr_exthdr_json_parse’: expr/exthdr.c:244:10: warning: unused variable ‘uval8’ [-Wunused-variable] uint8_t uval8; ^ Signe

Re: [PATCH] uapi: stop including linux/sysctl.h in uapi/linux/netfilter.h

2017-02-23 Thread Pablo Neira Ayuso
On Thu, Feb 23, 2017 at 05:49:28AM +0300, Dmitry V. Levin wrote: > linux/netfilter.h is the last uapi header file that includes > linux/sysctl.h but it does not depend on definitions provided > by this essentially dead header file. Applied, thanks. -- To unsubscribe from this list: send the line "

Re: [PATCH nf-next] netfilter: nft_ct: fix random validation errors for zone set support

2017-02-23 Thread Pablo Neira Ayuso
On Mon, Feb 13, 2017 at 10:26:49PM +0100, Florian Westphal wrote: > Dan reports: > net/netfilter/nft_ct.c:549 nft_ct_set_init() > error: uninitialized symbol 'len'. Applied, thanks. -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majord..

RE:

2017-02-23 Thread Qin's Yanjun
How are you today and your family? I require your attention and honest co-operation about some issues which i will really want to discuss with you which. Looking forward to read from you soon. Qin's __ Sky Silk, http://aknet.kz -- To unsubscribe from this

Re: [PATCH V2] audit: normalize NETFILTER_PKT

2017-02-23 Thread Richard Guy Briggs
On 2017-02-23 12:14, Paul Moore wrote: > On Thu, Feb 23, 2017 at 12:13 PM, Richard Guy Briggs wrote: > > On 2017-02-23 12:06, Paul Moore wrote: > >> On Thu, Feb 23, 2017 at 12:04 PM, Richard Guy Briggs > >> wrote: > >> > On 2017-02-23 11:57, Paul Moore wrote: > >> >> On Thu, Feb 23, 2017 at 10:5

Re: [PATCH V2] audit: normalize NETFILTER_PKT

2017-02-23 Thread Richard Guy Briggs
On 2017-02-23 12:20, Steve Grubb wrote: > On Wednesday, February 22, 2017 9:50:54 PM EST Richard Guy Briggs wrote: > > Simplify and eliminate flipping in and out of message fields, relying on > > nfmark the way we do for audit_key. > > > > https://github.com/linux-audit/audit-kernel/issues/11 > >

Re: [PATCH V2] audit: normalize NETFILTER_PKT

2017-02-23 Thread Steve Grubb
On Wednesday, February 22, 2017 9:50:54 PM EST Richard Guy Briggs wrote: > Simplify and eliminate flipping in and out of message fields, relying on > nfmark the way we do for audit_key. > > https://github.com/linux-audit/audit-kernel/issues/11 > > Signed-off-by: Richard Guy Briggs If this is re

Re: [PATCH V2] audit: normalize NETFILTER_PKT

2017-02-23 Thread Richard Guy Briggs
On 2017-02-23 18:06, Florian Westphal wrote: > Richard Guy Briggs wrote: > > On 2017-02-23 11:57, Paul Moore wrote: > > > On Thu, Feb 23, 2017 at 10:51 AM, Richard Guy Briggs > > > wrote: > > > > On 2017-02-23 06:20, Florian Westphal wrote: > > > >> Richard Guy Briggs wrote: > > > >> > Simplify

Re: [PATCH V2] audit: normalize NETFILTER_PKT

2017-02-23 Thread Paul Moore
On Thu, Feb 23, 2017 at 12:13 PM, Richard Guy Briggs wrote: > On 2017-02-23 12:06, Paul Moore wrote: >> On Thu, Feb 23, 2017 at 12:04 PM, Richard Guy Briggs wrote: >> > On 2017-02-23 11:57, Paul Moore wrote: >> >> On Thu, Feb 23, 2017 at 10:51 AM, Richard Guy Briggs >> >> wrote: >> >> > On 2017

Re: [PATCH V2] audit: normalize NETFILTER_PKT

2017-02-23 Thread Richard Guy Briggs
On 2017-02-23 12:06, Paul Moore wrote: > On Thu, Feb 23, 2017 at 12:04 PM, Richard Guy Briggs wrote: > > On 2017-02-23 11:57, Paul Moore wrote: > >> On Thu, Feb 23, 2017 at 10:51 AM, Richard Guy Briggs > >> wrote: > >> > On 2017-02-23 06:20, Florian Westphal wrote: > >> >> Richard Guy Briggs wr

Re: [PATCH V2] audit: normalize NETFILTER_PKT

2017-02-23 Thread Paul Moore
On Thu, Feb 23, 2017 at 12:04 PM, Richard Guy Briggs wrote: > On 2017-02-23 11:57, Paul Moore wrote: >> On Thu, Feb 23, 2017 at 10:51 AM, Richard Guy Briggs wrote: >> > On 2017-02-23 06:20, Florian Westphal wrote: >> >> Richard Guy Briggs wrote: >> >> > Simplify and eliminate flipping in and out

Re: [PATCH V2] audit: normalize NETFILTER_PKT

2017-02-23 Thread Florian Westphal
Richard Guy Briggs wrote: > On 2017-02-23 11:57, Paul Moore wrote: > > On Thu, Feb 23, 2017 at 10:51 AM, Richard Guy Briggs > > wrote: > > > On 2017-02-23 06:20, Florian Westphal wrote: > > >> Richard Guy Briggs wrote: > > >> > Simplify and eliminate flipping in and out of message fields, relyi

Re: [PATCH V2] audit: normalize NETFILTER_PKT

2017-02-23 Thread Richard Guy Briggs
On 2017-02-23 11:57, Paul Moore wrote: > On Thu, Feb 23, 2017 at 10:51 AM, Richard Guy Briggs wrote: > > On 2017-02-23 06:20, Florian Westphal wrote: > >> Richard Guy Briggs wrote: > >> > Simplify and eliminate flipping in and out of message fields, relying on > >> > nfmark > >> > the way we do

Re: [PATCH V2] audit: normalize NETFILTER_PKT

2017-02-23 Thread Paul Moore
On Thu, Feb 23, 2017 at 10:51 AM, Richard Guy Briggs wrote: > On 2017-02-23 06:20, Florian Westphal wrote: >> Richard Guy Briggs wrote: >> > Simplify and eliminate flipping in and out of message fields, relying on >> > nfmark >> > the way we do for audit_key. >> > >> > +struct nfpkt_par { >> > +

Re: [PATCH 0/8] Netfilter fixes for net

2017-02-23 Thread David Miller
From: Pablo Neira Ayuso Date: Thu, 23 Feb 2017 12:14:01 +0100 > The following patchset contains Netfilter fixes for your net tree, > they are: ... > You can pull these changes from: > > git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf.git Pulled, thanks a lot! -- To unsubscribe from th

Re: [PATCH V2] audit: normalize NETFILTER_PKT

2017-02-23 Thread Richard Guy Briggs
On 2017-02-23 06:20, Florian Westphal wrote: > Richard Guy Briggs wrote: > > Simplify and eliminate flipping in and out of message fields, relying on > > nfmark > > the way we do for audit_key. > > > > +struct nfpkt_par { > > + int ipv; > > + const void *saddr; > > + const void *daddr; > >

Re: [PATCH V2] audit: normalize NETFILTER_PKT (fwd)

2017-02-23 Thread Richard Guy Briggs
> > > Hi Richard, > > [auto build test WARNING on v4.9-rc8] > [cannot apply to nf-next/master next-20170222] > [if your patch is applied to the wrong git tree, please drop us a note to > help improve the system] > > url: > https://github.com/0day-ci/linux/com

Re: [PATCH nf-next 2/2] netfilter: nft_hash: support of symmetric hash

2017-02-23 Thread kbuild test robot
Hi Laura, [auto build test WARNING on v4.9-rc8] [cannot apply to next-20170223] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Laura-Garcia-Liebana/netfilter-nft_hash-symhash-type-support

Re: netfilter: nft_ct: add zone id set support

2017-02-23 Thread Florian Westphal
Pablo Neira Ayuso wrote: > On Thu, Feb 23, 2017 at 12:34:35PM +0100, Florian Westphal wrote: > > Yes, Dan reported this and a patch is queued at > > http://patchwork.ozlabs.org/patch/727573/ > > > > Pablo, any reason why this is still waiting? > > I just flushing out my nf.git tree via pull requ

Re: netfilter: nft_ct: add zone id set support

2017-02-23 Thread Pablo Neira Ayuso
On Thu, Feb 23, 2017 at 12:34:35PM +0100, Florian Westphal wrote: > Geert Uytterhoeven wrote: > > On Wed, Feb 22, 2017 at 8:02 PM, Linux Kernel Mailing List > > wrote: > > > Web: > > > https://git.kernel.org/torvalds/c/edee4f1e92458299505ff007733f676b00c516a1 > > > Commit: edee4f1e924

Re: netfilter: nft_ct: add zone id set support

2017-02-23 Thread Florian Westphal
Geert Uytterhoeven wrote: > On Wed, Feb 22, 2017 at 8:02 PM, Linux Kernel Mailing List > wrote: > > Web: > > https://git.kernel.org/torvalds/c/edee4f1e92458299505ff007733f676b00c516a1 > > Commit: edee4f1e92458299505ff007733f676b00c516a1 > > Parent: 5c178d81b69f08ca3195427a6ea9a46d

[PATCH nft] src: hash: support of symmetric hash

2017-02-23 Thread Laura Garcia Liebana
This patch provides symmetric hash support according to source ip address and port, and destination ip address and port. The new attribute NFTA_HASH_TYPE has been included to support different types of hashing functions. Currently supported NFT_HASH_JENKINS through jhash and NFT_HASH_SYM through s

[PATCH nf-next 2/2] netfilter: nft_hash: support of symmetric hash

2017-02-23 Thread Laura Garcia Liebana
This patch provides symmetric hash support according to source ip address and port, and destination ip address and port. For this purpose, the __skb_get_hash_symmetric() is used to identify the flow as it uses FLOW_DISSECTOR_F_STOP_AT_FLOW_LABEL flag by default. The new attribute NFTA_HASH_TYPE h

[PATCH nf-next 1/2] netfilter: nft_hash: rename nft_hash to nft_jhash

2017-02-23 Thread Laura Garcia Liebana
This patch renames the local nft_hash structure and functions to nft_jhash in order to prepare the nft_hash module code to add new hash functions. Signed-off-by: Laura Garcia Liebana --- net/netfilter/nft_hash.c | 36 ++-- 1 file changed, 18 insertions(+), 18 dele

[PATCH 1/8] netfilter: nf_ct_helper: warn when not applying default helper assignment

2017-02-23 Thread Pablo Neira Ayuso
From: Jiri Kosina Commit 3bb398d925 ("netfilter: nf_ct_helper: disable automatic helper assignment") is causing behavior regressions in firewalls, as traffic handled by conntrack helpers is now by default not passed through even though it was before due to missing CT targets (which were not neces

[PATCH 3/8] netfilter: ctnetlink: Fix regression in CTA_HELP processing

2017-02-23 Thread Pablo Neira Ayuso
From: Kevin Cernekee Prior to Linux 4.4, it was usually harmless to send a CTA_HELP attribute containing the name of the current helper. That is no longer the case: as of Linux 4.4, if ctnetlink_change_helper() returns an error from the ct->master check, processing of the request will fail, skip

[PATCH 2/8] netfilter: ctnetlink: Fix regression in CTA_STATUS processing

2017-02-23 Thread Pablo Neira Ayuso
From: Kevin Cernekee The libnetfilter_conntrack userland library always sets IPS_CONFIRMED when building a CTA_STATUS attribute. If this toggles the bit from 0->1, the parser will return an error. On Linux 4.4+ this will cause any NFQA_EXP attribute in the packet to be ignored. This breaks con

[PATCH 6/8] netfilter: xt_hashlimit: Fix integer divide round to zero.

2017-02-23 Thread Pablo Neira Ayuso
From: Alban Browaeys Diving the divider by the multiplier before applying to the input. When this would "divide by zero", divide the multiplier by the divider first then multiply the input by this value. Currently user2creds outputs zero when input value is bigger than the number of slices and

[PATCH 7/8] netfilter: nfnetlink_queue: fix NFQA_VLAN_MAX definition

2017-02-23 Thread Pablo Neira Ayuso
From: Ken-ichirou MATSUZAWA Should be - 1 as in other _MAX definitions. Signed-off-by: Ken-ichirou MATSUZAWA Acked-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso --- include/uapi/linux/netfilter/nfnetlink_queue.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/incl

[PATCH 4/8] Fix bug: sometimes valid entries in hash:* types of sets were evicted

2017-02-23 Thread Pablo Neira Ayuso
From: Jozsef Kadlecsik Wrong index was used and therefore when shrinking a hash bucket at deleting an entry, valid entries could be evicted as well. Thanks to Eric Ewanco for the thorough bugreport. Fixes netfilter bugzilla #1119 Signed-off-by: Jozsef Kadlecsik --- net/netfilter/ipset/ip_set_

[PATCH 0/8] Netfilter fixes for net

2017-02-23 Thread Pablo Neira Ayuso
Hi David, The following patchset contains Netfilter fixes for your net tree, they are: 1) Revisit warning logic when not applying default helper assignment. Jiri Kosina considers we are breaking existing setups and not warning our users accordinly now that automatic helper assignment has be

[PATCH 8/8] netfilter: nfnetlink: remove static declaration from err_list

2017-02-23 Thread Pablo Neira Ayuso
From: Liping Zhang Otherwise, different subsys will race to access the err_list, with holding the different nfnl_lock(subsys_id). But this will not happen now, since ->call_batch is only implemented by nftables, so the err_list is protected by nfnl_lock(NFNL_SUBSYS_NFTABLES). Signed-off-by: Lip

[PATCH 5/8] netfilter: ipset: Null pointer exception in ipset list:set

2017-02-23 Thread Pablo Neira Ayuso
From: Vishwanath Pai If we use before/after to add an element to an empty list it will cause a kernel panic. $> cat crash.restore create a hash:ip create b hash:ip create test list:set timeout 5 size 4 add test b before a $> ipset -R < crash.restore Executing the above will crash the kernel.

[PATCH libnftnl] expr: hash: support of symmetric hash

2017-02-23 Thread Laura Garcia Liebana
This patch provides symmetric hash support according to source ip address and port, and destination ip address and port. The new attribute NFTA_HASH_TYPE has been included to support different types of hashing functions. Currently supported NFT_HASH_JENKINS through jhash and NFT_HASH_SYM through s

[PATCH nf-next 0/2] netfilter: nft_hash: symhash type support

2017-02-23 Thread Laura Garcia Liebana
These changes add support for multi hash functions and include the symmetric hash type. As 2 different structures are needed, we're going to rename the nft_hash structure to nft_jhash, and then provide support for several hash functions before including the new type. Laura Garcia Liebana (2): n

Re: netfilter: nft_ct: add zone id set support

2017-02-23 Thread Geert Uytterhoeven
Hi Florian, On Wed, Feb 22, 2017 at 8:02 PM, Linux Kernel Mailing List wrote: > Web: > https://git.kernel.org/torvalds/c/edee4f1e92458299505ff007733f676b00c516a1 > Commit: edee4f1e92458299505ff007733f676b00c516a1 > Parent: 5c178d81b69f08ca3195427a6ea9a46d9af23127 > Refname:ref