Patch "netfilter: nft_last: copy content when cloning expression" has been added to the 5.15-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: nft_last: copy content when cloning expression

to the 5.15-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-nft_last-copy-content-when-cloning-expression.patch
and it can be found in the queue-5.15 subdirectory.

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


>From 860e874290fb3be08e966c9c8ffc510c5b0f2bd8 Mon Sep 17 00:00:00 2001
From: Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx>
Date: Tue, 28 Feb 2023 17:09:03 +0100
Subject: netfilter: nft_last: copy content when cloning expression

From: Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx>

commit 860e874290fb3be08e966c9c8ffc510c5b0f2bd8 upstream.

If the ruleset contains last timestamps, restore them accordingly.
Otherwise, listing after restoration shows never used items.

Fixes: 33a24de37e81 ("netfilter: nft_last: move stateful fields out of expression data")
Signed-off-by: Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 net/netfilter/nft_last.c |    4 ++++
 1 file changed, 4 insertions(+)

--- a/net/netfilter/nft_last.c
+++ b/net/netfilter/nft_last.c
@@ -104,11 +104,15 @@ static void nft_last_destroy(const struc
 static int nft_last_clone(struct nft_expr *dst, const struct nft_expr *src)
 {
 	struct nft_last_priv *priv_dst = nft_expr_priv(dst);
+	struct nft_last_priv *priv_src = nft_expr_priv(src);
 
 	priv_dst->last = kzalloc(sizeof(*priv_dst->last), GFP_ATOMIC);
 	if (!priv_dst->last)
 		return -ENOMEM;
 
+	priv_dst->last->set = priv_src->last->set;
+	priv_dst->last->jiffies = priv_src->last->jiffies;
+
 	return 0;
 }
 


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

queue-5.15/netfilter-nf_tables-check-if-catch-all-set-element-is-active-in-next-generation.patch
queue-5.15/netfilter-nft_quota-move-stateful-fields-out-of-expr.patch
queue-5.15/ipvs-avoid-stat-macros-calls-from-preemptible-contex.patch
queue-5.15/netfilter-nf_tables-skip-dead-set-elements-in-netlin.patch
queue-5.15/netfilter-nft_last-copy-content-when-cloning-expression.patch
queue-5.15/netfilter-nft_limit-move-stateful-fields-out-of-expr.patch
queue-5.15/netfilter-nft_connlimit-memleak-if-nf_ct_netns_get-fails.patch
queue-5.15/netfilter-nft_connlimit-move-stateful-fields-out-of-.patch
queue-5.15/netfilter-nft_limit-fix-stateful-object-memory-leak.patch
queue-5.15/netfilter-nf_tables-memcg-accounting-for-dynamically.patch
queue-5.15/netfilter-nf_tables-reject-invalid-set-policy.patch
queue-5.15/netfilter-nf_tables-do-not-allow-mismatch-field-size.patch
queue-5.15/netfilter-nft_last-move-stateful-fields-out-of-expre.patch
queue-5.15/netfilter-nft_quota-copy-content-when-cloning-expression.patch
queue-5.15/netfilter-nft_limit-clone-packet-limits-cost-value.patch
queue-5.15/netfilter-nf_tables-mark-newset-as-dead-on-transacti.patch
queue-5.15/netfilter-nf_tables-typo-null-check-in-_clone-function.patch
queue-5.15/netfilter-nft_limit-rename-stateful-structure.patch
queue-5.15/netfilter-nf_tables-reject-nft_set_concat-with-not-f.patch
queue-5.15/netfilter-nft_limit-do-not-ignore-unsupported-flags.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