Commit 4fe95665 authored by Nicklas Bo Jensen's avatar Nicklas Bo Jensen Committed by Greg Kroah-Hartman
Browse files

netfilter: nf_conncount: garbage collection is not skipped when jiffies wrap around

[ Upstream commit df08c94b ]

nf_conncount is supposed to skip garbage collection if it has already
run garbage collection in the same jiffy. Unfortunately, this is broken
when jiffies wrap around which this patch fixes.

The problem is that last_gc in the nf_conncount_list struct is an u32,
but jiffies is an unsigned long which is 8 bytes on my systems. When
those two are compared it only works until last_gc wraps around.

See bug report: https://bugzilla.netfilter.org/show_bug.cgi?id=1778


for more details.

Fixes: d2659299 ("netfilter: nf_conncount: reduce unnecessary GC")
Signed-off-by: default avatarNicklas Bo Jensen <njensen@akamai.com>
Reviewed-by: default avatarFlorian Westphal <fw@strlen.de>
Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent fcbacc47
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment