From: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
To: Davide Caratti <dcaratti@redhat.com>
Cc: Jamal Hadi Salim <jhs@mojatatu.com>,
Cong Wang <xiyou.wangcong@gmail.com>,
Jiri Pirko <jiri@resnulli.us>,
netdev@vger.kernel.org, Jakub Kicinski <kuba@kernel.org>,
gnault@redhat.com
Subject: Re: [PATCH net] net/sched: act_mpls: ensure LSE is pullable before reading it
Date: Wed, 18 Nov 2020 13:47:19 -0300 [thread overview]
Message-ID: <20201118164719.GL3913@localhost.localdomain> (raw)
In-Reply-To: <e14a44135817430fc69b3c624895f8584a560975.1605716949.git.dcaratti@redhat.com>
On Wed, Nov 18, 2020 at 05:36:52PM +0100, Davide Caratti wrote:
Hi,
> case TCA_MPLS_ACT_MODIFY:
> + if (!pskb_may_pull(skb,
> + skb_network_offset(skb) + sizeof(new_lse)))
> + goto drop;
> new_lse = tcf_mpls_get_lse(mpls_hdr(skb), p, false);
> if (skb_mpls_update_lse(skb, new_lse))
> goto drop;
Seems TCA_MPLS_ACT_DEC_TTL is also affected. skb_mpls_dec_ttl() will
also call mpls_hdr(skb) without this check.
Marcelo
next prev parent reply other threads:[~2020-11-18 16:47 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-18 16:36 [PATCH net] net/sched: act_mpls: ensure LSE is pullable before reading it Davide Caratti
2020-11-18 16:47 ` Marcelo Ricardo Leitner [this message]
2020-11-18 17:07 ` Davide Caratti
2020-11-18 18:00 ` Marcelo Ricardo Leitner
2020-11-20 19:24 ` Jakub Kicinski
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=20201118164719.GL3913@localhost.localdomain \
--to=marcelo.leitner@gmail.com \
--cc=dcaratti@redhat.com \
--cc=gnault@redhat.com \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--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