On 3/7/21 2:52 PM, Alexei Starovoitov wrote:
From: Alexei Starovoitov <ast@xxxxxxxxxx> The syzbot got FD of vmlinux BTF and passed it into map_create which caused crash in btf_type_id_size() when it tried to access resolved_ids. The vmlinux BTF doesn't have 'resolved_ids' and 'resolved_sizes' initialized to save memory. To avoid such issues disallow using vmlinux BTF in prog_load and map_create commands. Reported-by: syzbot+8bab8ed346746e7540e8@xxxxxxxxxxxxxxxxxxxxxxxxx Fixes: 5329722057d4 ("bpf: Assign ID to vmlinux BTF and return extra info for BTF in GET_OBJ_INFO") Signed-off-by: Alexei Starovoitov <ast@xxxxxxxxxx>
Acked-by: Yonghong Song <yhs@xxxxxx>