Re: [lvc-project] [PATCH] netfilter: xt_recent: Fix attempt to update removed entry
From: Florian Westphal
Date: Thu Feb 09 2023 - 15:17:24 EST
Jan Engelhardt <jengelh@xxxxxxx> wrote:
> On Thursday 2023-02-09 16:07, Florian Westphal wrote:
>
> >Igor Artemiev <Igor.A.Artemiev@xxxxxxx> wrote:
> >> When both --remove and --update flag are specified, there's a code
> >> path at which the entry to be updated is removed beforehand,
> >> that leads to kernel crash. Update entry, if --remove flag
> >> don't specified.
> >>
> >> Found by Linux Verification Center (linuxtesting.org) with SVACE.
> >
> >How did you manage to do this? --update and --remove are supposed
> >to be mutually exclusive.
>
> I suppose the exclusivity is only checked at the iptables command-line
> and neverwhere else.
Removing the userspace check gives me an -EINVAL from checkentry.