public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Justin Iurman <justin.iurman@gmail.com>
To: Ido Schimmel <idosch@nvidia.com>,
	Daniel Borkmann <daniel@iogearbox.net>,
	tom@herbertland.com
Cc: kuba@kernel.org, edumazet@google.com, dsahern@kernel.org,
	willemdebruijn.kernel@gmail.com, pabeni@redhat.com,
	netdev@vger.kernel.org
Subject: Re: [PATCH net v2] ipv6: Implement limits on extension header parsing
Date: Sun, 26 Apr 2026 17:47:38 +0200	[thread overview]
Message-ID: <dca69fa4-2284-4251-a569-8b26ab9fca07@gmail.com> (raw)
In-Reply-To: <20260426131714.GA180947@shredder>

On 4/26/26 15:17, Ido Schimmel wrote:
> On Sun, Apr 26, 2026 at 12:38:31PM +0200, Daniel Borkmann wrote:
>> On 4/25/26 12:19 PM, Justin Iurman wrote:
>>> I've given it a lot of thought. I came to the conclusion that we
>>> should use a hard-coded value here as well (just like we did for
>>> 076b8cad77aa, with the same logic), not a sysctl. IMO, the main
>>> reason is that it provides as is a suitable security fix to be
>>> backported, i.e., the max value is the max number of EHs allowed by
>>> RFC 8200, Section 4.1. Also, we remain consistent with
>>> draft-iurman-6man-eh-occurrences (I think Tom is about to send a
>>> revision of the series soon for net-next). What this series does is
>>> not only enforcing ordering, but also verifying the specific number
>>> of occurrences for each type of Extension Header. Which is totally
>>> compatible with what this patch does, i.e., limiting the total
>>> number of Extension Headers (regardless of their types) to 8. I
>>> guess what I'm trying to say is that it seems like a good
>>> plan/compromise and that the aforementioned series would build
>>> perfectly on top of this fix.
>>
>> Initially, I had a hard-coded constant (when it was still 32), but Eric's comment
>> was to rather go with a sysctl, such that if someone unexpectedly complains, then
>> there is still a chance for that person to fix it up via sysctl without having to
>> rebuild the kernel. I'm okay either way, but presumably given we're now being more
>> "aggressive" into lowering the default to 8 rather than 32 then having such a fall-
>> back is probably better.
> 
> I also think that 32 without a sysctl knob is fine (just so that we have
> some upper bound), but if we go with a sysctl then let's make sure that
> it's compatible with Tom's series [1] (I assume he is going to send a
> new version).
> 
> AFAICT it's possible to create conflicting configuration with both
> sysctls (e.g., "enforce_ext_hdr_order" is set to 1 and
> "max_ext_hdrs_number" configured to less than 8). The documentation
> should make the relation between both sysctls clear to users. It can
> also mention that "max_ext_hdrs_number" might be useful when users are
> forced to turn "enforce_ext_hdr_order" off when dealing with hosts that
> send extension headers in an unexpected order. That way, they still have
> an upper bound on the maximum number of extension headers.
> 
> [1] https://lore.kernel.org/netdev/20260314175124.47010-1-tom@herbertland.com/

Ido, Daniel,

As I said, my vote would definitely go to the solution without a sysctl 
for the very reason Ido mentioned. Note that an upper bound of 32 is 
kind of unrealistic, although super (SUPER!) safe. Sending more than 8 
Extension Headers (assuming a different type for each) is not standard 
behavior and would make you non-RFC-compliant anyway. But I'm happy with 
32, as long as we don't define a sysctl for that.

      reply	other threads:[~2026-04-26 15:47 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-25  7:55 [PATCH net v2] ipv6: Implement limits on extension header parsing Daniel Borkmann
2026-04-25 10:19 ` Justin Iurman
2026-04-26 10:38   ` Daniel Borkmann
2026-04-26 10:56     ` saeed bishara
2026-04-26 13:17     ` Ido Schimmel
2026-04-26 15:47       ` Justin Iurman [this message]

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=dca69fa4-2284-4251-a569-8b26ab9fca07@gmail.com \
    --to=justin.iurman@gmail.com \
    --cc=daniel@iogearbox.net \
    --cc=dsahern@kernel.org \
    --cc=edumazet@google.com \
    --cc=idosch@nvidia.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=tom@herbertland.com \
    --cc=willemdebruijn.kernel@gmail.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox