mirror of
https://github.com/breeze303/nss-packages.git
synced 2025-12-17 09:16:59 +00:00
qca-nss-ecm: avoid a memcpy overflow in ecm_db Reference: https://github.com/robimarko/nss-packages/pull/10/files qca-nss-ecm: fix nf_ct_net null pointer reference Fixed by xsm1997, massive thanks! It fixes a null pointer access which is introduced in previous qca-nss-ecm patches. Reference: https://github.com/bitthief/openwrt/issues/9
41 lines
1.4 KiB
Diff
41 lines
1.4 KiB
Diff
From 33a2f57d6852035730b353a14912ce2c588f3017 Mon Sep 17 00:00:00 2001
|
|
From: Ansuel Smith <ansuelsmth@gmail.com>
|
|
Date: Sat, 15 May 2021 03:51:14 +0200
|
|
Subject: [PATCH 04/12] treewide: fix wrong chain events flag
|
|
|
|
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
|
|
---
|
|
ecm_conntrack_notifier.c | 8 +++++++-
|
|
1 file changed, 7 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/ecm_conntrack_notifier.c b/ecm_conntrack_notifier.c
|
|
index 7b20132..9c8a45e 100644
|
|
--- a/ecm_conntrack_notifier.c
|
|
+++ b/ecm_conntrack_notifier.c
|
|
@@ -423,7 +423,11 @@ int ecm_conntrack_notifier_init(struct dentry *dentry)
|
|
/*
|
|
* Eventing subsystem is available so we register a notifier hook to get fast notifications of expired connections
|
|
*/
|
|
+#ifdef CONFIG_NF_CONNTRACK_CHAIN_EVENTS
|
|
+ result = nf_conntrack_register_chain_notifier(&init_net, &ecm_conntrack_notifier);
|
|
+#else
|
|
result = nf_conntrack_register_notifier(&init_net, &ecm_conntrack_notifier);
|
|
+#endif
|
|
if (result < 0) {
|
|
DEBUG_ERROR("Can't register nf notifier hook.\n");
|
|
debugfs_remove_recursive(ecm_conntrack_notifier_dentry);
|
|
@@ -441,7 +445,9 @@ EXPORT_SYMBOL(ecm_conntrack_notifier_init);
|
|
void ecm_conntrack_notifier_exit(void)
|
|
{
|
|
DEBUG_INFO("ECM Conntrack Notifier exit\n");
|
|
-#ifdef CONFIG_NF_CONNTRACK_EVENTS
|
|
+#ifdef CONFIG_NF_CONNTRACK_CHAIN_EVENTS
|
|
+ nf_conntrack_unregister_chain_notifier(&init_net, &ecm_conntrack_notifier);
|
|
+#else
|
|
nf_conntrack_unregister_notifier(&init_net, &ecm_conntrack_notifier);
|
|
#endif
|
|
/*
|
|
--
|
|
2.34.1
|
|
|