[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZIGxIWNUsCDg0J0U@corigine.com>
Date: Thu, 8 Jun 2023 12:44:49 +0200
From: Simon Horman <simon.horman@...igine.com>
To: Florian Westphal <fw@...len.de>
Cc: netdev@...r.kernel.org, jhs@...atatu.com, xiyou.wangcong@...il.com,
jiri@...nulli.us
Subject: Re: [PATCH net 2/3] net/sched: act_ipt: add sanity checks on skb
before calling target
On Wed, Jun 07, 2023 at 04:59:53PM +0200, Florian Westphal wrote:
> Netfilter targets make assumptions on the skb state, for example
> iphdr is supposed to be in the linear area.
>
> This is normally done by IP stack, but in act_ipt case no
> such checks are made.
>
> Some targets can even assume that skb_dst will be valid.
> Make a minimum effort to check for this:
>
> - Don't call the targets eval function for non-ipv4 skbs.
> - Don't call the targets eval function for POSTROUTING
> emulation when the skb has no dst set.
>
> Signed-off-by: Florian Westphal <fw@...len.de>
Reviewed-by: Simon Horman <simon.horman@...igine.com>
Powered by blists - more mailing lists