summaryrefslogtreecommitdiffstats
path: root/net/sched/act_ct.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-07 13:15:13 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-07 13:15:13 +0000
commit98f739b627c5daa488e70dae1c8097aa78ca80ae (patch)
treeafd38c73d3b6b7a6567383aeeaee0536dcdcb920 /net/sched/act_ct.c
parentAdding upstream version 6.9.9. (diff)
downloadlinux-98f739b627c5daa488e70dae1c8097aa78ca80ae.tar.xz
linux-98f739b627c5daa488e70dae1c8097aa78ca80ae.zip
Adding upstream version 6.9.10.upstream/6.9.10
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'net/sched/act_ct.c')
-rw-r--r--net/sched/act_ct.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/net/sched/act_ct.c b/net/sched/act_ct.c
index 2a96d9c1db..6fa3cca87d 100644
--- a/net/sched/act_ct.c
+++ b/net/sched/act_ct.c
@@ -1077,6 +1077,14 @@ do_nat:
*/
if (nf_conntrack_confirm(skb) != NF_ACCEPT)
goto drop;
+
+ /* The ct may be dropped if a clash has been resolved,
+ * so it's necessary to retrieve it from skb again to
+ * prevent UAF.
+ */
+ ct = nf_ct_get(skb, &ctinfo);
+ if (!ct)
+ skip_add = true;
}
if (!skip_add)