lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 9 Sep 2022 14:15:40 -0700
From:   Peilin Ye <>
Cc:     Benjamin Tissoires <>,
        Andrii Nakryiko <>,
        Alexei Starovoitov <>, bpf <>,
        Daniel Borkmann <>,,,,
        John Fastabend <>,,
        KP Singh <>,,
        lkml <>,,,,
        Nick Desaulniers <>,
        Networking <>, Song Liu <>,, Tom Rix <>,
        Yonghong Song <>,
        Peilin Ye <>,
        Peilin Ye <>
Subject: Re: [syzbot] WARNING in bpf_verifier_vlog

Hi all,

On Fri, Sep 09, 2022 at 12:54:06PM -0700, 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 ?

[1] commit 2667a2626f4d ("bpf: btf: Add BTF_KIND_FUNC and BTF_KIND_FUNC_PROTO")

Peilin Ye

Powered by blists - more mailing lists