]> www.infradead.org Git - users/dwmw2/linux.git/commit
netfilter: xt_recent: Fix attempt to update deleted entry
authorJozsef Kadlecsik <kadlec@mail.kfki.hu>
Fri, 29 Jan 2021 19:57:43 +0000 (20:57 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 23 Feb 2021 13:00:32 +0000 (14:00 +0100)
commitc7559fe4df16c31d1126ba74e6c79bd6f4917f20
treecabb8a84be1da0ed17041be50f93647ce2823761
parent766107351731ae223ebf60ca22bdfeb47ce6acc8
netfilter: xt_recent: Fix attempt to update deleted entry

[ Upstream commit b1bdde33b72366da20d10770ab7a49fe87b5e190 ]

When both --reap and --update flag are specified, there's a code
path at which the entry to be updated is reaped beforehand,
which then leads to kernel crash. Reap only entries which won't be
updated.

Fixes kernel bugzilla #207773.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=207773
Reported-by: Reindl Harald <h.reindl@thelounge.net>
Fixes: 0079c5aee348 ("netfilter: xt_recent: add an entry reaper")
Signed-off-by: Jozsef Kadlecsik <kadlec@netfilter.org>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/netfilter/xt_recent.c