[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z360uoTfHrl5VwSB@LQ3V64L9R2>
Date: Wed, 8 Jan 2025 09:24:10 -0800
From: Joe Damato <jdamato@...tly.com>
To: Jakub Kicinski <kuba@...nel.org>
Cc: davem@...emloft.net, netdev@...r.kernel.org, edumazet@...gle.com,
pabeni@...hat.com, stable@...r.kernel.org, almasrymina@...gle.com,
amritha.nambiar@...el.com, sridhar.samudrala@...el.com
Subject: Re: [PATCH net] netdev: prevent accessing NAPI instances from
another namespace
On Mon, Jan 06, 2025 at 10:01:36AM -0800, Jakub Kicinski wrote:
> The NAPI IDs were not fully exposed to user space prior to the netlink
> API, so they were never namespaced. The netlink API must ensure that
> at the very least NAPI instance belongs to the same netns as the owner
> of the genl sock.
>
> napi_by_id() can become static now, but it needs to move because of
> dev_get_by_napi_id().
>
> Cc: stable@...r.kernel.org
> Fixes: 1287c1ae0fc2 ("netdev-genl: Support setting per-NAPI config values")
> Fixes: 27f91aaf49b3 ("netdev-genl: Add netlink framework functions for napi")
> Signed-off-by: Jakub Kicinski <kuba@...nel.org>
> ---
> Splitting this into fix per-version is a bit tricky, because we need
> to replace the napi_by_id() helper with a better one. I'll send the
> stable versions manually.
>
> CC: jdamato@...tly.com
> CC: almasrymina@...gle.com
> CC: amritha.nambiar@...el.com
> CC: sridhar.samudrala@...el.com
> ---
> net/core/dev.c | 43 +++++++++++++++++++++++++++++-------------
> net/core/dev.h | 3 ++-
> net/core/netdev-genl.c | 6 ++----
> 3 files changed, 34 insertions(+), 18 deletions(-)
Thanks.
Reviewed-by: Joe Damato <jdamato@...tly.com>
Powered by blists - more mailing lists