From: David Miller <davem@davemloft.net>
To: toke@redhat.com
Cc: netdev@vger.kernel.org, cake@lists.bufferbloat.net,
dcaratti@redhat.com, jiri@resnulli.us, jhs@mojatatu.com,
xiyou.wangcong@gmail.com, toshiaki.makita1@gmail.com,
daniel@iogearbox.net
Subject: Re: [Cake] [PATCH net v2] vlan: consolidate VLAN parsing code and limit max parsing depth
Date: Tue, 07 Jul 2020 15:49:10 -0700 (PDT) [thread overview]
Message-ID: <20200707.154910.182089612829642491.davem@davemloft.net> (raw)
In-Reply-To: <20200707110325.86731-1-toke@redhat.com>
From: Toke Høiland-Jørgensen <toke@redhat.com>
Date: Tue, 7 Jul 2020 13:03:25 +0200
> Toshiaki pointed out that we now have two very similar functions to extract
> the L3 protocol number in the presence of VLAN tags. And Daniel pointed out
> that the unbounded parsing loop makes it possible for maliciously crafted
> packets to loop through potentially hundreds of tags.
>
> Fix both of these issues by consolidating the two parsing functions and
> limiting the VLAN tag parsing to a max depth of 8 tags. As part of this,
> switch over __vlan_get_protocol() to use skb_header_pointer() instead of
> pskb_may_pull(), to avoid the possible side effects of the latter and keep
> the skb pointer 'const' through all the parsing functions.
>
> v2:
> - Use limit of 8 tags instead of 32 (matching XMIT_RECURSION_LIMIT)
>
> Reported-by: Toshiaki Makita <toshiaki.makita1@gmail.com>
> Reported-by: Daniel Borkmann <daniel@iogearbox.net>
> Fixes: d7bf2ebebc2b ("sched: consistently handle layer3 header accesses in the presence of VLANs")
> Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
Applied, thank you.
prev parent reply other threads:[~2020-07-07 22:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-07 11:03 Toke Høiland-Jørgensen
2020-07-07 22:49 ` David Miller [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
List information: https://lists.bufferbloat.net/postorius/lists/cake.lists.bufferbloat.net/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200707.154910.182089612829642491.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=cake@lists.bufferbloat.net \
--cc=daniel@iogearbox.net \
--cc=dcaratti@redhat.com \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=netdev@vger.kernel.org \
--cc=toke@redhat.com \
--cc=toshiaki.makita1@gmail.com \
--cc=xiyou.wangcong@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