From: Ido Schimmel <idosch@nvidia.com>
To: Zhiling Zou <zhilinz@nebusec.ai>
Cc: netdev@vger.kernel.org, dsahern@kernel.org, davem@davemloft.net,
edumazet@google.com, pabeni@redhat.com, horms@kernel.org,
vega@nebusec.ai
Subject: Re: [PATCH net v4 1/1] ipv6: flowlabel: cap duplicate leases per socket
Date: Thu, 3 Sep 2026 11:16:17 +0300 [thread overview]
Message-ID: <20260903081617.GA11345@shredder> (raw)
In-Reply-To: <83f8535972ff6e3741548476a1d50dec24c758be.1788415194.git.zhilinz@nebusec.ai>
On Thu, Sep 03, 2026 at 02:23:03PM +0800, Zhiling Zou wrote:
> ipv6_flowlabel_get() allocates an ipv6_fl_socklist entry for every
> successful GET. The recheck path for a compatible existing flowlabel
> links another lease without applying any lease admission check. Repeated
> GET requests for one shareable label can therefore grow a socket's lease
> list without bound.
>
> Reject a new unprivileged lease once the socket already holds
> FL_MAX_PER_SOCK leases. Check this on the shared recheck path so reuse
> of a globally interned label, including the fl_intern() collision path,
> is covered as well. New-label admission remains under the existing
> mem_check() policy.
>
> Use capable(CAP_NET_ADMIN) rather than ns_capable(), matching
> mem_check(). An unprivileged user must not bypass the cap by creating a
> user namespace and a netns where they have CAP_NET_ADMIN, which would
> still consume host memory.
>
> Check the capability only when the socket reaches the limit, so
> successful unprivileged GET requests below the cap do not generate a
> capability audit. Do the admission check before updating linger and
> expires so a rejected GET does not refresh the shared label, matching
> the existing socket-list allocation failure path.
>
> Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
> Cc: stable@vger.kernel.org
> Reported-by: Vega <vega@nebusec.ai>
> Suggested-by: Ido Schimmel <idosch@nvidia.com>
> Signed-off-by: Zhiling Zou <zhilinz@nebusec.ai>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
next prev parent reply other threads:[~2026-09-03 8:16 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-03 6:23 [PATCH net v4 0/1] ipv6: flowlabel: cap duplicate leases per socket Zhiling Zou
2026-09-03 6:23 ` [PATCH net v4 1/1] " Zhiling Zou
2026-09-03 7:23 ` Eric Dumazet
2026-09-03 8:16 ` Ido Schimmel [this message]
2026-09-08 4:30 ` [PATCH net v4 0/1] " 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=20260903081617.GA11345@shredder \
--to=idosch@nvidia.com \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=vega@nebusec.ai \
--cc=zhilinz@nebusec.ai \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.