https://bugzilla.kernel.org/show_bug.cgi?id=207773
Subsystems (2)
for the sake of god may someone look at this?
https://bugzilla.kernel.org/show_bug.cgi?id=207773
Hi,
Quoted 2 lines · Reindl Harald
for the sake of god may someone look at this?
https://bugzilla.kernel.org/show_bug.cgi?id=207773
Could you send your iptables rules and at least the set definitions without the set contents? I need to reproduce the issue.
Best regards,
Jozsef
-
E-mail : [email protected], [email protected] PGP key : https://wigner.hu/~kadlec/pgp_public_key.txt
Address : Wigner Research Centre for Physics
H-1525 Budapest 114, POB. 49, Hungary
Am 27.01.21 um 14:38 schrieb Jozsef Kadlecsik:
Quoted 9 lines
Hi,
Quoted 2 lines · Reindl Harald
for the sake of god may someone look at this?
https://bugzilla.kernel.org/show_bug.cgi?id=207773Could you send your iptables rules and at least the set definitions without the set contents? I need to reproduce the issue.
is offlist OK?
that's the companies "datacenter firewall"
Quoted 11 lines · Reindl Harald
Am 27.01.21 um 14:38 schrieb Jozsef Kadlecsik:
Quoted 8 lines · Reindl Harald
Quoted 3 lines
for the sake of god may someone look at this?
https://bugzilla.kernel.org/show_bug.cgi?id=207773Could you send your iptables rules and at least the set definitions without the set contents? I need to reproduce the issue.
is offlist OK? that's the companies "datacenter firewall"
That's OK and private data remains private.
Best regards,
Jozsef
-
E-mail : [email protected], [email protected] PGP key : https://wigner.hu/~kadlec/pgp_public_key.txt
Address : Wigner Research Centre for Physics
H-1525 Budapest 114, POB. 49, Hungary
Hi,
Quoted 7 lines · Jozsef Kadlecsik
Quoted 2 lines · Reindl Harald
for the sake of god may someone look at this?
https://bugzilla.kernel.org/show_bug.cgi?id=207773Could you send your iptables rules and at least the set definitions without the set contents? I need to reproduce the issue.
Checking your rules, you have got a recent match in which you use both the --reap and --update flags. However, as far as I see the code leaves the possibility open that the recent entry to be updated is reaped, which then leads to the crash.
The following patch should fix the issue - however, I could not test it:
net/netfilter/xt_recent.c +10 -2
@@ -152,7 +152,8 @@ static void recent_entry_remove(struct recent_table *t, struct recent_entry *e)/* * Drop entries with timestamps older then 'time'. */ -static void recent_entry_reap (struct recent_table *t,unsigned long time) +static void recent_entry_reap (struct recent_table *t,unsigned long time, +struct recent_entry *working,bool update) {struct recent_entry *e;
@@ -161,6 +162,12 @@ static void recent_entry_reap(struct recent_table *t, unsigned long time)*/ e = list_entry(t->lru_list.next, struct recent_entry, lru_list); +/* +* Do not reap the entry which are going to be updated. +*/ +if (e == working && update) +return ; +/* * The last time stamp is the most recent. */
@@ -303,7 +310,8 @@ recent_mt(const struct sk_buff *skb, struct xt_action_param *par)/* info->seconds must be non-zero */ if (info->check_set &XT_RECENT_REAP ) -recent_entry_reap (t, time); +recent_entry_reap (t, time, e, + info->check_set &XT_RECENT_UPDATE && ret); } if (info->check_set & XT_RECENT_SET ||
Best regards,
Jozsef
-
E-mail : [email protected], [email protected] PGP key : https://wigner.hu/~kadlec/pgp_public_key.txt
Address : Wigner Research Centre for Physics
H-1525 Budapest 114, POB. 49, Hungary
Am 28.01.21 um 00:13 schrieb Jozsef Kadlecsik:
Quoted 6 lines
Hi,
Quoted 2 lines · Jozsef Kadlecsik
On Wed, 27 Jan 2021, Reindl Harald wrote:
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
for the sake of god may someone look at this?
https://bugzilla.kernel.org/show_bug.cgi?id=207773Could you send your iptables rules and at least the set definitions without the set contents? I need to reproduce the issue.
Checking your rules, you have got a recent match in which you use both the --reap and --update flags.
which makes sense
Quoted 3 lines
However, as far as I see the code leaves the
possibility open that the recent entry to be updated is reaped, which then leads to the crash.
thanks for checking
Quoted 1 line
The following patch should fix the issue - however, I could not test it
hopefully this makes it into a near future kernel update, i rely on distribution packages and Fedora is pretty quick