]> git.ipfire.org Git - thirdparty/kernel/stable.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 12:58:13 +0000 (13:58 +0100)
commit31af881bb827fcef0846ecea5b03c96762735079
tree67c086d27d50bb5d5e71fa6803d337aad0364774
parent1b89be5687d6dbadaf64bb3aec2d0c8db1ccb63c
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