From: Yonghong Song <yhs@fb.com>
To: Kumar Kartikeya Dwivedi <memxor@gmail.com>, bpf@vger.kernel.org
Cc: Alexei Starovoitov <ast@kernel.org>,
Andrii Nakryiko <andrii@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>
Subject: Re: [PATCH bpf] bpf: Limit maximum modifier chain length in btf_check_type_tags
Date: Wed, 15 Jun 2022 08:35:56 -0700 [thread overview]
Message-ID: <b7f06a1f-8ca6-ac5f-05af-6fca29b18841@fb.com> (raw)
In-Reply-To: <20220615042151.2266537-1-memxor@gmail.com>
On 6/14/22 9:21 PM, Kumar Kartikeya Dwivedi wrote:
> !-------------------------------------------------------------------|
> This Message Is From an External Sender
> This message came from outside your organization.
> |-------------------------------------------------------------------!
>
> On processing a module BTF of module built for an older kernel, we might
> sometimes find that some type points to itself forming a loop. If such a
> type is a modifier, btf_check_type_tags's while loop following modifier
> chain will be caught in an infinite loop.
>
> Fix this by defining a maximum chain length and bailing out if we spin
> any longer than that.
>
> Fixes: eb596b090558 ("bpf: Ensure type tags precede modifiers in BTF")
> Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Acked-by: Yonghong Song <yhs@fb.com>
next prev parent reply other threads:[~2022-06-15 15:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-15 4:21 [PATCH bpf] bpf: Limit maximum modifier chain length in btf_check_type_tags Kumar Kartikeya Dwivedi
2022-06-15 15:35 ` Yonghong Song [this message]
2022-06-15 17:40 ` 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=b7f06a1f-8ca6-ac5f-05af-6fca29b18841@fb.com \
--to=yhs@fb.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=memxor@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