Patch "netfilter: nf_tables: discard table flag update with pending basechain deletion" has been added to the 6.6-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

    netfilter: nf_tables: discard table flag update with pending basechain deletion

to the 6.6-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-discard-table-flag-update-with-pending-basechain-deletion.patch
and it can be found in the queue-6.6 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From 1bc83a019bbe268be3526406245ec28c2458a518 Mon Sep 17 00:00:00 2001
From: Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx>
Date: Wed, 3 Apr 2024 19:35:30 +0200
Subject: netfilter: nf_tables: discard table flag update with pending basechain deletion

From: Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx>

commit 1bc83a019bbe268be3526406245ec28c2458a518 upstream.

Hook unregistration is deferred to the commit phase, same occurs with
hook updates triggered by the table dormant flag. When both commands are
combined, this results in deleting a basechain while leaving its hook
still registered in the core.

Fixes: 179d9ba5559a ("netfilter: nf_tables: fix table flag updates")
Signed-off-by: Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 net/netfilter/nf_tables_api.c |    9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

--- a/net/netfilter/nf_tables_api.c
+++ b/net/netfilter/nf_tables_api.c
@@ -1209,10 +1209,11 @@ static bool nft_table_pending_update(con
 		return true;
 
 	list_for_each_entry(trans, &nft_net->commit_list, list) {
-		if ((trans->msg_type == NFT_MSG_NEWCHAIN ||
-		     trans->msg_type == NFT_MSG_DELCHAIN) &&
-		    trans->ctx.table == ctx->table &&
-		    nft_trans_chain_update(trans))
+		if (trans->ctx.table == ctx->table &&
+		    ((trans->msg_type == NFT_MSG_NEWCHAIN &&
+		      nft_trans_chain_update(trans)) ||
+		     (trans->msg_type == NFT_MSG_DELCHAIN &&
+		      nft_is_base_chain(trans->ctx.chain))))
 			return true;
 	}
 


Patches currently in stable-queue which might be from pablo@xxxxxxxxxxxxx are

queue-6.6/netfilter-nf_tables-release-batch-on-table-validation-from-abort-path.patch
queue-6.6/netfilter-nf_tables-discard-table-flag-update-with-pending-basechain-deletion.patch
queue-6.6/netfilter-nf_tables-reject-new-basechain-after-table-flag-update.patch
queue-6.6/netfilter-nf_tables-release-mutex-after-nft_gc_seq_end-from-abort-path.patch
queue-6.6/netfilter-nf_tables-reject-destroy-command-to-remove.patch
queue-6.6/netfilter-nf_tables-flush-pending-destroy-work-before-exit_net-release.patch
queue-6.6/netfilter-validate-user-input-for-expected-length.patch
queue-6.6/netfilter-nf_tables-fix-potential-data-race-in-__nft_flowtable_type_get.patch
queue-6.6/netfilter-nf_tables-skip-netdev-hook-unregistration-.patch
queue-6.6/netfilter-nf_tables-reject-table-flag-and-netdev-bas.patch




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux