Skip to contentSkip to conversation

Patch "netfilter: nf_tables: fix chain filter in nf_tables_dump_rules()" has been added to the 4.14-stable tree

PATCH [email protected] 1 participant 1 message Feb 28, 2018

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

netfilter: nf_tables: fix chain filter in nf_tables_dump_rules()

to the 4.14-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-nf_tables-fix-chain-filter-in-nf_tables_dump_rules.patch
and it can be found in the queue-4.14 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From foo@baz Wed Feb 28 16:23:28 CET 2018

From: Pablo Neira Ayuso <[email protected]>
Date: Tue, 19 Dec 2017 12:01:21 +0100
Subject: netfilter: nf_tables: fix chain filter in nf_tables_dump_rules()

From: Pablo Neira Ayuso <[email protected]>

[ Upstream commit 24c0df82ef7919e4d10cf2e4e65d368eb2e8ea21 ]

ctx->chain may be null now that we have very large object names, so we cannot check for ctx->chain[0] here.

Fixes b7263e071aba7 ("netfilter: nf_tables: Allow table names of up to 255 chars")
---
 net/netfilter/nf_tables_api.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/netfilter/nf_tables_api.c +1 -1
@@ -2072,7 +2072,7 @@ static int nf_tables_dump_rules(struct s
 				continue;
 
 			list_for_each_entry_rcu(chain, &table->chains, list) {
-				if (ctx && ctx->chain[0] &&
+				if (ctx && ctx->chain &&
 				    strcmp(ctx->chain, chain->name) != 0)
 					continue;
 

Patches currently in stable-queue which might be from [email protected] are

queue-4.14/netfilter-uapi-correct-untracked-conntrack-state-bit-number.patch queue-4.14/netfilter-nf_tables-fix-chain-filter-in-nf_tables_dump_rules.patch queue-4.14/netfilter-nf_tables-fix-potential-null-ptr-deref-in-nf_tables_dump_obj_done.patch