<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/net/netfilter/nfnetlink_queue.c, branch v4.7</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v4.7</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.7'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2016-06-02T00:54:19Z</updated>
<entry>
<title>Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf</title>
<updated>2016-06-02T00:54:19Z</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2016-06-02T00:54:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=fc14963f249f9aca1ac84c9c8659b4f35e0a315e'/>
<id>urn:sha1:fc14963f249f9aca1ac84c9c8659b4f35e0a315e</id>
<content type='text'>
Pablo Neira Ayuso says:

====================
Netfilter fixes for net

The following patchset contains Netfilter fixes for your net tree,
they are:

1) Fix incorrect timestamp in nfnetlink_queue introduced when addressing
   y2038 safe timestamp, from Florian Westphal.

2) Get rid of leftover conntrack definition from the previous merge
   window, oneliner from Florian.

3) Make nf_queue handler pernet to resolve race on dereferencing the
   hook state structure with netns removal, from Eric Biederman.

4) Ensure clean exit on unregistered helper ports, from Taehee Yoo.

5) Restore FLOWI_FLAG_KNOWN_NH in nf_dup_ipv6. This got lost while
   generalizing xt_TEE to add packet duplication support in nf_tables,
   from Paolo Abeni.

6) Insufficient netlink NFTA_SET_TABLE attribute check in
   nf_tables_getset(), from Phil Turnbull.

7) Reject helper registration on duplicated ports via modparams.
====================

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>netfilter: nf_queue: Make the queue_handler pernet</title>
<updated>2016-05-25T09:54:22Z</updated>
<author>
<name>Eric W. Biederman</name>
<email>ebiederm@xmission.com</email>
</author>
<published>2016-05-14T02:18:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=dc3ee32e96d74dd6c80eed63af5065cb75899299'/>
<id>urn:sha1:dc3ee32e96d74dd6c80eed63af5065cb75899299</id>
<content type='text'>
Florian Weber reported:
&gt; Under full load (unshare() in loop -&gt; OOM conditions) we can
&gt; get kernel panic:
&gt;
&gt; BUG: unable to handle kernel NULL pointer dereference at 0000000000000008
&gt; IP: [&lt;ffffffff81476c85&gt;] nfqnl_nf_hook_drop+0x35/0x70
&gt; [..]
&gt; task: ffff88012dfa3840 ti: ffff88012dffc000 task.ti: ffff88012dffc000
&gt; RIP: 0010:[&lt;ffffffff81476c85&gt;]  [&lt;ffffffff81476c85&gt;] nfqnl_nf_hook_drop+0x35/0x70
&gt; RSP: 0000:ffff88012dfffd80  EFLAGS: 00010206
&gt; RAX: 0000000000000008 RBX: ffffffff81add0c0 RCX: ffff88013fd80000
&gt; [..]
&gt; Call Trace:
&gt;  [&lt;ffffffff81474d98&gt;] nf_queue_nf_hook_drop+0x18/0x20
&gt;  [&lt;ffffffff814738eb&gt;] nf_unregister_net_hook+0xdb/0x150
&gt;  [&lt;ffffffff8147398f&gt;] netfilter_net_exit+0x2f/0x60
&gt;  [&lt;ffffffff8141b088&gt;] ops_exit_list.isra.4+0x38/0x60
&gt;  [&lt;ffffffff8141b652&gt;] setup_net+0xc2/0x120
&gt;  [&lt;ffffffff8141bd09&gt;] copy_net_ns+0x79/0x120
&gt;  [&lt;ffffffff8106965b&gt;] create_new_namespaces+0x11b/0x1e0
&gt;  [&lt;ffffffff810698a7&gt;] unshare_nsproxy_namespaces+0x57/0xa0
&gt;  [&lt;ffffffff8104baa2&gt;] SyS_unshare+0x1b2/0x340
&gt;  [&lt;ffffffff81608276&gt;] entry_SYSCALL_64_fastpath+0x1e/0xa8
&gt; Code: 65 00 48 89 e5 41 56 41 55 41 54 53 83 e8 01 48 8b 97 70 12 00 00 48 98 49 89 f4 4c 8b 74 c2 18 4d 8d 6e 08 49 81 c6 88 00 00 00 &lt;49&gt; 8b 5d 00 48 85 db 74 1a 48 89 df 4c 89 e2 48 c7 c6 90 68 47
&gt;

The simple fix for this requires a new pernet variable for struct
nf_queue that indicates when it is safe to use the dynamically
allocated nf_queue state.

As we need a variable anyway make nf_register_queue_handler and
nf_unregister_queue_handler pernet.  This allows the existing logic of
when it is safe to use the state from the nfnetlink_queue module to be
reused with no changes except for making it per net.

The syncrhonize_rcu from nf_unregister_queue_handler is moved to a new
function nfnl_queue_net_exit_batch so that the worst case of having a
syncrhonize_rcu in the pernet exit path is not experienced in batch
mode.

Reported-by: Florian Westphal &lt;fw@strlen.de&gt;
Signed-off-by: "Eric W. Biederman" &lt;ebiederm@xmission.com&gt;
Acked-by: Florian Westphal &lt;fw@strlen.de&gt;
Signed-off-by: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
</content>
</entry>
<entry>
<title>netfilter: nfnetlink_queue: fix timestamp attribute</title>
<updated>2016-05-12T15:06:59Z</updated>
<author>
<name>Florian Westphal</name>
<email>fw@strlen.de</email>
</author>
<published>2016-05-12T12:43:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a7f1884554b81bd68cd435d72f09a3527629ac43'/>
<id>urn:sha1:a7f1884554b81bd68cd435d72f09a3527629ac43</id>
<content type='text'>
Since 4.4 we erronously use timestamp of the netlink skb (which is zero).

Bugzilla: https://bugzilla.netfilter.org/show_bug.cgi?id=1066
Fixes: b28b1e826f818c30ea7 ("netfilter: nfnetlink_queue: use y2038 safe timestamp")
Signed-off-by: Florian Westphal &lt;fw@strlen.de&gt;
Signed-off-by: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
</content>
</entry>
<entry>
<title>Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next</title>
<updated>2016-04-13T02:34:56Z</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2016-04-13T02:34:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=da0caadf0a05945bf2ef017d43e4eae1e2859b92'/>
<id>urn:sha1:da0caadf0a05945bf2ef017d43e4eae1e2859b92</id>
<content type='text'>
Pablo Neira Ayuso says:

====================
Netfilter updates for net-next

The following patchset contains the first batch of Netfilter updates for
your net-next tree.

1) Define pr_fmt() in nf_conntrack, from Weongyo Jeong.

2) Define and register netfilter's afinfo for the bridge family,
   this comes in preparation for native nfqueue's bridge for nft,
   from Stephane Bryant.

3) Add new attributes to store layer 2 and VLAN headers to nfqueue,
   also from Stephane Bryant.

4) Parse new NFQA_VLAN and NFQA_L2HDR nfqueue netlink attributes
   coming from userspace, from Stephane Bryant.

5) Use net-&gt;ipv6.devconf_all-&gt;hop_limit instead of hardcoded hop_limit
   in IPv6 SYNPROXY, from Liping Zhang.

6) Remove unnecessary check for dst == NULL in nf_reject_ipv6,
   from Haishuang Yan.

7) Deinline ctnetlink event report functions, from Florian Westphal.
====================

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>netfilter: bridge: nf queue verdict to use NFQA_VLAN and NFQA_L2HDR</title>
<updated>2016-03-29T11:29:30Z</updated>
<author>
<name>Stephane Bryant</name>
<email>stephane.ml.bryant@gmail.com</email>
</author>
<published>2016-03-26T07:42:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8d45ff22f1b43249f0cf1baafe0262ca10d1666e'/>
<id>urn:sha1:8d45ff22f1b43249f0cf1baafe0262ca10d1666e</id>
<content type='text'>
This makes nf queues use NFQA_VLAN and NFQA_L2HDR in verdict to modify the
original skb

Signed-off-by: Stephane Bryant &lt;stephane.ml.bryant@gmail.com&gt;
Signed-off-by: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
</content>
</entry>
<entry>
<title>netfilter: bridge: pass L2 header and VLAN as netlink attributes in queues to userspace</title>
<updated>2016-03-29T11:26:38Z</updated>
<author>
<name>Stephane Bryant</name>
<email>stephane.ml.bryant@gmail.com</email>
</author>
<published>2016-03-26T07:42:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=15824ab29f364abd3299ecd17ea48473d971aa79'/>
<id>urn:sha1:15824ab29f364abd3299ecd17ea48473d971aa79</id>
<content type='text'>
- This creates 2 netlink attribute NFQA_VLAN and NFQA_L2HDR.
- These are filled up for the PF_BRIDGE family on the way to userspace.
- NFQA_VLAN is a nested attribute, with the NFQA_VLAN_PROTO and the
  NFQA_VLAN_TCI carrying the corresponding vlan_proto and vlan_tci
  fields from the skb using big endian ordering (and using the CFI
  bit as the VLAN_TAG_PRESENT flag in vlan_tci as in the skb)

Signed-off-by: Stephane Bryant &lt;stephane.ml.bryant@gmail.com&gt;
Signed-off-by: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
</content>
</entry>
<entry>
<title>netfilter: nfnetlink_queue: honor NFQA_CFG_F_FAIL_OPEN when netlink unicast fails</title>
<updated>2016-03-28T15:59:20Z</updated>
<author>
<name>Pablo Neira Ayuso</name>
<email>pablo@netfilter.org</email>
</author>
<published>2016-03-23T11:58:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=931401137f60fc299256bbc221c0b756be31c32c'/>
<id>urn:sha1:931401137f60fc299256bbc221c0b756be31c32c</id>
<content type='text'>
When netlink unicast fails to deliver the message to userspace, we
should also check if the NFQA_CFG_F_FAIL_OPEN flag is set so we reinject
the packet back to the stack.

I think the user expects no packet drops when this flag is set due to
queueing to userspace errors, no matter if related to the internal queue
or when sending the netlink message to userspace.

The userspace application will still get the ENOBUFS error via recvmsg()
so the user still knows that, with the current configuration that is in
place, the userspace application is not consuming the messages at the
pace that the kernel needs.

Reported-by: "Yigal Reiss (yreiss)" &lt;yreiss@cisco.com&gt;
Signed-off-by: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
Tested-by: "Yigal Reiss (yreiss)" &lt;yreiss@cisco.com&gt;
</content>
</entry>
<entry>
<title>nfnetlink: Revert "nfnetlink: add support for memory mapped netlink"</title>
<updated>2016-02-18T16:42:22Z</updated>
<author>
<name>Florian Westphal</name>
<email>fw@strlen.de</email>
</author>
<published>2016-02-18T14:03:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c5b0db3263b92526bc0c1b6380c0c99f91f069fc'/>
<id>urn:sha1:c5b0db3263b92526bc0c1b6380c0c99f91f069fc</id>
<content type='text'>
reverts commit 3ab1f683bf8b ("nfnetlink: add support for memory mapped
netlink")'

Like previous commits in the series, remove wrappers that are not needed
after mmapped netlink removal.

Signed-off-by: Florian Westphal &lt;fw@strlen.de&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>netfilter: nfnetlink_queue: autoload nf_conntrack_netlink module NFQA_CFG_F_CONNTRACK config flag</title>
<updated>2016-01-08T12:25:06Z</updated>
<author>
<name>Ken-ichirou MATSUZAWA</name>
<email>chamaken@gmail.com</email>
</author>
<published>2016-01-05T00:32:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=71b2e5f5ca3b163b90e487a96fd0cabbaf16792b'/>
<id>urn:sha1:71b2e5f5ca3b163b90e487a96fd0cabbaf16792b</id>
<content type='text'>
This patch enables to load nf_conntrack_netlink module if
NFQA_CFG_F_CONNTRACK config flag is specified.

Signed-off-by: Ken-ichirou MATSUZAWA &lt;chamas@h4.dion.ne.jp&gt;
Signed-off-by: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
</content>
</entry>
<entry>
<title>netfilter: nfnetlink_queue: just returns error for unknown command</title>
<updated>2016-01-08T12:25:05Z</updated>
<author>
<name>Ken-ichirou MATSUZAWA</name>
<email>chamaken@gmail.com</email>
</author>
<published>2016-01-05T00:31:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=21c3c971d1eb5d5598ddb1eda2fc3e4d2c992182'/>
<id>urn:sha1:21c3c971d1eb5d5598ddb1eda2fc3e4d2c992182</id>
<content type='text'>
This patch stops processing options for unknown command.

Signed-off-by: Ken-ichirou MATSUZAWA &lt;chamas@h4.dion.ne.jp&gt;
Signed-off-by: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
</content>
</entry>
</feed>
