]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.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)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Wed, 24 Mar 2021 10:14:30 +0000 (11:14 +0100)
commitcaced55e641152f3100c28767edb30fe84f4fec3
treec9567a9b47d02faf68e833df0467914ac702ce66
parent3432307aed15ac22749961ec2d9977a4bf978a94
netfilter: xt_recent: Fix attempt to update deleted entry

BugLink: https://bugs.launchpad.net/bugs/1918167
[ 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>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kelsey Skunberg <kelsey.skunberg@canonical.com>
net/netfilter/xt_recent.c