From: Simon Horman <horms@kernel•org>
To: Daniel Borkmann <daniel@iogearbox•net>
Cc: netdev@vger•kernel.org, davem@davemloft•net, pabeni@redhat•com,
kuba@kernel•org, gal@nvidia•com, martin.lau@linux•dev
Subject: Re: [PATCH net-next 2/2] net: Make consumed action consistent in sch_handle_egress
Date: Sat, 26 Aug 2023 09:58:28 +0200 [thread overview]
Message-ID: <20230826075828.GP3523530@kernel.org> (raw)
In-Reply-To: <20230825134946.31083-2-daniel@iogearbox.net>
On Fri, Aug 25, 2023 at 03:49:46PM +0200, Daniel Borkmann wrote:
> While looking at TC_ACT_* handling, the TC_ACT_CONSUMED is only handled in
> sch_handle_ingress but not sch_handle_egress. This was added via cd11b164073b
> ("net/tc: introduce TC_ACT_REINSERT.") and e5cf1baf92cb ("act_mirred: use
> TC_ACT_REINSERT when possible") and later got renamed into TC_ACT_CONSUMED
> via 720f22fed81b ("net: sched: refactor reinsert action").
>
> The initial work was targeted for ovs back then and only needed on ingress,
> and the mirred action module also restricts it to only that. However, given
> it's an API contract it would still make sense to make this consistent to
> sch_handle_ingress and handle it on egress side in the same way, that is,
> setting return code to "success" and returning NULL back to the caller as
> otherwise an action module sitting on egress returning TC_ACT_CONSUMED could
> lead to an UAF when untreated.
>
> Signed-off-by: Daniel Borkmann <daniel@iogearbox•net>
Reviewed-by: Simon Horman <horms@kernel•org>
next prev parent reply other threads:[~2023-08-26 7:58 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-25 13:49 [PATCH net-next 1/2] net: Fix skb consume leak in sch_handle_egress Daniel Borkmann
2023-08-25 13:49 ` [PATCH net-next 2/2] net: Make consumed action consistent " Daniel Borkmann
2023-08-26 7:58 ` Simon Horman [this message]
2023-08-26 7:57 ` [PATCH net-next 1/2] net: Fix skb consume leak " Simon Horman
2023-08-27 13:55 ` Gal Pressman
2023-08-28 12:55 ` Gal Pressman
2023-08-28 13:05 ` Daniel Borkmann
2023-08-28 9:20 ` patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230826075828.GP3523530@kernel.org \
--to=horms@kernel$(echo .)org \
--cc=daniel@iogearbox$(echo .)net \
--cc=davem@davemloft$(echo .)net \
--cc=gal@nvidia$(echo .)com \
--cc=kuba@kernel$(echo .)org \
--cc=martin.lau@linux$(echo .)dev \
--cc=netdev@vger$(echo .)kernel.org \
--cc=pabeni@redhat$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox