From: Peilin Ye <yepeilin.cs@gmail.com>
To: sdf@google.com
Cc: Benjamin Tissoires <benjamin.tissoires@redhat.com>,
Andrii Nakryiko <andrii@kernel.org>,
Alexei Starovoitov <ast@kernel.org>, bpf <bpf@vger.kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
davem@davemloft.net, haoluo@google.com, hawk@kernel.org,
John Fastabend <john.fastabend@gmail.com>,
jolsa@kernel.org, KP Singh <kpsingh@kernel.org>,
kuba@kernel.org, lkml <linux-kernel@vger.kernel.org>,
llvm@lists.linux.dev, martin.lau@linux.dev, nathan@kernel.org,
Nick Desaulniers <ndesaulniers@google.com>,
Networking <netdev@vger.kernel.org>, Song Liu <song@kernel.org>,
syzkaller-bugs@googlegroups.com, Tom Rix <trix@redhat.com>,
Yonghong Song <yhs@fb.com>, Peilin Ye <peilin.ye@bytedance.com>
Subject: Re: [syzbot] WARNING in bpf_verifier_vlog
Date: Fri, 9 Sep 2022 14:57:46 -0700 [thread overview]
Message-ID: <20220909215746.GA12232@bytedance> (raw)
In-Reply-To: <YxuzdhmaHeyycyRi@google.com>
On Fri, Sep 09, 2022 at 02:43:18PM -0700, sdf@google.com wrote:
> On 09/09, Peilin Ye wrote:
> > On Fri, Sep 09, 2022 at 12:54:06PM -0700, sdf@google.com wrote:
> > > On 09/09, Benjamin Tissoires wrote:
> > > Yeah, good point. I've run the repro. I think the issue is that
> > > syzkaller is able to pass btf with a super long random name which
> > > then hits BPF_VERIFIER_TMP_LOG_SIZE while printing the verifier
> > > log line. Seems like a non-issue to me, but maybe we need to
> > > add some extra validation..
>
> > In btf_func_proto_check_meta():
>
> > if (t->name_off) {
> > btf_verifier_log_type(env, t, "Invalid name");
> > return -EINVAL;
> > }
>
> > In the verifier log, maybe we should just say that BTF_KIND_FUNC_PROTO
> > "must
> > not have a name" [1], instead of printing out the user-provided
> > (potentially very long) name and say it's "Invalid" ?
>
> > Similarly, for name-too-long errors, should we truncate the name to
> > KSYM_NAME_LEN bytes (see __btf_name_valid()) in the log ?
>
> Both suggestions sound good to me. Care to cook and send a patch with a
> fix?
Sure, I will work on it.
Thanks,
Peilin Ye
prev parent reply other threads:[~2022-09-09 21:57 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-09 4:19 [syzbot] WARNING in bpf_verifier_vlog syzbot
2022-09-09 16:37 ` sdf
2022-09-09 16:52 ` Benjamin Tissoires
2022-09-09 19:54 ` sdf
2022-09-09 21:15 ` Peilin Ye
2022-09-09 21:43 ` sdf
2022-09-09 21:57 ` Peilin Ye [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=20220909215746.GA12232@bytedance \
--to=yepeilin.cs@gmail.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=benjamin.tissoires@redhat.com \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=haoluo@google.com \
--cc=hawk@kernel.org \
--cc=john.fastabend@gmail.com \
--cc=jolsa@kernel.org \
--cc=kpsingh@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=martin.lau@linux.dev \
--cc=nathan@kernel.org \
--cc=ndesaulniers@google.com \
--cc=netdev@vger.kernel.org \
--cc=peilin.ye@bytedance.com \
--cc=sdf@google.com \
--cc=song@kernel.org \
--cc=syzkaller-bugs@googlegroups.com \
--cc=trix@redhat.com \
--cc=yhs@fb.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 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.