Skip to contentSkip to conversation

netfilter: nft_inner: incorrect percpu area handling under softirq

PATCH New Pablo Neira Ayuso 1 participant 1 message Nov 27, 2024

Subsystems (2)
lore
Share & tools
lore

Pablo Neira Ayuso

author maintainer
#0 lore raw

PATCH 1/1 netfilter: nft_inner: incorrect percpu area handling under softirq

Softirq can interrupt packet from process context which walks over the percpu area.

Add routines to disable bh while restoring and saving the tunnel parser context from percpu area to stack. Add a skbuff owner for this percpu area to catch softirq interference to exercise the packet tunnel parser again in such case.

---
 include/net/netfilter/nf_tables_core.h |  1 +
 net/netfilter/nft_inner.c              | 56 ++++++++++++++++++++------
 2 files changed, 45 insertions(+), 12 deletions(-)
include/net/netfilter/nf_tables_core.h +1 -0
index ff27cb2e1662..98e2bf648c63 100644
@@ -161,6 +161,7 @@ enum {
 };
 
 struct nft_inner_tun_ctx {
+	struct sk_buff *skb;
 	u16	type;
 	u16	inner_tunoff;
 	u16	inner_lloff;
net/netfilter/nft_inner.c +44 -12

106 lines not on this page · raw message

Signature · 1 line
2.30.2