<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/net/netfilter, branch v5.11</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=v5.11</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v5.11'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2021-02-08T23:50:14Z</updated>
<entry>
<title>netfilter: nftables: relax check for stateful expressions in set definition</title>
<updated>2021-02-08T23:50:14Z</updated>
<author>
<name>Pablo Neira Ayuso</name>
<email>pablo@netfilter.org</email>
</author>
<published>2021-02-08T12:20:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=664899e85c1312e51d2761e7f8b2f25d053e8489'/>
<id>urn:sha1:664899e85c1312e51d2761e7f8b2f25d053e8489</id>
<content type='text'>
Restore the original behaviour where users are allowed to add an element
with any stateful expression if the set definition specifies no stateful
expressions. Make sure upper maximum number of stateful expressions of
NFT_SET_EXPR_MAX is not reached.

Fixes: 8cfd9b0f8515 ("netfilter: nftables: generalize set expressions support")
Fixes: 48b0ae046ee9 ("netfilter: nftables: netlink support for several set element expressions")
Signed-off-by: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
</content>
</entry>
<entry>
<title>netfilter: conntrack: skip identical origin tuple in same zone only</title>
<updated>2021-02-08T23:04:14Z</updated>
<author>
<name>Florian Westphal</name>
<email>fw@strlen.de</email>
</author>
<published>2021-02-05T11:56:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=07998281c268592963e1cd623fe6ab0270b65ae4'/>
<id>urn:sha1:07998281c268592963e1cd623fe6ab0270b65ae4</id>
<content type='text'>
The origin skip check needs to re-test the zone. Else, we might skip
a colliding tuple in the reply direction.

This only occurs when using 'directional zones' where origin tuples
reside in different zones but the reply tuples share the same zone.

This causes the new conntrack entry to be dropped at confirmation time
because NAT clash resolution was elided.

Fixes: 4e35c1cb9460240 ("netfilter: nf_nat: skip nat clash resolution for same-origin entries")
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>netfilter: flowtable: fix tcp and udp header checksum update</title>
<updated>2021-02-04T00:10:14Z</updated>
<author>
<name>Sven Auhagen</name>
<email>sven.auhagen@voleatech.de</email>
</author>
<published>2021-02-02T17:01:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8d6bca156e47d68551750a384b3ff49384c67be3'/>
<id>urn:sha1:8d6bca156e47d68551750a384b3ff49384c67be3</id>
<content type='text'>
When updating the tcp or udp header checksum on port nat the function
inet_proto_csum_replace2 with the last parameter pseudohdr as true.
This leads to an error in the case that GRO is used and packets are
split up in GSO. The tcp or udp checksum of all packets is incorrect.

The error is probably masked due to the fact the most network driver
implement tcp/udp checksum offloading. It also only happens when GRO is
applied and not on single packets.

The error is most visible when using a pppoe connection which is not
triggering the tcp/udp checksum offload.

Fixes: ac2a66665e23 ("netfilter: add generic flow table infrastructure")
Signed-off-by: Sven Auhagen &lt;sven.auhagen@voleatech.de&gt;
Signed-off-by: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
</content>
</entry>
<entry>
<title>netfilter: nftables: fix possible UAF over chains from packet path in netns</title>
<updated>2021-02-03T23:33:09Z</updated>
<author>
<name>Pablo Neira Ayuso</name>
<email>pablo@netfilter.org</email>
</author>
<published>2021-02-02T15:07:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=767d1216bff82507c945e92fe719dff2083bb2f4'/>
<id>urn:sha1:767d1216bff82507c945e92fe719dff2083bb2f4</id>
<content type='text'>
Although hooks are released via call_rcu(), chain and rule objects are
immediately released while packets are still walking over these bits.

This patch adds the .pre_exit callback which is invoked before
synchronize_rcu() in the netns framework to stay safe.

Remove a comment which is not valid anymore since the core does not use
synchronize_net() anymore since 8c873e219970 ("netfilter: core: free
hooks with call_rcu").

Suggested-by: Florian Westphal &lt;fw@strlen.de&gt;
Fixes: df05ef874b28 ("netfilter: nf_tables: release objects on netns destruction")
Signed-off-by: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
</content>
</entry>
<entry>
<title>netfilter: xt_recent: Fix attempt to update deleted entry</title>
<updated>2021-02-03T23:33:08Z</updated>
<author>
<name>Jozsef Kadlecsik</name>
<email>kadlec@mail.kfki.hu</email>
</author>
<published>2021-01-29T19:57:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b1bdde33b72366da20d10770ab7a49fe87b5e190'/>
<id>urn:sha1:b1bdde33b72366da20d10770ab7a49fe87b5e190</id>
<content type='text'>
When both --reap and --update flag are specified, there's a code
path at which the entry to be updated is reaped beforehand,
which then leads to kernel crash. Reap only entries which won't be
updated.

Fixes kernel bugzilla #207773.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=207773
Reported-by: Reindl Harald &lt;h.reindl@thelounge.net&gt;
Fixes: 0079c5aee348 ("netfilter: xt_recent: add an entry reaper")
Signed-off-by: Jozsef Kadlecsik &lt;kadlec@netfilter.org&gt;
Signed-off-by: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
</content>
</entry>
<entry>
<title>netfilter: nft_dynset: dump expressions when set definition contains no expressions</title>
<updated>2021-01-16T18:54:42Z</updated>
<author>
<name>Pablo Neira Ayuso</name>
<email>pablo@netfilter.org</email>
</author>
<published>2021-01-16T18:50:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ce5379963b2884e9d23bea0c5674a7251414c84b'/>
<id>urn:sha1:ce5379963b2884e9d23bea0c5674a7251414c84b</id>
<content type='text'>
If the set definition provides no stateful expressions, then include the
stateful expression in the ruleset listing. Without this fix, the dynset
rule listing shows the stateful expressions provided by the set
definition.

Fixes: 65038428b2c6 ("netfilter: nf_tables: allow to specify stateful expression in set definition")
Signed-off-by: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
</content>
</entry>
<entry>
<title>netfilter: nft_dynset: add timeout extension to template</title>
<updated>2021-01-16T18:20:15Z</updated>
<author>
<name>Pablo Neira Ayuso</name>
<email>pablo@netfilter.org</email>
</author>
<published>2021-01-16T18:20:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0c5b7a501e7400869ee905b4f7af3d6717802bcb'/>
<id>urn:sha1:0c5b7a501e7400869ee905b4f7af3d6717802bcb</id>
<content type='text'>
Otherwise, the newly create element shows no timeout when listing the
ruleset. If the set definition does not specify a default timeout, then
the set element only shows the expiration time, but not the timeout.
This is a problem when restoring a stateful ruleset listing since it
skips the timeout policy entirely.

Fixes: 22fe54d5fefc ("netfilter: nf_tables: add support for dynamic set updates")
Signed-off-by: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
</content>
</entry>
<entry>
<title>netfilter: nft_dynset: honor stateful expressions in set definition</title>
<updated>2021-01-16T17:57:26Z</updated>
<author>
<name>Pablo Neira Ayuso</name>
<email>pablo@netfilter.org</email>
</author>
<published>2021-01-16T11:26:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=fca05d4d61e65fa573a3768f9019a42143c03349'/>
<id>urn:sha1:fca05d4d61e65fa573a3768f9019a42143c03349</id>
<content type='text'>
If the set definition contains stateful expressions, allocate them for
the newly added entries from the packet path.

Fixes: 65038428b2c6 ("netfilter: nf_tables: allow to specify stateful expression in set definition")
Signed-off-by: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
</content>
</entry>
<entry>
<title>netfilter: nf_nat: Fix memleak in nf_nat_init</title>
<updated>2021-01-10T23:34:11Z</updated>
<author>
<name>Dinghao Liu</name>
<email>dinghao.liu@zju.edu.cn</email>
</author>
<published>2021-01-09T12:01:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=869f4fdaf4ca7bb6e0d05caf6fa1108dddc346a7'/>
<id>urn:sha1:869f4fdaf4ca7bb6e0d05caf6fa1108dddc346a7</id>
<content type='text'>
When register_pernet_subsys() fails, nf_nat_bysource
should be freed just like when nf_ct_extend_register()
fails.

Fixes: 1cd472bf036ca ("netfilter: nf_nat: add nat hook register functions to nf_nat")
Signed-off-by: Dinghao Liu &lt;dinghao.liu@zju.edu.cn&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: conntrack: fix reading nf_conntrack_buckets</title>
<updated>2021-01-10T08:39:22Z</updated>
<author>
<name>Jesper Dangaard Brouer</name>
<email>brouer@redhat.com</email>
</author>
<published>2021-01-08T11:44:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f6351c3f1c27c80535d76cac2299aec44c36291e'/>
<id>urn:sha1:f6351c3f1c27c80535d76cac2299aec44c36291e</id>
<content type='text'>
The old way of changing the conntrack hashsize runtime was through changing
the module param via file /sys/module/nf_conntrack/parameters/hashsize. This
was extended to sysctl change in commit 3183ab8997a4 ("netfilter: conntrack:
allow increasing bucket size via sysctl too").

The commit introduced second "user" variable nf_conntrack_htable_size_user
which shadow actual variable nf_conntrack_htable_size. When hashsize is
changed via module param this "user" variable isn't updated. This results in
sysctl net/netfilter/nf_conntrack_buckets shows the wrong value when users
update via the old way.

This patch fix the issue by always updating "user" variable when reading the
proc file. This will take care of changes to the actual variable without
sysctl need to be aware.

Fixes: 3183ab8997a4 ("netfilter: conntrack: allow increasing bucket size via sysctl too")
Reported-by: Yoel Caspersen &lt;yoel@kviknet.dk&gt;
Signed-off-by: Jesper Dangaard Brouer &lt;brouer@redhat.com&gt;
Acked-by: Florian Westphal &lt;fw@strlen.de&gt;
Signed-off-by: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
</content>
</entry>
</feed>
